mirror of
https://github.com/hashcat/hashcat.git
synced 2025-07-01 20:32:38 +00:00
Update hashcat-python-plugin-development-guide.md
- Changed some mistakes e.g. duplicates "the the" and improved some clarity too.
This commit is contained in:
parent
13245b5563
commit
a472c572f6
@ -72,7 +72,7 @@ Here:
|
||||
- `extract_esalts()` is an optional function to deserialize binary esalt blobs. Depends on your hash, if esalts (such as binary blobs for decryption) are required.
|
||||
- `hcsp.init()` stores these so that `handle_queue()` (described later) can call `calc_hash()` for each password in a batch.
|
||||
|
||||
Note the the ctx will hold your salt data from all hashes. Whenever calc_hash() is called, this context is given. If you have multiple hashes with multiple salts, the context will have all of them. The helper module hcsp.init() will deserialze the static salt and the dynamic salt and store the data in your context.
|
||||
Note the the ctx will hold your salt data from all hashes. Whenever calc_hash() is called, this context is given. If you have multiple hashes with multiple salts, the context will have all of them. The helper module hcsp.init() will deserialize the static salt and the dynamic salt and store the data in your context.
|
||||
|
||||
A typical `term()` might look like this:
|
||||
|
||||
@ -90,7 +90,7 @@ def kernel_loop(ctx,passwords,salt_id,is_selftest):
|
||||
return hcsp.handle_queue(ctx,passwords,salt_id,is_selftest)
|
||||
```
|
||||
|
||||
Hashcat optimizes performance by sending password candidates in batches. The `passwords` parameter in `kernel_loop()` is a list. Instead of manually looping over them, the helper module will queue them, and call your callback function which you had specified in the `init()` function before. The idea is that whenever your calc_hash() is called, it will always be only about one password and one salt (and optional some binary blobs), and you do not have to deal with queuing, whatever it is threaded or not threaded.
|
||||
Hashcat optimizes performance by sending password candidates in batches. The `passwords` parameter in `kernel_loop()` is a list. Instead of manually looping over them, the helper module will queue them, and call your callback function which you had specified in the `init()` function before. The idea is that whenever your calc_hash() is called, it will always be only about one password and one salt (and optional some binary blobs), and you do not have to deal with queuing, whether it is threaded or not.
|
||||
|
||||
Of course, you can also fully control this yourself:
|
||||
|
||||
@ -103,7 +103,7 @@ def calc_hash(ctx, password, salt_id, is_selftest):
|
||||
If you want to control all by youself, here's what's important to know:
|
||||
|
||||
- salt_id: Basically a index number which tells you about which salt your calculation is about. When you initially receive the context, it will hold all salts at once, and you need to store them in the context. The helper scripts do that for your, but just for you to know, its the salt_id which tells the handle_queue() which salt data to pick before it calls your hash_calc() function.
|
||||
- is_selftest: Historically hashcat keeps two parallel structures for the the selftest hash and real hash. As such they arrive in the context buffer, and you need to make a decision on that `is_selftest` flag which salt buffer to pick.
|
||||
- is_selftest: Historically hashcat keeps two parallel structures for the selftest hash and real hash. As such they arrive in the context buffer, and you need to make a decision on that `is_selftest` flag which salt buffer to pick.
|
||||
|
||||
## 5. Esalts and Structured Binary Blobs, and fixed Salts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user