[Script] HashTools 1.0 Beta3 - January 8, 2015

Discuss and share scripts and script files...
Post Reply
Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

[Script] HashTools 1.0 Beta3 - January 8, 2015

Post by Enternal »

HashTools.xys
Beta 3 - January 8, 2015
(14.5 KiB) Downloaded 496 times
HashTools.xys
Beta 2 - December 26, 2014
(12.56 KiB) Downloaded 238 times
HashTools.xys
Beta 1 - December 23, 2014
(8.44 KiB) Downloaded 223 times
HashTools 1.0 Beta3
* Now supports creation and verification of SFV (crc32) hash files.
* All functions support folders and subfolders EXCEPT "Hash Checker (Fast)..." for obvious reasons.
HashTools 1.0 Beta2
* Fixed credits (wrongfully credited Filehero)
* Fixed "Append Hash to Filename". Wrongfully appended hash to the extension of the file.
* Cleaned up and changed some CSS (it was not fully valid).
* Add "Remove Hash From Filename". NOTE: It removes ALL hashes that are present in the filename.
* Add some more condition checking.
* Add "Create Hash File". Creates md5sum compatible format.
* Add "Verify Hash File".
* Add code to make it possible to integrate hashfile verification and creation using Portable File Associations.

Various quick Hashing tools. I had a bit of fun with this one as you will soon tell :whistle:

Anyway, I have to thanks 40k since a nice chunk of the code came from his own Hashing script which is only then heavily/moderately modified by me. :biggrin:
40k's Hashing Script: http://xyplorer.com/xyfc/viewtopic.php?f=7&t=9220

What Function Does It Has?
02.png
02.png (6.47 KiB) Viewed 3694 times
[Hash] Pretty much the same function as 40k's hash script. I barely did anything to it. I did however use some Regex to get rid of unwanted empty blank lines. If I can only get that wrapping function to work propertly (filed a bug report), it should look simply like:
01.png
01.png (257.37 KiB) Viewed 3694 times
[Hash Checker (Fast) - Specific File and Hash] So what this does is if you know the Hashing algorithm and value and you simply wanted to check whether a file matches up with it, use this function. It does not allow you to pick multiple files but in turn, it's much quicker since it will only hash 1 file and only hash using 1 algorithm.
03.png
03.png (42.4 KiB) Viewed 3694 times
04.png
04.png (154.83 KiB) Viewed 3694 times
[Hash Checker (Slow) - Multiple Files and Hashes] This is also based on 40k's hashing script. What it does is allow you to easily copy a bunch of hash values/checksums without worrying about other random text data and the script will tell you if any of the hashes/checksums match up. There's also visual feedback about whether the the items are matching up or not with any of the pasted hashes. The one with the hashes that are matching up are emphasized.
05.png
05.png (209.08 KiB) Viewed 3694 times
06.png
06.png (309.08 KiB) Viewed 3694 times
[Append Hash To Filename] Don't know how exactly useful this is but since I'm into Japanese pop culture, quite a bit of content are usually downloaded with checksums in their names. I'm also basically mimicking RapidCRC since it allows you to insert CRC checksums directly into the filename. This script function does the same thing and it will automatically use underscores or spaces depending on the filename to at least keep it consistent. Furthermore, you're not limited to CRC and can add any other hashes into the filename.
07.png
07.png (7.24 KiB) Viewed 3694 times
08.png
08.png (40.62 KiB) Viewed 3694 times
09.png
09.png (215.18 KiB) Viewed 3694 times
[Verify Using Filename Inline Hash] This goes in hand with the appending hash into the filename. All this does is simply use the hashes that it finds in the filename and then see if the content and the hash match up. It's smart enough so it can handle any hashes and checksums that are between normal square brackets, curly braces, and parenthesis. Furthermore, if more than 1 hash/checksum exists in the file name, it will automatically go for the longest checksum and use that to compare.
10.png
10.png (74.63 KiB) Viewed 3694 times
11.png
11.png (194.96 KiB) Viewed 3694 times
12.png
12.png (4.72 KiB) Viewed 3694 times
13.png
13.png (24.65 KiB) Viewed 3694 times
Setup
Download the script and copy it into <xyscripts> and do whatever you need with it. Nothing else to say.

The script can also be loaded using PFA to create and verify any md5, sha1, sha256, and sha512 hash files using:

Code: Select all

+"Create Hashfile With HashTools" *>::Load HashTools, "_HashFileCreate";
+"Verify With HashTools" sfv;md5;sha1;sha256;sha512>::Load HashTools, "_HashFileVerify";
Anyway, I'm not really sure if some of the regex I use is good enough but it seems to do the job. Anyway, yeah I had a bit of fun there with all those screenshots as you can tell :whistle:
Anyway, it's still beta since I need more testing and also some tweaking of the CSS that I used for the puuurrttty looks (at least in my eyes). Also proud that it's fully HTML5 validated. Hehe.
Last edited by Enternal on 09 Jan 2015 07:18, edited 6 times in total.

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: [Script] HashTools 1.0 Beta2 - December 26, 2014

Post by Enternal »

Ok, you can now remove hashes from file names similarly to how you can add them to filenames. Do take note that this removes ALL hashes that are currently in the file name.

The script can also now generate md5sum compatible files for not only md5 files but also for sha1, sha256, and sha512. It can generate hashfiles and it can also now verify hash files for all hashing algorithms (make sure the files have an extension of *.md5, *.sha1, *.sha256, or *.sha512). The script can also be loaded using PFA to create and verify any md5, sha1, sha256, and sha512 hash files using:

Code: Select all

+"Create Hashfile With HashTools" *>::Load HashTools, "_HashFileCreate";
+"Verify With HashTools" md5;sha1;sha256;sha512>::Load HashTools, "_HashFileVerify";
Unlike the Verify Inline Hashes function or the Hashing and Hash Checking functions, the hashfile generation and verification can indeed handle directories by recursively going through them. I will add this later to the other functions but the main reason why I'm hesitating in the first place is if someone accidentally starts hashing folders with many many files or very large in size.

I think this is pretty much feature complete now. I still need to fix and optimize a couple things. Check it and see how it performs for you.

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: [Script] HashTools 1.0 Beta2 - December 26, 2014

Post by 40k »

Looks great Eternal! :appl:

Thanks for the credit.
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

Got Some Question
Posts: 11
Joined: 01 Jul 2014 15:07

Re: [Script] HashTools 1.0 Beta2 - December 26, 2014

Post by Got Some Question »

Hi Really nice its the first script i use and its much easier then i thought:)
there are more options to verify a file: https://tails.boum.org/download/index.en.html
maybe something for the future:P but i have really no idea what is possible with scripts so i am happy with everything what is written by the smart guys:)
Thnx for this one really great.

Enternal
Posts: 1174
Joined: 10 Jan 2012 18:26

Re: [Script] HashTools 1.0 Beta2 - December 26, 2014

Post by Enternal »

HashTools Beta3 Uploaded! It now:
* Now supports creation and verification of SFV (crc32) hash files.
* All functions support folders and subfolders EXCEPT "Hash Checker (Fast)..." for obvious reasons.

Make sure you update your PFA if you use it.

Code: Select all

+"Create Hashfile With HashTools" *>::Load HashTools, "_HashFileCreate";
+"Verify With HashTools" sfv;md5;sha1;sha256;sha512>::Load HashTools, "_HashFileVerify";
Got Some Question wrote:Hi Really nice its the first script i use and its much easier then i thought:)
there are more options to verify a file: https://tails.boum.org/download/index.en.html
maybe something for the future:P but i have really no idea what is possible with scripts so i am happy with everything what is written by the smart guys:)
Thnx for this one really great.
Thank you! For those verification above, it's a bit more complicated and I simply want to write a script that already features hashing algorithms that are built-in. So I won't be adding those... sorry.

Post Reply