Sign in to follow this  
Followers 0
forger

Md5sum.c To Md5sum.au3

10 posts in this topic

Can someone tell me if it's possible to create an au3 script from the md5sum.c (c code) I attached?

A simple yes/no would be enough, but if anyone wishes to take the lead, please do, because I haven't still grabbed a C book in my hands :think:

md5sum.zip

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

There's no need to convert it, simply use search and "md5".

Look at my attachment - possibly it's what you're looking for.

MD5.au3

Edited by rysiora

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Well, that solves it. Thanks, I couldn't find this one!

Edit: Because it's a bit big for me, can you tell me whether it has any dependencies?

Edit 2: "This class is used to generate an MD5 ;digest; or ;signature; of a string" - No support for file md5 calculation? :think:

Edited by forger

Share this post


Link to post
Share on other sites

You could try loading the file into a binary string and passing it to the function


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

I created a plugin that you may find useful.

MD5 Hash Plug-in

Let me know if you have any questions or concerns,

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)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You could try loading the file into a binary string and passing it to the function

Erm, can you be more specific? Is this in a help subject?

@JSThePatriot: Thanks mate, I'll bear that in mind if I can't work the solution on my own (and I guess that will be possibly the end of it :think: )

Edited by forger

Share this post


Link to post
Share on other sites

I haven't worked with binary strings in AutoIt, but hopefully this will work (let me know if it does, I could use the code below myself :think:)

$var = BinaryString(FileRead($fileName))
$output = MD5String($var)

Msgbox(0, 'test complete', $output)

Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

oh yeah! It WORKS :(

You just saved me bandwidth :)

It takes a while to generate it, but it works!

Edit: I tested an exe without using the BinaryString and it still works

Edited by forger

Share this post


Link to post
Share on other sites

This is a job you want to leave in C. (ie. a compiled DLL)

Unless speed really isn't a factor.

-mu

ps. JSThePatriot, any chance of the SHA1 algo making it into your quite excellent md5 plugin? :)

Share this post


Link to post
Share on other sites

This is a job you want to leave in C. (ie. a compiled DLL)

Unless speed really isn't a factor.

-mu

ps. JSThePatriot, any chance of the SHA1 algo making it into your quite excellent md5 plugin? :)

I am hoping to put that in sometime within the next few months. It really depends on how my job situation continues... Have to get this darn money flow coming in greater than going out :D.

Oh who needs money anyways? :oops::(

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)

Share this post


Link to post
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
Sign in to follow this  
Followers 0