Jump to content

MD5 Hash Plug-in SHA-1


JSThePatriot
 Share

Recommended Posts

Thanks alot it works great. Using it and and some other code I found at this wonderful forum, I was able to make an installer that after it is installed you can right click on any file and say MD5 This file. Then a dialog window opens and you choose the second file and it will tell you if the two are the same.

It needs alot of work but I have it here if any one is interested. http://hooovahh.googlepages.com/md5installer.exe

Thanks again.

Link to comment
Share on other sites

  • Replies 110
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Has something changed in the latest beta? This plugin doesn't work for me anymore. :D

For $i = 2 To $var[0]
    MD5Check($var[1] & '\' & $var[$i])
    msgbox(0,"Test","MD5 Hash = "&$md5File)
Next

Func MD5Check($file)
    FileInstall("files\f-shash.dll",@TempDir&"\f-shash.dll")
    $plHND = PluginOpen(@TempDir&"\f-shash.dll")
    $md5File = FileHash($file)
EndFunc

Can anyone confirm if it works in the latest beta 3.1.1.126?

Or is there something I must change in my code?

Link to comment
Share on other sites

Has something changed in the latest beta? This plugin doesn't work for me anymore. :D

For $i = 2 To $var[0]
    MD5Check($var[1] & '\' & $var[$i])
    msgbox(0,"Test","MD5 Hash = "&$md5File)
Next

Func MD5Check($file)
    FileInstall("files\f-shash.dll",@TempDir&"\f-shash.dll")
    $plHND = PluginOpen(@TempDir&"\f-shash.dll")
    $md5File = FileHash($file)
EndFunc

Can anyone confirm if it works in the latest beta 3.1.1.126?

Or is there something I must change in my code?

I have just upgraded to 3.1.1.126, and everything worked great for me.

One thing you may try is... You dont have a global variable defined for $md5File which means it stays in that function. Another thing would be, you never closed the plugin.

Global $md5File

For $i = 2 To $var[0]
    MD5Check($var[1] & '\' & $var[$i])
    msgbox(0,"Test","MD5 Hash = " & $md5File)
Next

Func MD5Check($file)
    FileInstall("files\f-shash.dll",@TempDir & "\f-shash.dll")
    $plHND = PluginOpen(@TempDir & "\f-shash.dll")
    $md5File = FileHash($file)
    PluginClose($plHND)
EndFunc

Let me know how the above suggestions work out for you. I have no troubles with the .dll.

Thanks for using it,

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

  • 4 weeks later...

@Everyone...

I have just started using another IDE to edit and compile source code. Code::Blocks

It compiles the DLL perfectly without errors or warning.

I am going to create the SHA part of the dll now. I am also going to look into the other hash that Jon made mention of before.

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

Global $testtime=1000
$plh=PluginOpen("f_shash.dll")
$i=0
$t2=TimerInit()
while (TimerDiff($t2)<$testtime)
StringHash("abcd")
$i=$i+1
wend
PluginClose($plh)
MsgBox(0,"Results","In "&$testtime&" ms, Hash() got called "&$i&" times ")

produces a hard-crash with AutoIt beta 128...The .dll is the exact one given for download..

(AppName: autoit3.exe AppVer: 3.1.1.128 ModName: ntdll.dll

ModVer: 5.1.2600.0 Offset: 000021a3)

Edited by VicTT
Quote

Together we might liveDivided we must fall

 

Link to comment
Share on other sites

Global $testtime=1000
$plh=PluginOpen("f_shash.dll")
$i=0
$t2=TimerInit()
while (TimerDiff($t2)<$testtime)
StringHash("abcd")
$i=$i+1
wend
PluginClose($plh)
MsgBox(0,"Results","In "&$testtime&" ms, Hash() got called "&$i&" times ")

produces a hard-crash with AutoIt beta 128...The .dll is the exact one given for download..

(AppName: autoit3.exe AppVer: 3.1.1.128 ModName: ntdll.dll

ModVer: 5.1.2600.0 Offset: 000021a3)

I am getting an error as well. :wacko: Thats not good. I will ask if anything has changed in the plugin department. I looked over the notes history, and havent seen any changes. Never hurts to ask.

Was it working with .127? I know it was with .126 as that is what I had before I updated to .128 to check your problem :D

Thanks for pointing this out,

JS

P.S. still working on the SHA source code.

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 just tested with .129, and with .128. My only problem was I didnt have the .dll in the right spot (same directory as the script).

BTW the script you had got me 19843 Hash() in 1000ms. :D (It varies each time as well)

If you are still having troubles let me know. Please provide more information like try running the script in SciTE and let me know what errors you get.

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

Thanks alot it works great. Using it and and some other code I found at this wonderful forum, I was able to make an installer that after it is installed you can right click on any file and say MD5 This file. Then a dialog window opens and you choose the second file and it will tell you if the two are the same.

It needs alot of work but I have it here if any one is interested. http://hooovahh.googlepages.com/md5installer.exe

Thanks again.

Sorry Hoovah....but you're not bloody likely to get anyone to download your program unless you post the source and let us compile from scratch.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Sorry Hoovah....but you're not bloody likely to get anyone to download your program unless you post the source and let us compile from scratch.

I agree totally.

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

>Running:(3.1.1.130):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\New Folder\asd.au3" 
C:\Documents and Settings\Administrator\Desktop\New Folder\asd.au3 (2) : ==> Unknown function name.: 
$md5String = StringHash("This is a test.") 
$md5String = ^ ERROR
+>AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 2.786

AutoIt beta 130

-jaenster

Link to comment
Share on other sites

>Running:(3.1.1.130):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Documents and Settings\Administrator\Desktop\New Folder\asd.au3" 
C:\Documents and Settings\Administrator\Desktop\New Folder\asd.au3 (2) : ==> Unknown function name.: 
$md5String = StringHash("This is a test.") 
$md5String = ^ ERROR
+>AutoIT3.exe ended.rc:0
>Exit code: 0   Time: 2.786

AutoIt beta 130

It either cant find the plugin or cannot open it. Do you have the plugin in the same directory as the script file?

Is the above the same error in the same code as previously posted?

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

  • 4 weeks later...

I know this has been long over due, but its finally here!

MD5 and SHA-1 Are finally both included in this plugin!!!!

Goto the first post for the downloads.

Syntax is now as follows.

StringHash("String", 1 or 2[, True or False)

FileHash("Filename", 1 or 2[, True or False)

1 = MD5

2 = SHA-1

Thanks for your continued support!

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

Error checking has been added, and the example file has been updated. DLL is updated with the newest version of the SDK. We now no longer have to skirt around integers.

;--------------------------------------------
;============== Error Values ================
;--------------------------------------------
;@error = 1                     First parameter isnt a string
;@error = 1 and @extended = 1   First parameter isnt a file **FileHash ONLY**
;@error = 2                     Second parameter isnt an integer
;@error = 2 and @extended = 1   Second parameter isnt 1 or 2 (improper value)
;@error = 3                     Third parameter isnt an integer

Let me know if you have any errors or problems.

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

  • 2 weeks later...

I have re-written the first post entirely since I have had to re-write the entire project due to my allowing it to get a bit messy.

I have updated the DLL with the newest SDK. The release version will still run the plugin, but it has a memory leak, so it is recommended to just use the beta version.

I have split the project up for those that want the file sizes to be smaller and just want a small feature set. See the first post and source.

I appreciate everyone's support so far on this project and would love it if you would continue to let me know if you have any questions or anything.

Thank you to everyone that has contributed, and helped.

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

Sorry I'll get on that.

I do appreciate you creating an installer that does what it does with my plugin. :P Make sure you include the lastest updates...

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

Excellent work - however, I need to run an MD5 check against a large file (XP SP2 ~270MB).

Using the plug-in method it takes my PC approx. 25secs; using FSum (a free util - see http://www.slavasoft.com/fsum/index.htm) - it takes around 15secs.

[NB With smaller file sizes, the time difference is negligible].

I'm not wishing to detract from what you've achieved - & there are no doubt differences in suitability between FSum & your plug-in(s) - but thought it might be useful to point out, especially if working with large files & speed is important.

Example code:

I simply commented-out one section then the other & compared how long the script took to complete.

#compiler_plugin_funcs = MD5Hash
; Using XP SP2 .exe ~270MB 
;#cs
$plH = PluginOpen("..\Bin\MD5\MD5Hash.dll")
$md5File=MD5Hash("O:\MSupdate\WindowsXP-KB835935-SP2-ENU.exe", 1, False)
ConsoleWrite($md5File & @CRLF)
PluginClose($plH)
; Takes ~25secs
;#ce

#cs
; SlavaSoft Optimizing Checksum Utility - fsum 2.51. Free - see http://www.slavasoft.com/fsum/index.htm
;   Local $hStdOut=Run(@comspec & " /c O:\MSUpdate\fsum -dO:\MSUpdate -c O:\MSUpdate\xpsp2.md5", "", @SW_HIDE, 2);2=$STDOUT_CHILD
Local $StdOutText = ""
While 1
    $StdOutText = $StdOutText & StdoutRead($hStdOut)
    If @error Then ExitLoop
WEnd
ConsoleWrite(StringTrimLeft($StdOutText,1) & @CRLF)
;   NB If StringLeft(StringStripWS($StdOutText, 8), 2) <> "OK" Then 'it errored'...
; Takes ~15secs
#cs

Cheers,

Pete.

Link to comment
Share on other sites

  • 4 months later...

Ok,

I ran into a little problem,

I am working on authentication/registration with passwords hashed by md5 in php which is stored in a database,

when I use my own script or others that use one time hasing , md5(pass) , there is absolutly no problem, and hashes produced by the plugin and the php are the same,

but now my original purpose is with "vbulletin",

this is supposedly their hashing script :

md5(md5($password) . $vbulletin->userinfo['salt'])

that is

md5(md5(pass).salt)

, where salt is something varaible in the database

so I am trying this way

$hash1 = MD5Hash("pass", 2, True) & "salt"

$hash2 = MD5Hash($hash1, 2, True)

or

$hash = MD5Hash(MD5Hash("pass", 2, True) & "salt", 2, True)

but the result is absolutly different from what is stored in vbulletin's database.

I am suspicious about the "salt" , as it sometimes contains alternative characters, and your plugin might interpret a different way.

Please let me know if there is any solutions for this, cause I need this to work.

BTW, amazin work.

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...