Jens Steube
1dc3469f6e
Merge pull request #2372 from mpalmer/binary-parse-report-error
...
Allow module_hash_binary_parse to report a fatal error
4 years ago
Jens Steube
d5cd0a0030
Fix invalid brain session id calculation and move sorting functions to shared.c
4 years ago
Matt Palmer
b4204d265d
Allow module_hash_binary_parse to report a fatal error
...
If module_hash_binary_parse is completely unable to successfully parse out
any hashes, up until now the output has been
```
Hashfile 'foo': Success
```
which is less than helpful.
This patch allows (but does not require) m_h_binary_parse to report a useful
error response, by returning a negative value. Modules which continue to
return '0 hashes' will get the same less-than-useful behaviour they always
hace.
I've also modified the LUKS module to report a useful error, as a proof of
concept.
Further expansions on this could include:
* Applying similar behaviour to module_hash_binary_count, so it too can
report errors when trying to count hashes. This would require more
co-ordinated change, because m_h_binary_count already uses -1 to indicate
a system error.
* Allow and encourage modules to print their own errors and warnings during
parsing. This would allow for situations where a single hash in a
multi-hash file could be reported as malformed, without having to fail the
whole parse. However, implementing this would, I expect, require modules
to have access to `hashcat_ctx`, which... yeah. Not so straightforward.
4 years ago
Jens Steube
f1d4260983
Fix missing hc_unlockfile()
4 years ago
Jens Steube
84209dd2ff
Fix buffer overflow in src/hashes.c
4 years ago
Jens Steube
2884bded32
Initialize some variable to make scan-build happy
5 years ago
Jens Steube
6adc217bae
Keep output of --show and --left in the original ordering of the input hash file
5 years ago
Rosen Penev
bd6c0e57e4
Change 0/1 to true/false
...
Found with clang-tidy
5 years ago
Jens Steube
97c9e86d15
Filehandling: Print a truncation warning in case an oversized line was detected
5 years ago
Rosen Penev
ab061ba761
Run Clang's bugprone-narrowing-conversions
...
Fairly minor issue.
5 years ago
Gabriele Gristina
6940f11b15
fix buffer overflow in build_plain()
5 years ago
Gabriele Gristina
ea44f1a186
Fix outfile bug
5 years ago
Gabriele Gristina
3d39d2fc91
update all HCFILE vars and related code
5 years ago
Gabriele Gristina
3161aec3da
fix the comments :)
5 years ago
Gabriele Gristina
5679ca3344
Rewrite hc_fopen to better handling file descriptor locking/unlocking functions, saving kernels binary from plain to gzip format
5 years ago
Gabriele Gristina
5d3ed3e754
Remove union from HCFILE, using std file ops in ocl_check_dri, remove debug comments
5 years ago
Gabriele Gristina
c2e634c426
switch is_gzip from short to bool
5 years ago
Gabriele Gristina
481c752456
No more compress functions, update example.dict.gz, remove some comments
5 years ago
Gabriele Gristina
398c89c75c
switch almost all FILE ops, potfile is the only missing
5 years ago
Gabriele Gristina
b2529af172
remove original commented code
5 years ago
Gabriele Gristina
6cb4abd526
Add zlib support v2
5 years ago
Jens Steube
08dc1acc02
More CUDA rewrites
5 years ago
Jens Steube
50a6e720ca
More OpenCL variables rename
5 years ago
Jens Steube
af8e317cf4
Begin renaming some OpenCL only variables
5 years ago
Jens Steube
3c4f4df771
Rename some more variables
5 years ago
Jens Steube
4b986de5fb
Prepare native CUDA hybrid integration
5 years ago
jsteube
13edc32fb4
Fix some unused variable warnings
5 years ago
jsteube
c0a31b3239
Prepare potfile specific module_hash_decode and module_hash_encode hooks
5 years ago
jsteube
319bf80178
Fix hash_encode() salt position
5 years ago
jsteube
708a86fb59
Move old ascii_digest() to hashes.c and rename it to hash_encode(), also remove some unused includes
5 years ago
jsteube
2158fd70c9
Fix use of OPTS_TYPE_COPY_TMPS in modules
5 years ago
jsteube
d80603648e
Replace plain_t with void in module_build_plain_postprocess() enables some options
5 years ago
jsteube
ba56f41d26
Abort session if module_hash_binary_count () returns zero
5 years ago
jsteube
218322f630
Support for inline VeraCrypt PIM Brute-Force
5 years ago
jsteube
166f908241
Get rid of some old hack and cleanly distinguish between HL_MODE_FILE_PLAIN and HL_MODE_FILE_BINARY
5 years ago
jsteube
6a33be5ea5
Get rid of module_build_plain_postprocess()
5 years ago
jsteube
62c660afe2
Add -m 14600 module
5 years ago
jsteube
78d2706038
Add -m 8900 module and module_extra_tmp_size()
5 years ago
jsteube
8eb2558a7e
Add -m 6211 module and moved some code around
5 years ago
jsteube
2bd55bca74
Add missing hook_salt buffer parameter to decoder/encoder function declaration
5 years ago
jsteube
35265d43f3
Update outfile_check
5 years ago
jsteube
06a5e736b9
Add -m 500 unit test
5 years ago
jsteube
02fe28fe6c
Preparation for -m 501
6 years ago
jsteube
91fc5286fa
Fix module_hash_binary_parse check
6 years ago
jsteube
17bd76ee62
Use settings from selftest hash for benchmark unless overriden by module hooks
6 years ago
jsteube
26033e5787
Make use of return length from ascii_digest instead of calling strlen()
6 years ago
jsteube
0ae955c5ba
With this commit, all hash_mode depending branches from core files are converted into hooks which can be registered on a module level
6 years ago
jsteube
86819c070f
Add module_hash_save_binary() and module_hash_init_selftest()
6 years ago
jsteube
54edd16746
Clean up some code
6 years ago
jsteube
bbcc8fea29
Use MODULE_DEFAULT in module_init to reference a global default function
6 years ago