Created
March 8, 2015 11:38
-
-
Save MickaelBergem/811e6635f3054cad929a to your computer and use it in GitHub Desktop.
Phisher Flooder
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
#!/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