Skip to content

Commit 9af1f1b

Browse files
add halfmd5 -m 5100 from PR #20
Merge pull request #20 from cyclone-github/dev
2 parents 1a8eb4d + cfac113 commit 9af1f1b

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### v1.2.2; 2026-01-23
2+
```
3+
added mode: halfmd5 (hashcat -m 5100)
4+
updated -help
5+
```
16
### v1.2.1; 2025-12-08
27
```
38
added mode: morsedecode (Morse Code decoder)

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
# hashgen - Cyclone's hash generator
1010
```
1111
$ hashgen -m md5 -w rockyou.txt -b
12-
2025/08/23 19:18:27 Starting...
13-
2025/08/23 19:18:27 Processing file: rockyou.txt
14-
2025/08/23 19:18:27 Hash function: md5
15-
2025/08/23 19:18:27 CPU Threads: 16
16-
2025/08/23 19:18:28 Finished processing 14344391 lines in 0.465 sec (30.839 M lines/sec)
12+
2026/01/23 11:44:20 Starting...
13+
2026/01/23 11:44:20 Processing file: rockyou.txt
14+
2026/01/23 11:44:20 Hash function: md5
15+
2026/01/23 11:44:20 CPU Threads: 16
16+
2026/01/23 11:44:20 Finished processing 14344391 lines in 0.460 sec (31.215 M lines/sec)
1717
```
18-
**As of the this writing, hashgen (go) has a 2,519% faster md5 hashrate vs the next fastest publicly available CPU based hash generator (see benchmarks).** While this is extremely fast, these hashrates can be beat by improved code optimization and/or coding in faster programming languages (I'm looking at you C, Rust and Zig).
19-
20-
Since version `v2023-10-30.1600`, hashgen has a top recorded hasharate of 30,228,048 md5/sec on the test rig's Ryzen 7 3700X CPU! Much faster hashrates have been seen on higher end CPU's.
18+
**As of the this writing, hashgen (go) has a 2,519% faster md5 hashrate vs the next fastest publicly available CPU based hash generator (see benchmarks).** Since version `v2023-10-30.1600`, hashgen has a top recorded hasharate of 30,228,048 md5/sec on the test rig's Ryzen 7 3700X CPU! Much faster hashrates have been seen on higher end CPU's.
2119

2220
Hashgen is a CLI hash generator written in Go and can be cross compiled for Linux, Raspberry Pi, Windows & Mac, although testing and compiling is mainly done on debian 12 linux.
2321

@@ -77,6 +75,7 @@ To use hashgen, type your mode, wordlist input & hash output files with a simple
7775
| **`MDx`** | |
7876
| md4 | 900 |
7977
| md5 | 0 |
78+
| halfmd5 | 5100 |
8079
| md5passsalt | 10 |
8180
| md5saltpass | 20 |
8281
| md5md5 | 2600 |

hashgen.go

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,13 @@ v1.2.0; 2025-11-08
6767
updated yescrypt parameters to match debian 12 (libxcrypt) defaults
6868
v1.2.1; 2025-12-08
6969
added mode: morsedecode (Morse Code decoder)
70+
v1.2.2; 2026-01-23
71+
added mode: halfmd5 (hashcat -m 5100)
72+
updated -help
7073
*/
7174

7275
func versionFunc() {
73-
fmt.Fprintln(os.Stderr, "hashgen v1.2.1; 2025-12-08\nhttps://github.com/cyclone-github/hashgen")
76+
fmt.Fprintln(os.Stderr, "hashgen v1.2.2; 2026-01-23\nhttps://github.com/cyclone-github/hashgen")
7477
}
7578

7679
// help function
@@ -80,7 +83,7 @@ func helpFunc() {
8083
"\n./hashgen -m md5 -w wordlist.txt -o output.txt\n" +
8184
"./hashgen -m bcrypt -cost 8 -w wordlist.txt\n" +
8285
"cat wordlist | ./hashgen -m md5 -hashplain\n" +
83-
"\nAll Supported Options:\n-m {mode}\n-w {wordlist input}\n-t {cpu threads}\n-o {wordlist output}\n-b {benchmark mode}\n-cost {bcrypt, default=10}\n-hashplain {generates hash:plain pairs}\n" +
86+
"\nAll Supported Options:\n-m {mode}\n-w {wordlist input}\n-t {cpu threads}\n-o {wordlist output}\n-b {benchmark mode}\n-cost {bcrypt, default=10}\n-hashplain {generates hash:plain pairs}\n-help {displays help}\n-version {displays version info}\n" +
8487
"\nIf -w is not specified, defaults to stdin\n" +
8588
"If -o is not specified, defaults to stdout\n" +
8689
"If -t is not specified, defaults to max available CPU threads\n" +
@@ -104,12 +107,9 @@ func helpFunc() {
104107
"crc64\n" +
105108
"hex\t\t(encode to $HEX[])\n" +
106109
"dehex/plaintext\t99999\t(decode $HEX[])\n" +
107-
"keccak-224\t17700\n" +
108-
"keccak-256\t17800\n" +
109-
"keccak-384\t17900\n" +
110-
"keccak-512\t18000\n" +
111110
"md4\t\t900\n" +
112111
"md5\t\t0\n" +
112+
"halfmd5\t\t5100\n" +
113113
"md5passsalt\t10\n" +
114114
"md5saltpass\t20\n" +
115115
"md5md5\t\t2600\n" +
@@ -144,6 +144,10 @@ func helpFunc() {
144144
"sha3-256\t17400\n" +
145145
"sha3-384\t17500\n" +
146146
"sha3-512\t17600\n" +
147+
"keccak-224\t17700\n" +
148+
"keccak-256\t17800\n" +
149+
"keccak-384\t17900\n" +
150+
"keccak-512\t18000\n" +
147151
"wpbcrypt\t(WordPress bcrypt-HMAC-SHA384)\n" +
148152
"yescrypt\t(Linux shadow $y$)\n"
149153
fmt.Fprintln(os.Stderr, str)
@@ -982,6 +986,11 @@ func hashBytes(hashFunc string, data []byte, cost int) string {
982986
h := md5.Sum(data)
983987
return hex.EncodeToString(h[:])
984988

989+
// halfmd5 -m 5100
990+
case "halfmd5", "5100":
991+
h := md5.Sum(data)
992+
return hex.EncodeToString(h[:8])
993+
985994
// -m 10 md5(pass.salt), -m 20 md5(salt.pass)
986995
case "10", "md5passsalt", "20", "md5saltpass":
987996
salt, ok := makeSaltHex()

0 commit comments

Comments
 (0)