Last active
April 11, 2024 14:35
-
-
Save CM-CA/b32711c8c594d7891c19b808e9e87157 to your computer and use it in GitHub Desktop.
generate_fake_onion.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import base64 | |
def generate_fake_onion_v3(): | |
random_bytes = os.urandom(35) | |
onion_address = base64.b32encode(random_bytes).decode('utf-8').lower().strip('=') | |
return onion_address + ".onion" | |
def generate_multiple_onion_addresses(n): | |
with open("fake_onion_addresses.txt", "w") as file: | |
for _ in range(n): | |
file.write(generate_fake_onion_v3() + "\n") | |
# Número de direcciones .onion falsas a generar | |
n = 250000 | |
# Generar direcciones | |
generate_multiple_onion_addresses(n) | |
print(f"Generadas {n} direcciones .onion falsas.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment