Advertisement
Guest User

Anti Scammo

a guest
Aug 10th, 2018
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.81 KB | None | 0 0
  1. import json
  2. from random import randint
  3. from os.path import isfile
  4.  
  5. import requests
  6.  
  7.  
  8. TARGET_URL = "http://craigslist.pottsfam.com/index872dijasydu2iuad27aysdu2yytaus6d2ajsdhasdasd2.php"
  9. CHANCE_FOR_GMAIL = 70  # The chance of the fake email ending with @gmail.com - out of 100
  10.  
  11.  
  12. def requests_check_fail(r: requests.Response) -> None:
  13.     if r.status_code != 200:
  14.         print(f"{r.url} GET failed with status code {r.status_code}", end='\n\n')
  15.         input("Press ENTER to exit.")
  16.         exit(1)
  17.  
  18.  
  19. def GetRandomEmailDomain() -> str:
  20.     if randint(0, 99) < CHANCE_FOR_GMAIL:
  21.         return "@gmail.com"  # GMail master race
  22.     return domains[randint(0, len(domains) - 1)]
  23.  
  24.  
  25. domains = [
  26.     "@hotmail.com",
  27.     "@outlook.com",
  28.     "@yahoo.com",
  29.     "@comcast.net",
  30.     "@verizon.net"
  31. ]
  32.  
  33.  
  34. print("Loading passwords")
  35. r = requests.get("https://raw.githubusercontent.com/skyzyx/bad-passwords/master/raw.txt")
  36. requests_check_fail(r)
  37. passwords = r.text.split('\n')
  38.  
  39.  
  40. def main():
  41.     while True:
  42.         print("Loading user info", end='\n\n')
  43.         r = requests.get(
  44.             "https://randomuser.me/api/", {
  45.             "results": "5000",
  46.             "inc": "login,email"  # Didn't use the passwords from randomuser because they sucked when I was testing it
  47.         })
  48.         requests_check_fail(r)
  49.         users = json.loads(r.content)
  50.  
  51.         if not users.get("error", 1):
  52.             print(users["error"], end='\n\n')
  53.             input("Press ENTER to exit.")
  54.             exit(2)
  55.  
  56.  
  57.         for user in users["results"]:
  58.             # Use a combination of usernames and emails to make it harder to filter out spam entries
  59.             username = user["login"]["username"] if randint(0, 1) else user["email"].replace(
  60.                 "@example.com", "@gmail.com" if randint(0, 99) < CHANCE_FOR_GMAIL else domains[randint(0, len(domains) - 1)])
  61.             password = passwords[randint(0, 9999)]
  62.  
  63.  
  64.             # Make a few characters uppercase to look more convincing
  65.             for j in range(int(   randint(0, len(password)) / 2   )):
  66.                 i = randint(0, len(password) - 1)
  67.                 password = password.replace(password[i], password[i].upper(), 1)
  68.  
  69.             # Make sure at least 1 character is uppercase
  70.             for i in range(len(password)):
  71.                 if password[i].isupper():
  72.                     break
  73.             else:
  74.                 password = password.replace(password[0], password[0].upper(), 1)
  75.  
  76.  
  77.             requests.post(TARGET_URL, {"auid2yjauysd2uasdasdasd": username, "kjauysd6sAJSDhyui2yasd": password}, allow_redirects=False)
  78.  
  79.             print(f"Username: {username}\nPassword: {password}", end='\n\n')
  80.  
  81.  
  82. if __name__ == "__main__":
  83.     try:
  84.         main()
  85.     except Exception as e:
  86.         print(e)
  87.         input("\nPress ENTER to exit.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement