Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

look below (better version of this) #1

Closed
ghost opened this issue Oct 7, 2022 · 0 comments
Closed

look below (better version of this) #1

ghost opened this issue Oct 7, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 7, 2022

import requests, urllib.parse, user_agent, random, threading; from colorama import Fore

threads = input(f"{Fore.MAGENTA}threads > ")
        
def x_token() -> None: # gets new fresh xsrf tokens every request.
        headers = {'host': 'accounts.snapchat.com', 'connection': 'keep-alive', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36', 'accept': '*/*', 'sec-gpc': '1', 'origin': 'https://web.snapchat.com', 'sec-fetch-site': 'same-site', 'sec-fetch-mode': 'cors', 'sec-fetch-dest': 'empty', 'referer': 'https://web.snapchat.com/', 'accept-encoding': 'gzip, deflate, br', 'accept-language': 'en-US,en;q=0.9'}
        x = requests.post(
            url = (
                'https://'
                    +'accounts.snapchat.com'
                    + '/accounts/sso?'
                    + urllib.parse.urlencode(
                        {
                            "client_id": "web-calling-corp--prod"
                    }
                )
            ),
            headers = (
                headers
            )
        )


def __get__user():
 try:

   usernames = requests.get("https://rentry.co/6btqv/raw").text.splitlines() # uses a list of clean semi / final users to use for checking.
   user = random.choice(usernames)
   headers = {
      "User-Agent": user_agent.generate_user_agent(),
      "Cookie": f"xsrf_token={x_token()}"
   }
   xae = requests.post(f"https://accounts.snapchat.com/accounts/get_username_suggestions?requested_username={user}&xsrf_token={x_token()}", headers=headers)

   if '' in xae.text:
    print(f"{Fore.YELLOW}too many rq's being sent!")

   if xae.json()['value']['status_code'] == 'TAKEN':
    print(f"{Fore.RED}{user} {Fore.RESET}taken!")

   if xae.json()['value']['status_code'] == 'DELETED':
    print(f"{Fore.YELLOW}{user} {Fore.RESET}deleted!")

   if xae.json()['value']['status_code'] == 'OK':
    print(f"{Fore.GREEN}{user} {Fore.RESET}available!")

 except Exception:
  pass
  

def __thread_loop(): 
 for x in range(int(threads)):
        threading.Thread(target=__get__user).start()

__thread_loop()
@ghost ghost closed this as completed Oct 7, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants