How file checksum test with SHA1 checksum in file name?

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

How file checksum test with SHA1 checksum in file name?

Post by *theosdikaios »

I got a lot of files from internet with the SHA1 checksum in their file name.
e.g.
TOTALCMD.EXE
goes to
TOTALCMD_bf35fc98545e479aef9711387bf1f21e698c2543.EXE

TC can create such file names very easily with the help of the fine content plugin wdHash.

But how this checksum can be tested in an easy way?
Any ideas? Do somebody knows a tool?

TIA.
"Since there are many things which have never happened and never will happen,
and which nevertheless are clearly conceivable, and imply no contradiction,
how can one say they are absolutely impossible?" Leibniz
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

theosdikaios wrote:Any ideas? Do somebody knows a tool?
http://www.totalcmd.net/plugring/checksum.html
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

Post by *theosdikaios »

2Flint
Thx but the 'checksum' plugin can create a SHA1 checksum only. wdHash does it too.

But I look for a tool which is able to check the file with the checksum given in the file name. I have hundreds of such files and I wanna know if the files are already ok.
"Since there are many things which have never happened and never will happen,
and which nevertheless are clearly conceivable, and imply no contradiction,
how can one say they are absolutely impossible?" Leibniz
User avatar
nsp
Power Member
Power Member
Posts: 1913
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

But how this checksum can be tested in an easy way?
Any ideas? Do somebody knows a tool?
If you already have an sha file or an sfv file, you can use the checksum plugin or a command line tool like fsum.

If you want to automate the checking and the generation of a checksum file, you can use TCBL and the regexp.wdx :

(Dowload and unzip regexp wdx in)
change the header like :
[Regexp]
Rule=SHA1

add a rule like :
[SHA1]
Find="_(.{40})\."
Change="$1"
Substitute=1

Download TCBL with embedded super_wdx.... (http://tccfestuff.free.fr/)

get fsum command line (http://www.slavasoft.com/fsum/)

add a custom command in Tcbl.ini
[shaVerif]
; Start the section
pre=@echo ; start at $T > shaSum.txt

; Command script
cmd=@echo $!%Result@regexp.wdx%$! ?SHA1*$f >>shaSum.txt

; Finalization part
end=c:\MyTools\fsum.exe -c shaSum.txt >ResultFileShaSum.txt
end=notepad ResultFileShaSum.txt
end=del shaSum.txt
end=del ResultFileShaSum.txt

....... And add a TC Button ....
command : c:\tc-Tools\tools\tcbl.exe
parameter: -qi %L shaVerif
...

It is done ! (but not so easily !!!)
If TC had operators between wdx plugin it could have been done using the search for file and compare the regex substring and the wdhash result !
User avatar
Flint
Power Member
Power Member
Posts: 3506
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

theosdikaios wrote:But I look for a tool which is able to check the file with the checksum given in the file name.
I missed this point. The plugin I pointed to allows to check SHA checksums if they are in separate file. For example, there is a file totalcmd.exe and a checksum file totalcmd.sha with contents
bf35fc98545e479aef9711387bf1f21e698c2543 *TOTALCMD.exe
Then you just perform "Test archive" over this SHA file and the plugin checks if the checksum of the file totalcmd.exe is correct.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
Post Reply