harrypython / itsagramlive

It's A Gram Live is a Python script that create a Instagram Live and provide you a rtmp server and stream key to streaming using sofwares like OBS-Studio.
GNU General Public License v3.0
175 stars 51 forks source link

Infinity Checkpoint #12

Closed osyduck closed 4 years ago

osyduck commented 4 years ago

I got infinity checkpoint, I've clicked "this was me" but when I start to login, it happened again. Please add verify method by phone or email

crprata commented 4 years ago

Hello,

Thanks for your job @harrypython ! I'm having the same difficulty.

root@vps21652:~/itsagramlive# python3 live_broadcast.py -u user -p pass Let's do it! Two factor required Enter verification code: 918765

So, when I go to the app and click "this was me" it happened again when I run live_broadcast.py and I can't use it.

Could you check if has a solution?

harrypython commented 4 years ago

Hello guys,

I've clicked "this was me" Are you log in with Facebook?

Please add verify method by phone or email It's working 2FA for SMS and TOTP apps, do you try any of this methods?

crprata commented 4 years ago

Hello,

Thanks for you quick reply. Sorry, I don't know if my problem it's the same of the guy above.

I'm not login with facebook. I'm login using 2FA for SMS. When I write the code, i receive this error: ERROR(400): challenge_required

Even though I disable the 2FA, I continue receiving this error when I try login: root@vps21652:~/itsagramlive# python3 live_broadcast.py -u user -p pass

ERROR(400): challenge_required

I've tried using proxy, using on another server with other IP, nothing fixes. I keep getting the same error with an my specific account, as if there were some parameter fixed in the python script that would allow instagram to identify the access and suppose to that it is not a "human".

harrypython commented 4 years ago

@crprata try this:

  1. Open your Instagram App
  2. Going Settings
  3. Security
  4. Login Activity
  5. look for "star2qltecs" tap on the 3 dots and logout

The other suggestion is: change your password

Let me know if works.

crprata commented 4 years ago

@harrypython I've already change my password, didn't work.

I cannot see "star2qltecs" on Login Activity (I only see one session of my browser and one of my phoneapp). Instagram is blocking access then I try access through python. When I try i receive this message: root@vps21652:~/itsagramlive# python3 live_broadcast.py -u user -p pass Let's do it!

When I reply this challenge in my browser and try again, instagram asks for the challenge again and interrupt access with the * ERROR(400): challenge_required . Because of this I think the guy above called this issue of "infinity checkpoint".

crprata commented 4 years ago

@harrypython maybe this could help to fix: https://gist.github.com/Nerixyz/7f65bc19e5e666865a2682fb509a5d83 https://github.com/zProAle/InstaLive-PHP/blob/master/live.php#L46 \InstagramAPI\Instagram::$allowDangerousWebUsageAtMyOwnRisk = false;

harrypython commented 4 years ago

I need help to reproduce this "challenge_required" error.

  1. The account use a 2FA? Which one?
  2. Are you using a proxy or something else that can create this "unusual login" trigger?
  3. Do you have a test account I can use where this "challenge_required" error happens?
crprata commented 4 years ago

@harrypython

  1. This happens regardless of 2FA. In accounts with it enabled or disabled.

  2. No, the checkpoint challenge error happens randomly, when instagram suspects that the access is made from a suspicious place or that is not a "human". In my experience, in 50% of cases, using this "python script" in the first access, Instagram asks for the challenge. If it doesn't happen to you, you can try to force the "challenge" putting your password wrong through "python script" for 3 times sequentially and, after this, putting the correct password in an account that has never received a session/login from "python script".

  3. Not at the moment, I've tested only with real accounts. But I'll try to create a test account to send you.

