Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- import requests
- import uuid
- import os
- import re
- except Exception as e:
- try:
- print(e)
- finally:
- e = None
- del e
- except Exception as e:
- try:
- print(e)
- finally:
- e = None
- del e
- email = ''
- fullname = ''
- phone = ''
- counter = 0
- u = str(uuid.uuid4())
- req = requests.session()
- ThreadStart = True
- def c():
- exit(0)
- clear = lambda : os.system('cls')
- head = {
- 'User-Agent': 'Instagram 93.1.0.19.102 Android (21/5.0.2; 240dpi; 540x960; samsung; SM-G530H; fortuna3g; qcom; ar_AE; 154400379)',
- "Accept": "*/*",
- "Accept-Encoding": "gzip, deflate",
- "Accept-Language": "en-US",
- "X-IG-Capabilities": "3brTvw==",
- "X-IG-Connection-Type": "WIFI",
- "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
- 'Host': 'i.instagram.com'
- }
- clear()
- print()
- uid = str(uuid.uuid4())
- def for_login():
- global username
- global password
- username = input('[+]username:')
- password = input('[+]Password:')
- for_login()
- def info():
- global email
- global fulname
- global number
- global head
- global coo
- try:
- txt = requests.get("https://i.instagram.com/api/v1/accounts/current_user/?edit=true", headers=head,
- cookies=coo).json()
- email = txt['user']['email']
- number = txt['user']['phone_number']
- fulname = txt['user']['full_name']
- except:
- pass
- def login(username, password):
- global head
- global coo
- login_url = "https://i.instagram.com/api/v1/accounts/login/"
- data_login = {'uuid': uid,
- 'password': password,
- 'username': username,
- 'device_id': uid,
- 'from_reg': 'false',
- '_csrftoken': 'missing',
- 'login_attempt_count': '0'}
- loginc = requests.post(login_url, data=data_login, headers=head)
- login1 = loginc.text
- if ('"logged_in_user"') in login1:
- coo = loginc.cookies
- return True
- elif ("Incorrect Username") in login1:
- print(
- "The username you entered doesn't appear to belong to an account. Please check your username and try again.")
- c()
- exit()
- elif ('Incorrect password') in login1:
- print("The password you entered is incorrect. Please try again.")
- c()
- exit()
- elif ('"inactive user"') in login1:
- print(
- 'Your account has been disabled for violating our terms. Learn how you may be able to restore your account.')
- c()
- exit()
- elif ('checkpoint_challenge_required') in login1:
- print(
- 'Your account is secure , Please try again')
- c()
- exit()
- else:
- print(login1)
- c()
- exit()
- if login(username, password):
- info()
- clear()
- print()
- print()
- coo = f" {coo}\n"
- file = open('cookies.txt','a')
- file.write(coo)
- print(coo)
Add Comment
Please, Sign In to add comment