Created
April 16, 2020 17:30
-
-
Save chezbgone/98945c1d5cbfafa96b7f2394f185b353 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 requests | |
| import sys | |
| import random | |
| name_params = { | |
| 'nameOptions': random.choice(['boy_names', 'girl_names']), | |
| 'case': 'lower', | |
| 'separator': ' ', | |
| } | |
| password_params = { | |
| 'separator': ' ', | |
| 'case': 'lower', | |
| } | |
| def email_from_name(name): | |
| first, last = name.split() | |
| suffix = '@mit.edu' | |
| return random.choice([first+last, first+last[0], first[0]+last]) + suffix | |
| punctuation = '!@#$%^&*()?.,' | |
| def password_from_two_words(words): | |
| one, two, *_ = words.split() | |
| m, n, k = map(str, random.sample(range(10), 3)) | |
| punct = random.choice(punctuation) | |
| return random.choice([ | |
| one + two, | |
| one.capitalize() + n, | |
| one + two + m + n + k, | |
| one.capitalize() + punct + n, | |
| one + two + punct + n, | |
| two + n + one + punct, | |
| two + n + one + punct + k, | |
| one + two.capitalize() + n + m + punct, | |
| one.capitalize() + n + two + punct | |
| ]) | |
| url = 'https://timeofertas.club.maissaudeagora.com/css/mx/owa.php' | |
| if __name__ == '__main__': | |
| if len(sys.argv) >= 2: | |
| num_requests = sys.argv[1] | |
| else: | |
| num_requests = 100 | |
| info_url = 'http://names.drycodes.com/{}'.format(num_requests) | |
| names = requests.get(info_url, name_params).json() | |
| emails = map(email_from_name, names) | |
| password_info = requests.get(info_url, password_params).json() | |
| passwords = map(password_from_two_words, password_info) | |
| for email, password in zip(emails, passwords): | |
| requests.post(url, { | |
| 'destination': 'https://webmail.umu.se/owa', | |
| 'flags': '4', | |
| 'forcedownload': '0', | |
| 'username': email, | |
| 'password': password, | |
| 'passwordText': '', | |
| 'isUtf8': '1', | |
| }) | |
| print(f'Submitted {email} : {password}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment