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 »

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 1535 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: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: MD5 + SHA1 calculator

Post by highend »

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

Post Reply