xxei

Comment ig

Apr 10th, 2021
517
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. try:
  2.         import requests
  3.         import sys
  4.         import time
  5.         from instabot import Bot
  6.         import colorama
  7.         from colorama import Fore
  8.         colorama.init(autoreset=True)
  9. except Exception as lib:
  10.         print(lib)
  11.         input()
  12.         sys.exit()
  13.        
  14. r = requests.session()
  15. bot = Bot
  16. count = 0
  17.  
  18. print("""
  19.      ______ ___________ _     _____ _   _
  20.      | ___ \ ___| ___ \ |   |_   _| \ | |
  21.      | |_/ / |__ | |_/ / |     | | |  \| |
  22.      | ___ \ __||    /| |     | | | . ` |
  23.      | |_/ / |___| |\ \| |_____| |_| |\ |
  24.      \____/\____/\_| \_\_____/\___/\_| \_/
  25. """, Fore.GREEN+"\n              ( @680068 & @RRSVC )",Fore.RED+"\n\n       ( This Tool Is Free And Not For Sell )\n")
  26.  
  27.  
  28. username = input('[?] Enter Username :')
  29. password = input('[?] Enter Password :')
  30. url_login = 'https://www.instagram.com/accounts/login/ajax/'
  31. headers_login = {
  32.         'accept': '*/*',
  33.         'accept-encoding': 'gzip, deflate, br',
  34.         'accept-language': 'en-US,en;q=0.9',
  35.         'content-length': '259',
  36.         'content-type': 'application/x-www-form-urlencoded',
  37.         'cookie': 'ig_did=A8F12857-A12B-4E23-B5D1-B40169809504; mid=YDtfbAALAAE6JNkFQPVp6Xqj9f0s; ig_nrcb=1; shbid=10475; shbts=1614503840.6921477; rur=FTW; csrftoken=T2tmvgY4ZcVStZWf2t2kFg5SkLMyeCdf',
  38.         'origin': 'https://www.instagram.com',
  39.         'referer': 'https://www.instagram.com/',
  40.         'sec-fetch-dest': 'empty',
  41.         'sec-fetch-mode': 'cors',
  42.         'sec-fetch-site': 'same-origin',
  43.         'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36',
  44.         'x-csrftoken': 'T2tmvgY4ZcVStZWf2t2kFg5SkLMyeCdf',
  45.         'x-ig-app-id': '936619743392459',
  46.         'x-ig-www-claim': 'hmac.AR2zRYl4QYaWW3AluGpM9gi7a8iKcQSNEpfuwqOqpEcqpuio',
  47.         'x-instagram-ajax': '0edc1000e5e7',
  48.         'x-requested-with': 'XMLHttpRequest',
  49.         }
  50. data_login = {
  51.         'username': f'{username}',
  52.         'enc_password': f'#PWD_INSTAGRAM_BROWSER:0:&:{password}'
  53.         }
  54. r1 = r.post(url_login, headers=headers_login, data=data_login)
  55. if '"authenticated":true' in r1.text:
  56.         print(Fore.GREEN+f"[+] Logged In >> @{username}")
  57. else:
  58.         print(Fore.RED+f'[-] Failed Login >> @{username}')
  59.         input()
  60.         sys.exit()
  61. sessionid = r1.cookies['sessionid']
  62. url = input('[?] Enter Post Url :')
  63. post_id = bot.get_media_id_from_link(self='',link=url)
  64. url_comment = f'https://www.instagram.com/web/comments/{post_id}/add/'
  65. headers_comment = {
  66.         'accept': '*/*',
  67.         'accept-encoding': 'gzip, deflate, br',
  68.         'accept-language': 'en-US,en;q=0.9',
  69.         'content-length': '42',
  70.         'content-type': 'application/x-www-form-urlencoded',
  71.         'cookie': 'ig_did=A8F12857-A12B-4E23-B5D1-B40169809504; mid=YDtfbAALAAE6JNkFQPVp6Xqj9f0s; ig_nrcb=1; shbid=10475; shbts=1614503840.6921477; csrftoken=Iytc0tyd1BTP4vRe1pi8caxVBLqPehpp; ds_user_id=434977737; sessionid='+sessionid,
  72.         'origin': 'https://www.instagram.com',
  73.         'referer': 'https://www.instagram.com/p/CL4c1-BBUD8/',
  74.         'sec-fetch-dest': 'empty',
  75.         'sec-fetch-mode': 'cors',
  76.         'sec-fetch-site': 'same-origin',
  77.         'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36',
  78.         'x-csrftoken': 'Iytc0tyd1BTP4vRe1pi8caxVBLqPehpp',
  79.         'x-ig-app-id': '936619743392459',
  80.         'x-ig-www-claim': 'hmac.AR2zRYl4QYaWW3AluGpM9gi7a8iKcQSNEpfuwqOqpEcqpgGf',
  81.         'x-instagram-ajax': '0edc1000e5e7',
  82.         'x-requested-with': 'XMLHttpRequest',
  83.         }
  84. comment = input('[?] Enter Comment :')
  85. sleep = int(input('[?] Enter Sleep :'))
  86. data_comment = {
  87.     'comment_text': f'{comment}',
  88.     'replied_to_comment_id': ''
  89. }
  90. while True:
  91.     r2 = r.post(url_comment, headers=headers_comment, data=data_comment)
  92.     if '"status":"ok"' in r2.text:
  93.         count +=1
  94.         print(Fore.GREEN+f"[{count}] Done Send Comment")
  95.         time.sleep(sleep)
  96.     else:
  97.         count +=1
  98.         print(Fore.RED+f"[{count}] Error Send Comment")
  99.         time.sleep(sleep)
  100.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×