You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+84-14
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,6 @@ OPTIONS
50
50
-? Print this help
51
51
--version Print program version
52
52
-version Print program version
53
-
-type <type> Use hash algorithmn <type>. Types can be chained together as a comma-seperated list.
54
53
-md5 Use md5 hash algorithmn
55
54
-sha1 Use sha1 hash algorithmn
56
55
-sha256 Use sha256 hash algorithmn
@@ -62,10 +61,19 @@ OPTIONS
62
61
-jh384 Use jh-384 hash algorithmn
63
62
-jh512 Use jh-512 hash algorithmn
64
63
-hmac HMAC using specified hash algorithm
64
+
-totp <secret> TOTP code from supplied secret (defaults to google authenticator compatible code).
65
+
-totp <url> TOTP code from supplied otpauth url.
66
+
-digits <n> Produce TOTP code with <n> digits.
67
+
-period <n> Produce TOTP code with period/lifetime of <n> seconds.
65
68
-8 Encode with octal instead of hex
66
69
-10 Encode with decimal instead of hex
67
70
-H Encode with UPPERCASE hexadecimal
68
71
-HEX Encode with UPPERCASE hexadecimal
72
+
-32 Encode with base32 instead of hex
73
+
-base32 Encode with base32 instead of hex
74
+
-c32 Encode with Crockford base32 instead of hex
75
+
-w32 Encode with word-safe base32 instead of hex
76
+
-z32 Encode with zbase32 instead of hex
69
77
-64 Encode with base64 instead of hex
70
78
-base64 Encode with base64 instead of hex
71
79
-i64 Encode with base64 with rearranged characters
@@ -86,52 +94,60 @@ OPTIONS
86
94
-hid Show hidden (starting with .) files
87
95
-hidden Show hidden (starting with .) files
88
96
-f <listfile> Hash files listed in <listfile>
89
-
-i <pattern> Only hash items matching <pattern>
90
-
-x <pattern> Exclude items matching <pattern>
91
-
-X <path> Exclude items listed in file <path>. Items in the file can be wildcards.
92
-
-name <patterns> Only hash items matching a comma-seperated list of shell patterns (-name as in the 'find' command)
97
+
-i <patterns> Only hash items matching a comma-seperated list of shell patterns
98
+
-x <patterns> Exclude items matching a comma-sepearted list of shell patterns
99
+
-X <file> Exclude items matching shell patters stored in <file>
100
+
-name <patterns> Only hash items matching a comma-seperated list of shell patterns (-name aka 'find')
93
101
-mtime <days> Only hash items <days> old. Has the same format as the find command, e.g. -10 is younger than ten days, +10 is older than ten, and 10 is ten days old
94
102
-mmin <mins> Only hash items <min> minutes old. Has the same format as the find command, e.g. -10 is younger than ten mins, +10 is older than ten, and 10 is ten mins old
95
103
-myear <years> Only hash items <years> old. Has the same format as the find command, e.g. -10 is younger than ten years, +10 is older than ten, and 10 is ten years old
96
104
-exec In CHECK or MATCH mode only examine executable files.
97
105
-dups Search for duplicate files.
98
106
-n <length> Truncate hashes to <length> bytes
99
-
-segment <length> Break has up into segments of <length> characters seperated by '-'
107
+
-segment <length> Break hash up into segments of <length> chars seperated by '-'
100
108
-c CHECK hashes against list from file (or stdin)
101
-
-cf CHECK hashes but only show failures
102
-
-C CHECK files against list from file (or stdin) can spot new files
103
-
-Cf CHECK files but only show failures
109
+
-cf CHECK hashes against list but only show failures
110
+
-C <dir>Recursively CHECK directory against list of files on stdin
111
+
-Cf <dir>Recursively CHECK directory against list but only show failures
104
112
-m MATCH files from a list read from stdin.
105
113
-lm Read hashes from stdin, upload them to a memcached server (requires the -memcached option).
106
114
-memcached <server> Specify memcached server. (Overrides reading list from stdin if used with -m, -c or -cf).
107
115
-mcd <server> Specify memcached server. (Overrides reading list from stdin if used with -m, -c or -cf).
108
-
-h <script> Script to run when a file fails CHECK mode, or is found in MATCH mode. (see 'Hookscripts' below)
109
-
-hook <script> Script to run when a file fails CHECK mode, or is found in MATCH mode. (see 'Hookscripts' below)
116
+
-h <script> Script to run when a file fails CHECK mode, or is found in MATCH mode.
117
+
-hook <script> Script to run when a file fails CHECK mode, or is found in FIND mode
110
118
-color Use ANSI color codes on output when checking hashes.
111
119
-strict Strict mode: when checking, check file mtime, owner, group, and inode as well as it's hash
112
120
-S Strict mode: when checking, check file mtime, owner, group, and inode as well as it's hash
113
121
-d dereference (follow) symlinks
114
122
-fs Stay on one file system
123
+
-dir DirMode: Read all files in directory and create one hash for them!
115
124
-dirmode DirMode: Read all files in directory and create one hash for them!
116
125
-devmode DevMode: read from a file EVEN OF IT'S A DEVNODE
117
126
-lines Read lines from stdin and hash each line independantly.
118
127
-rawlines Read lines from stdin and hash each line independantly, INCLUDING any trailing whitespace. (This is compatible with 'echo text | md5sum')
119
128
-rl Read lines from stdin and hash each line independantly, INCLUDING any trailing whitespace. (This is compatible with 'echo text | md5sum')
120
129
-cgi Run in HTTP CGI mode
121
-
-xdialog Run in 'xdialog' (zenity, yad or qarama) mode.
122
-
-dialog-types <types> Specify a list of dialog commands and use the first found on the system. Default is 'yad,zenity,qarma'.
130
+
-cgi Run in HTTP CGI mode
131
+
-xdialog Run in 'xdialog' (zenity, yad or qarama) mode
132
+
-dialog-types <list> Specify a list of dialog commands and use the first found on the system. Default is 'yad,zenity,qarma'
123
133
-iprefix <prefix> String to prefix all input before hashing
124
134
-oprefix <prefix> Prefix to add to the front of output hashes
125
135
-net Treat 'file' arguments as either ssh or http URLs, and pull files over the network and then hash them (Allows hashing of files on remote machines).
126
136
URLs are in the format ssh://[username]:[password]@[host]:[port] or http://[username]:[password]@[host]:[port]..
127
137
-idfile <path> Path to an ssh private key file to use to authenticate INSTEAD OF A PASSWORD when pulling files via ssh.
128
138
-xattr Use eXtended file ATTRibutes. In hash mode, store hashes in the file attributes, in check mode compare against hashes stored in file attributes.
129
-
-txattr Use TRUSTED eXtended file ATTRibutes. In hash mode, store hashes in 'trusted' file attributes. 'trusted' attributes can only be read and written by root.
139
+
-txattr Use TRUSTED eXtended file ATTRibutes. In hash mode, store hashes in 'trusted' file attributes. 'trusted' attributes can only be read and written by root. Under freebsd this menas SYSTEM attributes.
130
140
-attrs comma-separated list of filesystem attribute names to be set to the value of the hash.
131
141
-cache Use hashes stored in 'user' xattr if they're younger than the mtime of the file. This speeds up outputting hashes.
132
142
-u <types> Update. In checking mode, update hashes for the files as you go. <types> is a comma-separated list of things to update, which can be 'xattr' 'memcached' or a file name. This will update these targets with the hash that was found at the time of checking.
133
143
-hide-input When reading data from stdin in linemode, set the terminal to not echo characters, thus hiding typed input.
134
144
-star-input When reading data from stdin in linemode replace characters with stars.
145
+
-xsel Update X11 clipboard and primary selections to the current hash. This works using Xterm command sequences. The xterm resource 'allowWindowOps' must be set to 'true' for this to work.
146
+
-clip Update X11 clipboard to the current hash. This works using the 'xsel', 'xclip' or 'pbcopy' commands, or if none of those are installed falls back to Xterm clipboard as in the '-xsel' option .
147
+
-qr Display the current hash as a qrcode. This requires the 'qrencode' command to be installed, and also an image viewer like fim, feh, or imagemagick display to be installed.
148
+
-qrcode Display the current hash as a qrcode. This requires the 'qrencode' command to be installed, and also an image viewer like fim, feh, or imagemagick display to be installed.
149
+
-clipcmd <cmds> Comma separated list of clipboard-setter commands to use instead of the defaults.
150
+
-viewcmd <cmds> Comma separated list of image-viewer commands to use instead of the defaults.
135
151
```
136
152
137
153
@@ -323,6 +339,16 @@ If run with the '-net' option, hashrat will treat paths starting with 'http://'
Hashrat can be used as a TOTP authenticator, and defaults to google-authenticator compatible codes.
345
+
```
346
+
hashrat -otp 3EK4LIB2553CUPA7DBXJMMKDCYTEA2IZA
347
+
```
348
+
349
+
350
+
351
+
326
352
HOOKSCRIPTS
327
353
===========
328
354
@@ -372,6 +398,50 @@ SegmentChar=+
372
398
NoOptions=Y
373
399
```
374
400
401
+
402
+
TOTP MODE
403
+
=========
404
+
405
+
Hashrat can be used as a TOTP (Time-based One Time Password) authenticator and defaults to google-authenticator compatible codes. The simplest use case is:
406
+
407
+
```
408
+
hashrat -totp <secret>
409
+
```
410
+
411
+
It's possible to change the hash, period/lifetime and number of digits in the TOTP code like so:
Hashes produced in standard-in input mode and TOTP codes can be pushed to the system clipboard using the `-clip` option. This option first tries to find a command that can set the clipboard, searching for one of 'xsel', 'xclip' or 'pbcopy'. If it can't find any of these, it falls back to using xterm's built in clipboard setting method.
423
+
424
+
Alternatively the `-xsel` option only attempts to use the xterm clipboard setting method.
425
+
426
+
The default list of clipboard commands can be overridden using the `-clipcmd` option.
427
+
428
+
429
+
430
+
QRCODE OUTPUT
431
+
=============
432
+
433
+
Hashes produced in standard-in input mode and TOTP codes can be displayed as qrcodes using the `-qr` or `-qrcode` options. These options require the "qrencode" utility to be installed, and also an image viewer that can be used to display the qrcode image.
434
+
435
+
By default hashrat searches for the following image viewers:
0 commit comments