Jump to content

MD5 Hash Plug-in SHA-1


JSThePatriot
 Share

Recommended Posts

I just wanted to make a note that Plugins are no longer included in AutoIt. Some have managed to export the functionality for a DllCall'able functionality, but I do not have a need to do this at this time so I will let this post die. Thanks to all those who used and found this useful. -JS 20140825

This plugin has been an on going project for sometime now. This post was originally created in January 06, but it was thought about long before that. I had originally tried to get these functions included in the source code of AutoIt in a couple of different threads in the Developers forum, but due to restrictions in some countries this was not a possibility. I am completely re-writing the entire post to better structure it for long term stability, and updates. (8/28/2006)

First Thread Encryption and AutoIt (Should be Hashes and AutoIt)
Second Thread TCP and Encryption Included? (started by layer asking which features would be included)

Due to the responses to the above two listed threads I decided that a plugin would be the best plan of action when they came out in late 05. I didnt release anything until this thread was started.

The first goal of this plugin was to include MD5, SHA-1, and a couple of others. I have added MD5, and SHA-1...what other hashes would you like to see as a part of the main DLL?

Requires: AutoIt v3.2.1.0 + (not recommended due to memory leak)
Requires: AutoIt v3.2.1.1 + (recommended)

I have had a request for the SHA and/or MD5 to be broken out so that the DLL files are smaller. I have re-written my project, and have now made it available that if you only want one or the other you can download just those .dll files.

I have changed the name of the f-shash.dll due to the forum renaming it to f_shash.dll. The new main dll file will now be FSHash.dll.

DLL Files
FSHash.dll (217 Total Previous Downloads)
MD5Hash.dllSHAHash.dll
Example Files
FSHash_Example.au3 (369 Total Previous Downloads)
MD5Hash_Example.au3SHAHash_Example.au3
Source Files
FSHash.zip (1626 Total Previous Downloads)
(Note: All files are included in source including the Code::Blocks project files.)

Further edits to this post will be noted.

Edit01: Released all DLL's and source code under the LGPL license.

If you have any questions, comments, or critisisms please let me know by responding to this thread.

Thanks,
JS

Edited by JSThePatriot

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

it craches autoit (with an tell microsoft error) when it tries to free your string from the heap...

code:

00440E67 FF15 C4E94600 CALL NEAR DWORD PTR DS:[46E9C4] ; ntdll.RtlFreeHeap

stack:

0012F920 003D0000 |Arg1 = 003D0000

0012F924 00000000 |Arg2 = 00000000

0012F928 003353D0 \Arg3 = 003353D0 ASCII "120EA8A25E5D487BF68B5F7096440019"

maby a bug in autoits plugin code ?

WINXP HOME SP2

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

I know I stated some time ago that I would make my efforts to include MD5 Hash into an AutoIt plugin after it didnt make inclusion into the main stream of things. I have finally gotten around to it. Please let me know of any errors you have or any comments and suggestions you have to further enable it.

I do plan on in the future adding SHA-1 to the same plugin as that would make it more useful, and wouldnt bloat the size by much.

Files:

Source:

Let me know what you think. The .zip file also includes the .dll and .au3 example file.

Thanks,

JS

Fine, but you get a autoit/plugin crash when the file is not found :lmao:
Link to comment
Share on other sites

@jpm & @w0uter

I appreciate the feedback. I knew there were things I was missing.

I cant believe I missed the error checking. I had actually worked on this a while back, and I thought it was finished (my tests worked hehe)

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I can't wait to see how it performs against the VBCode and AU3 converted code! Thanks for your hard work, I hope whatever bugs you have left to fix won't be that hard to find.

I doubt they will be hard to find, but with my limited C++ :lmao: it may just take me a bit to figure out the best way I know how to absolve the problem.

I have already added error checking to my .dll now, but I still need to check to see if the string passed to the file is indeed a file. That is my next step.

Please let me know how it all compares. I want to make sure I am 100% accurate. Which with all of my tests thus far I have been.

Thanks for the rapid input,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

