0% found this document useful (0 votes)
40 views4 pages

ZQ RD Obt

The document is a Python script that automates the process of creating an Instagram account by sending a verification email and validating the confirmation code. It utilizes libraries such as requests and colorama for HTTP requests and colored output, respectively. The script generates random user data, constructs necessary headers for API requests, and handles responses to ensure account creation is successful.

Uploaded by

zz7fxz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views4 pages

ZQ RD Obt

The document is a Python script that automates the process of creating an Instagram account by sending a verification email and validating the confirmation code. It utilizes libraries such as requests and colorama for HTTP requests and colored output, respectively. The script generates random user data, constructs necessary headers for API requests, and handles responses to ensure account creation is successful.

Uploaded by

zz7fxz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

import colorama

import requests
import random
import string
import time
import os
import names
from colorama import Fore

proxies = None

os.system("cls")

print(colorama.Fore.LIGHTMAGENTA_EX + '''
███████╗███████╗███████╗ ████████╗███████╗ █████╗
███╗ ███╗
╚══███╔╝╚════██║██╔════╝
╚══██╔══╝██╔════╝██╔══██╗████╗ ████║
███╔╝ ██╔╝█████╗ ██║ █████╗
███████║██╔████╔██║
███╔╝ ██╔╝ ██╔══╝ ██║ ██╔══╝
██╔══██║██║╚██╔╝██║
███████╗ ██║ ███████╗ ██║ ███████╗██║
██║██║ ╚═╝ ██║
╚══════╝ ╚═╝ ╚══════╝ ╚═╝ ╚══════╝╚═╝
╚═╝╚═╝ ╚═╝

''')

def get_headers(Country, Language):


try:
an_agent = f'Mozilla/5.0 (Linux; Android {random.randint(9, 13)};
{"".join(random.choices(string.ascii_uppercase, k=3))}{random.randint(111, 999)})
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36'

res = requests.get("https://www.facebook.com/", headers={


'user-agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'},
proxies=proxies, timeout=30)
js_datr = res.text.split('["_js_datr","')[1].split('",')[0]
r = requests.get('https://www.instagram.com/api/v1/web/accounts/login/
ajax/',
headers={'user-agent': an_agent}, proxies=proxies,
timeout=30).cookies

headers1 = {
'authority': 'www.instagram.com',
'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',
'accept-language': f'{Language}-{Country},en-GB;q=0.9,en-
US;q=0.8,en;q=0.7',
'cookie': f'dpr=3; csrftoken={r["csrftoken"]}; mid={r["mid"]};
ig_nrcb=1; ig_did={r["ig_did"]}; datr={js_datr}',
'sec-ch-prefers-color-scheme': 'light',
'sec-ch-ua': '"Chromium";v="111", "Not(A:Brand";v="8"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'none',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'user-agent': an_agent,
'viewport-width': '980',
}
response1 = requests.get('https://www.instagram.com/', headers=headers1,
proxies=proxies, timeout=30)
appid = response1.text.split('APP_ID":"')[1].split('"')[0]
rollout = response1.text.split('rollout_hash":"')[1].split('"')[0]
headers = {
'authority': 'www.instagram.com',
'accept': '*/*',
'accept-language': f'{Language}-{Country},en-GB;q=0.9,en-
US;q=0.8,en;q=0.7',
'content-type': 'application/x-www-form-urlencoded',
'cookie': f'dpr=3; csrftoken={r["csrftoken"]}; mid={r["mid"]};
ig_nrcb=1; ig_did={r["ig_did"]}; datr={js_datr}',
'origin': 'https://www.instagram.com',
'referer': 'https://www.instagram.com/accounts/signup/email/',
'sec-ch-prefers-color-scheme': 'light',
'sec-ch-ua': '"Chromium";v="111", "Not(A:Brand";v="8"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin',
'user-agent': an_agent,
'viewport-width': '360',
'x-asbd-id': '198387',
'x-csrftoken': r["csrftoken"],
'x-ig-app-id': str(appid),
'x-ig-www-claim': '0',
'x-instagram-ajax': str(rollout),
'x-requested-with': 'XMLHttpRequest',
'x-web-device-id': r["ig_did"],
}
return headers
except Exception as E:
print(E)
return None

def send_sms(headers, email):


try:
data = {'device_id': headers['cookie'].split('mid=')[1].split(';')[0],
'email': email}
response =
requests.post('https://www.instagram.com/api/v1/accounts/send_verify_email/',
headers=headers,
data=data, proxies=proxies, timeout=30)
return response.text
except Exception as E:
print(E)
return None

def validate_code(headers, email, code):


try:
updict = {"referer":
'https://www.instagram.com/accounts/signup/emailConfirmation/'}
headers = {key: updict.get(key, headers[key]) for key in headers}
data = {'code': code, 'device_id': headers['cookie'].split('mid=')
[1].split(';')[0], 'email': email}
response =
requests.post('https://www.instagram.com/api/v1/accounts/check_confirmation_code/',
headers=headers,
data=data, proxies=proxies, timeout=30)
return response
except Exception as E:
print(E)
return None

def create_acc(headers, email, signup_code):


try:
firstname = names.get_first_name()
username = input(f'{Fore.LIGHTMAGENTA_EX}[?]{Fore.RESET} Enter Desired
Username: ')
password = firstname.strip() + '@' + str(random.randint(111, 999))
updict = {"referer": 'https://www.instagram.com/accounts/signup/username/'}
headers = {key: updict.get(key, headers[key]) for key in headers}
data = {
'enc_password': f'#PWD_INSTAGRAM_BROWSER:0:{round(time.time())}:
{password}',
'email': email,
'username': username,
'first_name': firstname,
'month': random.randint(1, 12),
'day': random.randint(1, 28),
'year': random.randint(1990, 2001),
'client_id': headers['cookie'].split('mid=')[1].split(';')[0],
'phone_number': '',
'signup_code': signup_code,
'device_id': headers['cookie'].split('mid=')[1].split(';')[0]
}
response =
requests.post('https://www.instagram.com/accounts/web_create_ajax/attempt/',
headers=headers,
data=data, proxies=proxies, timeout=30)

if response.status_code == 200 and 'status":"ok' in response.text:


print('Account created successfully!')
print('Email : ' + email)
print('Username : ' + username)
print('Password : ' + password)
print('Token : ' + response.cookies.get('csrftoken', 'N/A'))
print('Ds_user_id : ' + response.cookies.get('ds_user_id', 'N/A'))
print('Ig_did : ' + response.cookies.get('ig_did', 'N/A'))
print('Rur : ' + response.cookies.get('rur', 'N/A'))
print('Mid : ' + headers['cookie'].split('mid=')[1].split(';')[0])
print('Ig_nrcb : 1')
else:
print(f"Failed to create account: {response.text}")

except Exception as E:
print(E)
print('Failed to create account due to an unexpected error.')

if __name__ == "__main__":
headers = get_headers(Country='US', Language='en')
if headers:
email = input(f'{Fore.LIGHTMAGENTA_EX}[?]{Fore.RESET} Enter Your Email: ')
response = send_sms(headers, email)
print(response)

if 'email_sent":true' in response:
code = input(f'{Fore.LIGHTMAGENTA_EX}[?]{Fore.RESET} Enter Code: ')
response = validate_code(headers, email, code)
print(response.text)
if 'status":"ok' in response.text:
signup_code = response.json()['signup_code']
create_acc(headers, email, signup_code)
else:
print(response.text)
else:
print("Failed to send email.")
else:
print("Failed to get headers.")

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy