1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-12 09:38:11 +00:00
Commit Graph

244 Commits

Author SHA1 Message Date
Jens Steube
6aeb188b48 - Handle case where system does not offer any reliable method to query actual free memory
- Change package script source folder from $HOME/hashcat to .
- Revisited Apple OpenCL 2GiB Bug (still present)
2025-06-10 12:54:15 +02:00
Jens Steube
c87a87f992 Improvements to SCRYPT autotuning strategy
General:

The logic for calculating the SCRYPT workload has been moved
from module_extra_buffer_size() to module_extra_tuningdb_block().
Previously, this function just returned values from a static
tuning file. Now, it actually computes tuning values on the fly
based on the device's resources and SCRYPT parameters. This
was always possible, it just wasn't used that way until now.

After running the calculation, the calculated kernel_accel value
is injected into the tuning database as if it had come from a
file. The tmto value is stored internally.

Users can still override kernel-threads, kernel-accel, and
scrypt-tmto via the command line or via tuningdb file.

module_extra_tuningdb_block():

This is now where kernel_accel and tmto are automatically
calculated.

The logic for accel and tmto is now separated and more
flexible. Whether the user is using defaults, tuningdb entries, or
manual command line overrides, the code logic will try to make
smart choices based on what's actually available on the device.

First, it tries to find a kernel_accel value that fits into
available memory. It starts with a base value and simulates
tmto=1 or 2 (which is typical good on GPU).

It also leaves room for other buffers (like pws[], tmps[], etc.).
If the result is close to the actual processor count,
it gets clamped.

This value is then added to the tuning database, so hashcat can pick
it up during startup.

Once that's set, it derives tmto using available memory, thread
count, and the actual SCRYPT parameters.

module_extra_buffer_size():

This function now just returns the size of the SCRYPT B[] buffer,
based on the tmto that was already calculated.

kernel_threads:

Defaults are now set to 32 threads in most cases. On AMD GPUs,
64 threads might give a slight performance bump, but 32 is more
consistent and reliable.

For very memory-heavy algorithms (like Ethereum Wallet), it
scales down the thread count.

Here's a rough reference for other SCRYPT-based modes:

- 64 MiB: 16 threads
- 256 MiB: 4 threads

Tuning files:

All built-in tuningdb entries have been removed, because they
shouldn’t be needed anymore. But you can still add custom entries
if needed. There’s even a commented-out example in the tuningdb
file for mode 22700.

Free memory handling:

Getting the actual amount of free GPU memory is critical for
this to work right. Unfortunately, none of the common GPGPU APIs
give reliable numbers. We now query low-level interfaces like
SYSFS (AMD) and NVML (NVIDIA). Support for those APIs is in
place already, except for ADL, which still needs to be added.