@JSThePatriot, a simple way to get it working is to replace

return NULL;
wth
return "";
in FileMD5Encrypt(char* sFilename).

This is in the module JSmd5.cpp

The original line returns a NULL as address. If you try to copy the string later then it tries to copy from address NULL and that generates a trap.

The second option returns a pointer to an empty string ('\0' character), then the copy function just copies the empty string and that works.

I have tested your code with Dev-C++.

Nice work :lmao:

Fixed a number of typo's

Edited by Dickb
Link to comment
Share on other sites

i got error he dont know what PluginOpen() is in example ... i has do some stupids? ^^ forgot to make that ? wtf is pluginopen /

You must be using the AutoIt Beta. I am sorry I didnt mention that in my first post. I will make sure I go back and do that.

@JSThePatriot, a simple way to get it working is to replace

return NULL;
wth
return "";
in FileMD5Encrypt(char* sFilename).

This is in the module JSmd5.cpp

The original line returns a NULL as address. If you try to copy the string later then it tries to copy from address NULL and that generates a trap.

The second option returns a pointer to an empty string ('\0' character), then the copy function just copies the empty string and that works.

I have tested your code with Dev-C++.

Nice work :lmao:

Fixed a number of typo's

Thank you for letting me know that. I was working on trying to make sure it had a valid path. I hadnt even worked back into my JSmd5.cpp code yet. I wrote that code quite some time ago.

I will get that fixed right away and repost in the first post the updated version.

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

This is just a quick solution to keep Dr Watson away.

You probably should return a @error code when the file is not found.

But I leave that up to you. :lmao:

(Oops, another typo fixed)

Edited by Dickb
Link to comment
Share on other sites

This is just a quick solution to keep Dr Watson away.

You probably should return a @error code when the file is not found.

But I leave that up to you. :lmao:

(Oops, another typo fixed)

Yea that is what I have been trying to work on, but it doesnt seem to want to work for me. I'll keep hacking at it until it I get something working the way it should.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Updated original post with updated plugin that doesnt crash on no file.

Next step is to generate error codes... I cant seem to get it working yet. I wont give up though :lmao:. I need to finish this up so I can then proceed to write a tutorial on Plug-in's. I think more people would write useful plugins if they had the knowledge.

Please continue to let me know of bugs, comments, suggestions.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

autoit still hard-craches here.

What is it you are doing when it hard crashes? Just running my Example script?

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

yup.

-> pluginopen

-> stringhash

-> autoit tries to free your string or something & hardcrashes

What beta version are you running? I cant get it to recreate the problem on my system :-/ I am using version .100.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

What beta version are you running? I cant get it to recreate the problem on my system :-/ I am using version .100.

JS

I am in the same situation as w0uter hard crash with the lastest version.can you include the .dsw .dsp you use to compile the dll so I can try to help you :lmao:
Link to comment
Share on other sites

I am in the same situation as w0uter hard crash with the lastest version.can you include the .dsw .dsp you use to compile the dll so I can try to help you ;)

Sure thing :lmao:... I appreciate that. I will have to wait until I get home. I just got a new laptop, and I have yet to transfer my files.

I am using Dev's C++ so it will be a .dev.

Thanks,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Sure thing :lmao:... I appreciate that. I will have to wait until I get home. I just got a new laptop, and I have yet to transfer my files.

I am using Dev's C++ so it will be a .dev.

Thanks,

JS

here is my contribution to fix the crash with the first source you delivered. it has been compiled with VC6 as I am not an expert in dll building it has a bigger size. ;)
Link to comment
Share on other sites

here is my contribution to fix the crash with the first source you delivered. it has been compiled with VC6 as I am not an expert in dll building it has a bigger size. :lmao:

I looked at the code. That looks good. I tried to come up with something similiar before, but I couldnt figure out how to be sure it was a real file that was being input. I apprecaite it. I am still in process of changing laptops, so hopefully I will make the changes on my release. Thanks for the help as always. I am always learning from your input.

I will update when I get all the programs and files on this laptop.

Thanks everyone...

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...