/
hash.cmd
62 lines (61 loc) · 1.62 KB
/
hash.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
setlocal ENABLEDELAYEDEXPANSION
set input=%1
rem echo %input%
set l=3
set c=0
for /f "delims=" %%1 in ('NTHASH-win64.exe /stringtohexa /input:%input%') do (
rem set /a c+=1 && if "!c!" equ "%l%" echo %%1%
set /a c+=1 && if "!c!" equ "%l%" set ret=%%1%
rem above no loger works, dirty hack below
set ret=%%1%
)
echo %ret%
set l=3
set c=0
echo MD2
for /f "delims=" %%1 in ('NTHASH-win64.exe /gethash /mode:MD2 /input:%ret%') do (
set /a c+=1 && if "!c!" equ "%l%" echo %%1%
rem above no loger works, dirty hack below
echo %%1
)
set l=3
set c=0
echo MD4
for /f "delims=" %%1 in ('NTHASH-win64.exe /gethash /mode:MD4 /input:%ret%') do (
set /a c+=1 && if "!c!" equ "%l%" echo %%1%
rem above no loger works, dirty hack below
echo %%1
)
set l=3
set c=0
echo MD5
for /f "delims=" %%1 in ('NTHASH-win64.exe /gethash /mode:MD5 /input:%ret%') do (
set /a c+=1 && if "!c!" equ "%l%" echo %%1%
rem above no loger works, dirty hack below
echo %%1
)
set l=3
set c=0
echo SHA1
for /f "delims=" %%1 in ('NTHASH-win64.exe /gethash /mode:SHA1 /input:%ret%') do (
set /a c+=1 && if "!c!" equ "%l%" echo %%1%
rem above no loger works, dirty hack below
echo %%1
)
set l=3
set c=0
echo SHA256
for /f "delims=" %%1 in ('NTHASH-win64.exe /gethash /mode:SHA256 /input:%ret%') do (
set /a c+=1 && if "!c!" equ "%l%" echo %%1%
rem above no loger works, dirty hack below
echo %%1
)
set l=3
set c=0
echo SHA512
for /f "delims=" %%1 in ('NTHASH-win64.exe /gethash /mode:SHA512 /input:%ret%') do (
set /a c+=1 && if "!c!" equ "%l%" echo %%1%
rem above no loger works, dirty hack below
echo %%1
)