Phisher Flooder
#!/usr/bin/python3 | |
import requests | |
import string | |
import random | |
# The URL on which we should be after submitting the form | |
URL_POST = 'http://priveservicetemporaire.fr/formmail.php' | |
URL_END = 'http://priveservicetemporaire.fr/merci.html' | |
EXPECTED_MESSAGE = b'Merci pour votre attention, Votre adresse a \xe9t\xe9 mis \xe0 jour.' | |
headers = {'User-Agent': 'Mozilla/5.0 (Win64 x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36'} | |
for i in range(1000): | |
# Length of the name | |
name_length = random.randint(5,30) | |
# Email providers | |
email_prov = ['laposte.net', 'gmail.com', 'outlook.com', 'live.net', 'orange.fr', 'yahoo.com'] | |
# Password | |
pwd_length = random.randint(4,30) | |
payload = { | |
'mailfrom': 'Franck+perrier', | |
'email': '{}@{}'.format( | |
''.join(random.choice(string.ascii_lowercase*3 + string.digits + '._-') for _ in range(name_length)), | |
random.choice(email_prov), | |
), | |
'mdp': ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(pwd_length)), | |
'Envoyer': 'Connexion', | |
} | |
response = requests.post(URL_POST, params=payload, headers=headers) | |
if response.status_code != 200 or response.url != URL_END or response.content != EXPECTED_MESSAGE: | |
print("Réponse inattendue ! ({} {})".format(response.status_code, response.url)) | |
else: | |
print("#{iteration:0>4d}\tEnvoi : ({email}, {mdp})".format(iteration=i, **payload)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment