MD5 + SHA1 calculator

Discuss and share scripts and script files...
Post Reply
40k
Posts: 234
Joined: 09 Dec 2011 21:25

MD5 + SHA1 calculator

Post by 40k » 07 Aug 2012 14:40

Hi guys,

I do a lot of torrenting and thus find myself often times having to crosscheck check-sums. I used the FCIV command line tool by Microsoft up until now. Until I discovered that XYplorer can do this too. So I wrote a crude script (not a coder at all) that will calculate the MD5 en SHA1 sums for all the files you have currently selected. Results are neatly displayed in a text box.

If you think you can clean up the code please be my guest! Also I attached a screenshot!

Code: Select all

$a = get("SelectedItemsPathNames",|,a);
 $textreport = "";
 foreach($file,$a)
 {
 $checkmd5 = hash("md5",$file,1);
 $checksha1 = hash("sha1",$file,1);
 $hashedfilename = gettoken($file,-1,\);
 $textreport = $textreport . $hashedfilename <crlf>MD5   : . $checkmd5 . <crlf> . "SHA-1 :" . $checksha1 . <crlf> . <crlf>; 
 }
 text $textreport;

Attachments
Untitled.jpg
Untitled.jpg (441.05 KiB) Viewed 1153 times
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

highend
Posts: 9358
Joined: 06 Feb 2011 00:33

Re: MD5 + SHA1 calculator

Post by highend » 07 Aug 2012 14:55

Code: Select all

<crlf> . <crlf>

Code: Select all

<crlf 2>
Nothing more to cleanup ;)
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Post Reply