For your better comprehension, the challenge checkpoint also has verification methods, similar to 2FA. When I use a mobile (or a script simulating a mobile) and the checkpoint challenge happens, Instagram sends a question to another logged session asking to confirm "if it was me" (see: https://prnt.sc/snlfgc). In theory, when I mark "it was me", Instagram should give access to the "script" , but it's not happening because of a cookie problem/protection, which causes an "infinite loop checkpoint challenge". When I try to login using a desktop (or simulating a desktop session), the verification method used by challenge checkpoint is: send a SMS or an E-mail to confirm it, similar to 2FA. When challenge uses SMS/E-mail instead of the other method verification, it works. So, the solution for guys has been "forcing" instagram to use SMS/Email verification method to challenge checkpoint instead of the option "it was me" in another logged session.

maybe this could help to fix: https://webcache.googleusercontent.com/search?q=cache:fWFhN7sEn8sJ:https://gitmemory.com/issue/LevPasha/Instagram-API-python/718/568266268

And this: (see choice: '1'): https://gist.github.com/Nerixyz/7f65bc19e5e666865a2682fb509a5d83 https://github.com/zProAle/InstaLive-PHP/blob/master/live.php#L46

I hope to have helped.

harrypython commented 4 years ago

@crprata great job explaining the case.

The method on the old LevPasha/Instagram-API-python looks a good solution, but it's impossible developer the solution without reproduce the "challenge_required" error.

I try with different accounts without success. When you have an account where I can take the test let me know.

Is using 2fa a way to avoid this error? Can be this a solution @osyduck ?

crprata commented 4 years ago

@harrypython I've tried too, but it seems like happens only with real accounts that exists by a few months. 2FA doesn't avoid this error. When some account uses 2FA, instagram asks for one first code for challenge checkpoint and after that asks for another code for 2FA to give it the access.

Have you checked this links? Maybe they could be useful to develop an solution (But I know that is hard to test if it could work without reproduces the error): https://webcache.googleusercontent.com/search?q=cache:fWFhN7sEn8sJ:https://gitmemory.com/issue/LevPasha/Instagram-API-python/718/568266268 And this: (see choice: '1'): https://gist.github.com/Nerixyz/7f65bc19e5e666865a2682fb509a5d83 https://github.com/zProAle/InstaLive-PHP/blob/master/live.php#L46

@osyduck do you have an account that could be used by @harrypython to reproduce the challenge?

crprata commented 4 years ago

@harrypython I have a colleague account stuck at challenge checkpoint. Unfortunately, I cannot give you access. But I can test in my environment if you send a possible solution. Thanks!

osyduck commented 4 years ago

@crprata thanks for your explain but I didn't use any 2fa. This checkpoint appears when I use instagram private api for the first time. I've been using another library(javascript) and it worked. Please try InstaLogin

osyduck commented 4 years ago

image

just add verify method by using email or phone

harrypython commented 4 years ago

@crprata try harrypython/itsagramlive/tree/issue-12

crprata commented 4 years ago

@harrypython it didn't work! ;/ Same error. No code was sent by Instagram for the challenge and the script didn't give the option to type it.

$ python3 live_broadcast.py -u user -p pass Let's do it! Two factor required Enter verification code: 803672

crprata commented 4 years ago

@harrypython Even in accounts without 2FA it also doesn't work, doesn't ask or send the challenge code.

$ python3 live_broadcast.py -u user -p pass Let's do it!

harrypython commented 4 years ago

@crprata it's possible you debug the application?

osyduck commented 4 years ago

@harrypython this is the challenge response

{'message': 'challenge_required', 'challenge': {'url': 'https://i.instagram.com/challenge/3130860500/dFTjfWbPw3/', 'api_path': '/challenge/3130860500/dFTjfWbPw3/', 'hide_webview_header': True, 'lock': True, 'logout': False, 'native_flow': True, 'challenge_context': '{"step_name": "", "nonce_code": "dFTjfWbPw3", "user_id": 3130860500}'}, 'status': 'fail', 'error_type': 'checkpoint_challenge_required'} <Response [400]>

osyduck commented 4 years ago

@harrypython please take a look at this python code . It would help you.

crprata commented 4 years ago

@harrypython same responde of @osyduck to me.

harrypython commented 4 years ago

@harrypython please take a look at this python code . It would help you.

Thank you

harrypython commented 4 years ago

Please update the branch 12 and give me the output again, the output will help me to move forward

crprata commented 4 years ago

@harrypython good neews! It's working! Good job, thanks! The only thing I verified is that after I've put the challenge code, I needed to run the script again to login. See output:

$ python3 live_broadcast.py -u user -p pass Let's do it! Choose a challenge mode (0 - SMS, 1 - Email): 0 Enter the code: 372109 $ python3 live_broadcast.py -u user -p pass Let's do it! You'r logged in 17856002782988004?s_efg=eyJxZV9ncm91cHMiOnsiaWdfbGl2ZV9lbmFibGVfcG9wX3ByaW1pbmciOnsiZW5hYmxlZCI6InRydWUifSwiaWdfbGl2ZV9ub3RpZmljYXRpb25zX2FmdGVyX2ZpcnN0X21wZF91bml2ZXJzZSI6W10sImlnX2xvd19sYXRlbmN5X3Byb2R1Y3Rpb25fdW5pdmVyc2UiOnsiZW5hYmxlZCI6InRydWUifX19&s_sw=0&s_vt=ig&a=AbwHaU3NfrbsoEQn Broadcast ID: {}

harrypython commented 4 years ago

Amazing work guys, thank you so much for your help.