ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.69k stars 1.47k forks source link

2FA solutions/options? #730

Closed kapsolas closed 5 years ago

kapsolas commented 5 years ago

Please follow the guide below


Before submitting an issue, make sure you have:

Purpose of your issue?


The following sections requests more details for particular types of issues, you can remove any section (the contents between the triple ---) not applicable to your issue.

Two factor authentication approaches:

The pin can be read from a text file after X seconds.

What I was thinking was the following:

  1. Send the login request as the bot does today, if it detects 2fa in place, put a sleep for 30-60 seconds
  2. The user needs to populate a text file with the pin number.
  3. The bot comes out of sleep, reads the text file and sends the pin

I'm not a python developer, thus it would take me quite some time to implement this, but for any experts in python here, I believe this is a pretty simple modification to make.

The code change would be required in the area of

if self.send_request('accounts/login/', data, True): self.is_logged_in = True self.logger.info("Logged-in successfully as '{}'!".format(self.username)) if use_cookie: self.save_cookie(cookie_fname) self.logger.info("Saved cookie!") return True else: self.logger.info("Username or password is incorrect.") delete_credentials() return False

Anyone willing to take this modification on?

ohld commented 5 years ago

Feel free to code it by yourself and make a pull request.

kapsolas commented 5 years ago

Feel free to code it by yourself and make a pull request.

I'm not a python developer. I'll take a stab at it at some point when I have an opportunity to sit down and learn a bit more about python.

skareemoff commented 5 years ago

I added a pull request for a workaround (https://github.com/instagrambot/instabot/pull/857) When starting the bot it will ask for the code with a prompt and then login using that code and continue the rest of the execution. This is not proper solution for full automation but it works. I have been using it for a couple of weeks before deciding to contribute it here. Hope this helps.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

squelix commented 5 years ago

2fa is still not working for me ..... I don't know why, i must disable 2FA on my Instagram account to make the bot works :/