Because of this, hwmon support (which handles those low-level
queries) can no longer be disabled.
2025-06-09 11:02:34 +02:00
Jens Steube
d60658102b Added option --backend-devices-keepfree to configure X percentage of device memory available to keep free 2025-06-04 10:13:29 +02:00
Jens Steube
ceb5ff5641 The Assimilation Bridge (Framework) 2025-05-29 15:38:13 +02:00
Gabriele Gristina
120e758be9 Added options --benchmark-min and --benchmark-max to set a hash-mode range to be used during the benchmark 2025-05-07 18:46:51 +02:00
jsteube
252e7614da Add a warning about delayed output in case --dynamic-x is used in combination with --show 2023-11-14 07:05:20 +00:00
jsteube
b66527f0d2 Prepare commandline parameter for upcoming partial support for $dynamic_X$ 2023-11-01 16:12:44 +00:00
jsteube
b1b349e8c9 Prepare commandline parameter for upcoming partial support for $dynamic_X$ 2023-10-31 10:38:10 +00:00
jsteube
adbcef6909 Refactor optimized_kernel_enable variable to just optimized_kernel, same idea as outfile_autohex variable 2023-10-30 15:09:36 +00:00
jsteube
e55b331058 Refactor potfile_disable variable to just putfile, same idea as outfile_autohex variable 2023-10-21 16:42:29 +00:00
jsteube
b597a96328 Refactor restore_disable variable to restore_enable, try to make variable names always positive for easier handling 2023-10-20 12:16:18 +00:00
jsteube
ff94f4c9d0 Refactor self_test_disable variable to just self_test, same idea as outfile_autohex variable 2023-10-19 06:08:24 +00:00
jsteube
7b52dad8c9 Refactor multiply_accel_disable variable to just multiply_accel, same idea as outfile_autohex variable 2023-10-18 12:41:09 +00:00
jsteube
bf04a158aa Refactor markov_disable variable to just markov, same idea as outfile_autohex variable 2023-10-17 12:17:05 +00:00
jsteube
e498138bb6 Refactor logfile_disable variable to just logfile, same idea as outfile_autohex variable 2023-10-16 13:18:45 +00:00
jsteube
98ee1bd396 Refactor hwmon_disable variable to just hwmon, same idea as outfile_autohex variable 2023-10-15 18:40:56 +00:00
jsteube
1255afb55c Refactor deprecated_check_disable variable to just deprecated_check, same idea as outfile_autohex variable 2023-10-13 12:17:44 +00:00
jsteube
652b66e642 Refactor advise_disable variable to just advise, same idea as outfile_autohex variable 2023-10-12 13:03:45 +00:00
jsteube
4dceea914f Refactor wordlist_autohex_disable variable to wordlist_autohex, same idea as outfile_autohex variable 2023-10-10 21:03:07 +00:00
PenguinKeeper7
a033180aa1
Update user_options.c 2023-10-08 02:59:01 +01:00
jsteube
e6715fbd89 Prepare options and usage for --outfile-json 2023-10-06 08:21:07 +00:00
PenguinKeeper7
1bae3383dc Fix -o warning when already used 2023-09-18 16:16:47 +01:00
PenguinKeeper7
2954b62a6a Use chgd variable to decide dictstat building
Use rule_buf_l_chgd and rule_buf_r_chgd instead of checking raw values for futureproofing / code cleanliness
2023-09-04 23:09:07 +01:00
PenguinKeeper7
9d9815d166 Prevent file-unsafe characters in --session 2023-08-17 13:51:16 +01:00
Gabriele Gristina
aa4be217fd
Merge branch 'master' into help2int 2023-05-05 15:41:37 +02:00
Gabriele Gristina
36606addac Help: show supported hash-modes only with -hh 2023-05-01 17:38:42 +02:00
Gabriele Gristina
2fe2d299bc update changes.txt + cleanup 2023-05-01 03:44:39 +02:00
Gabriele Gristina
e6d1a4c8a2 Added --metal-compiler-runtime option 2023-05-01 03:33:35 +02:00
jsteube
6785a32e7a Added new feature (-Y) that creates N virtual instances for each device in your system at the cost of N times the device memory consumption 2023-04-16 12:04:34 +00:00
philsmd
cb827fcd32
fix trailing spaces 2023-04-11 15:52:34 +02:00
Jens Steube
a1db6d4d63
Merge pull request #3655 from Chick3nman/show-username
Add error message when mixing --show and --username
2023-03-26 23:40:41 +02:00
Chick3nman
10000b324f Move message to log level error to avoid poluting output when sent to a file. 2023-03-23 20:00:42 -05:00
Chick3nman
a4555fdcb9 Fix typo 2 2023-03-23 19:38:17 -05:00
Chick3nman
9c58b47daf Fix typo 2023-03-23 19:37:13 -05:00
Chick3nman
7eb36bb9a2 Added advice message for mixing of --show and --username 2023-03-23 19:36:22 -05:00
Chick3nman
35d51020a5 Add user opt sanity check for brain port, clean up messages for other brain related checks. 2023-03-23 19:01:24 -05:00
justpretending
c2fcef6c50 Support for FIFO outfiles (fixes #3582) 2023-01-31 14:02:26 +07:00
jsteube
17b2e9062b Prevent Hashcat from hanging by checking during startup that the output file is a named pipe 2023-01-19 15:54:26 +00:00
Jens Steube
2ff7d0bb4d Added support to include source wordlist in debugging format 2022-05-15 18:04:29 +02:00
Jens Steube
38c44b4b35 Fix user option sanity check 2022-05-07 19:40:54 +02:00
Jens Steube
ec7eae9886 Debug Rules: Set --debug-file to $session.debugfile if --debug-mode was set by the user and --debug-file was not set 2022-04-23 19:29:19 +02:00
Jens Steube
d02b392b9e Command Line: Disallow combinations of some options. for instance, using -t in -a 0 mode 2022-04-20 15:43:23 +02:00
philsmd
a24d723d66
minor code style fixes 2022-03-31 19:19:16 +02:00
philsmd
e5657723d3
improve --stdout + --stdin-timeout-abort fix 2022-03-22 15:26:52 +01:00
Will Crozier
73637d43db allow --stdout and --stdin-timeout-abort to be used together 2022-03-11 10:46:49 +00:00
Gabriele Gristina
8c2756d74d fix wording 2022-02-13 12:41:27 +01:00
Gabriele Gristina
3064c63c71 User Options: Change --backend-info/-I option type, from bool to int 2022-02-13 12:33:11 +01:00
Gabriele Gristina
490702fcfa Backends: added Metal host-code 2022-02-05 22:48:16 +01:00
b0lek
a621c856bd
allow hex format for --separator #3084 2022-01-13 17:53:04 +01:00
Jens Steube
acc592e963 Added support to use --debug-mode in attack-mode 9 (Association Attack) 2021-12-12 10:18:05 +01:00