mirror of
https://github.com/carlospolop/hacktricks
synced 2024-12-19 01:24:50 +00:00
79 lines
3.4 KiB
Markdown
79 lines
3.4 KiB
Markdown
|
{% hint style="success" %}
|
||
|
Aprenda e pratique AWS Hacking: <img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Treinamento AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||
|
Aprenda e pratique GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Treinamento GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||
|
|
||
|
<details>
|
||
|
|
||
|
<summary>Suporte ao HackTricks</summary>
|
||
|
|
||
|
* Verifique os [**planos de assinatura**](https://github.com/sponsors/carlospolop)!
|
||
|
* **Junte-se ao** 💬 [**grupo Discord**](https://discord.gg/hRep4RUj7f) ou ao [**grupo telegram**](https://t.me/peass) ou **siga-nos** no **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||
|
* **Compartilhe truques de hacking enviando PRs para os repositórios** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||
|
|
||
|
</details>
|
||
|
{% endhint %}
|
||
|
```python
|
||
|
import hashlib
|
||
|
|
||
|
target = '2f2e2e' #/..
|
||
|
candidate = 0
|
||
|
while True:
|
||
|
plaintext = str(candidate)
|
||
|
hash = hashlib.md5(plaintext.encode('ascii')).hexdigest()
|
||
|
if hash[-1*(len(target)):] == target: #End in target
|
||
|
print('plaintext:"' + plaintext + '", md5:' + hash)
|
||
|
break
|
||
|
candidate = candidate + 1
|
||
|
```
|
||
|
|
||
|
```python
|
||
|
#From isHaacK
|
||
|
import hashlib
|
||
|
from multiprocessing import Process, Queue, cpu_count
|
||
|
|
||
|
|
||
|
def loose_comparison(queue, num):
|
||
|
target = '0e'
|
||
|
plaintext = f"a_prefix{str(num)}a_suffix"
|
||
|
hash = hashlib.md5(plaintext.encode('ascii')).hexdigest()
|
||
|
|
||
|
if hash[:len(target)] == target and not any(x in "abcdef" for x in hash[2:]):
|
||
|
print('plaintext: ' + plaintext + ', md5: ' + hash)
|
||
|
queue.put("done") # triggers program exit
|
||
|
|
||
|
def worker(queue, thread_i, threads):
|
||
|
for num in range(thread_i, 100**50, threads):
|
||
|
loose_comparison(queue, num)
|
||
|
|
||
|
def main():
|
||
|
procs = []
|
||
|
queue = Queue()
|
||
|
threads = cpu_count() # 2
|
||
|
|
||
|
for thread_i in range(threads):
|
||
|
proc = Process(target=worker, args=(queue, thread_i, threads ))
|
||
|
proc.daemon = True # kill all subprocess when main process exits.
|
||
|
procs.append(proc)
|
||
|
proc.start()
|
||
|
|
||
|
while queue.empty(): # exits when a subprocess is done
|
||
|
pass
|
||
|
return 0
|
||
|
|
||
|
main()
|
||
|
```
|
||
|
{% hint style="success" %}
|
||
|
Aprenda e pratique AWS Hacking: <img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Treinamento AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
||
|
Aprenda e pratique GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Treinamento GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
||
|
|
||
|
<details>
|
||
|
|
||
|
<summary>Apoie o HackTricks</summary>
|
||
|
|
||
|
* Verifique os [**planos de assinatura**](https://github.com/sponsors/carlospolop)!
|
||
|
* **Junte-se ao** 💬 [**grupo Discord**](https://discord.gg/hRep4RUj7f) ou ao [**grupo telegram**](https://t.me/peass) ou **siga-nos** no **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
||
|
* **Compartilhe truques de hacking enviando PRs para os repositórios** [**HackTricks**](https://github.com/carlospolop/hacktricks) e [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||
|
|
||
|
</details>
|
||
|
{% endhint %}
|