mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-27 07:01:09 +00:00
76 lines
3.4 KiB
Markdown
76 lines
3.4 KiB
Markdown
<details>
|
|
|
|
<summary><strong>Aprende hacking en AWS de cero a héroe con</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Experto en Red Team de AWS de HackTricks)</strong></a><strong>!</strong></summary>
|
|
|
|
Otras formas de apoyar a HackTricks:
|
|
|
|
* Si quieres ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
|
|
* Obtén el [**swag oficial de PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
|
|
* **Comparte tus trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github.
|
|
|
|
</details>
|
|
```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()
|
|
```
|
|
<details>
|
|
|
|
<summary><strong>Aprende hacking en AWS de cero a héroe con</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (Experto en Red Team de AWS de HackTricks)</strong></a><strong>!</strong></summary>
|
|
|
|
Otras formas de apoyar a HackTricks:
|
|
|
|
* Si deseas ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
|
|
* Obtén el [**swag oficial de PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
|
|
* **Comparte tus trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github.
|
|
|
|
</details>
|