subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.21k stars 667 forks source link

[BUG] HACKED LOCK CHALLANGE #1022

Open tinerci opened 1 year ago

tinerci commented 1 year ago

cl.account_edit() => email to challange hacked lock. ChallengeResolve: Unknown step_name "select_contact_point_recovery" for "dmlaevci" in challenge resolver: {'step_name': 'select_contact_point_recovery', 'step_data': {'choice': '1', 'email': 'h*******7@s*****.ga', 'hl_co_enabled': True, 'sigp_to_hl': False}, 'flow_render_type': 3, 'bloks_action': 'com.instagram.challenge.navigation.take_challenge', 'nonce_code': '6FcMh2uApZ', 'user_id': 1116469927, 'cni': 18330536452053928, 'challenge_context': '{"step_name": "select_contact_point_recovery", "nonce_code": "6FcMh2uApZ", "user_id": 1116469927, "cni": 18330536452053928, "is_stateless": false, "challenge_type_enum": "HACKED_LOCK", "present_as_modal": false}', 'challenge_type_enum_str': 'HACKED_LOCK', 'status': 'ok'}

Maxr1998 commented 1 year ago

Same issue here, second time it has happened in three days:

raise ChallengeUnknownStep(f'ChallengeResolve: Unknown step_name "{step_name}" for "{self.username}" in challenge resolver: {self.last_json}')                               
instagrapi.exceptions.ChallengeUnknownStep: ChallengeResolve: Unknown step_name "delta_acknowledge_approved" for "None" in challenge resolver:
{
    'step_name': 'delta_acknowledge_approved',
    'step_data': {
        'decision_classification': 'UNKNOWN',
        'enrollment_reason': '{"reason": "USR user data scraping", "policy_name": null}',
        'enrollment_system_context': '',
        'enrollment_time': 1670791719,
        'sigp_to_hl': True,
        'system_id': '***',
        'take_down_ux_template': 'default',
        'violation_type': '22',
        'secure_contact_point_type_email': 'trusted',
        'trusted_email': '***',
        'trusted_email_signature': '***',
        'trusted_email_origin': 'ig:at:rg',
        'email': '***',
        'secure_contact_point_type_phone': '',
        'trusted_phone_number': '',
        'trusted_phone_number_signature': '',
        'trusted_phone_number_origin': '',
        'phone_number': '',
        'is_logged_in': True
    },
    'flow_render_type': 3,
    'bloks_action': 'com.instagram.challenge.navigation.take_challenge',
    'cni': ***,
    'challenge_context': '{"step_name": "delta_acknowledge_approved", "cni": ***, "is_stateless": false, "challenge_type_enum": "HACKED_LOCK", "present_as_modal": false}',
    'challenge_type_enum_str': 'HACKED_LOCK',
    'status': 'ok'
}
0wulf commented 1 year ago

Hey there im experiencing the same problem here (step_name: select_contact_point_recovery), i have figured out that i can bypass this challenge if i log in through my navigator first. Then close it up and start the bot. For me it seems that instagram changed the name for its resolve contact form challenge, or something like that. Traceback and debugging ive found that challenge.py mixin isnt deriving this step correctly image It seems like the try isnt raising a CallengeRequiered exception and thus returning the challenge_resolve_simple function return and not the challenge_resolve_contact_form return. Probably the best way to fix this bug is hacking into private.py mixin but it seems that its easier to just add an elif at challenge_resolve_simple for handling this step_name.

tinerci commented 1 year ago

why ?

0wulf commented 1 year ago

why what? i dont understand your question

reddere commented 1 year ago

i can bypass this challenge if i log in through my navigator first

Does this still work as a fix? what do you mean by "logging in through navigator"?

Probably the best way to fix this bug is hacking into private.py mixin but it seems that its easier to just add an elif at challenge_resolve_simple for handling this step_name.

Can you make a pull request for this? Im pretty sure adw0rd will accept this, @0wulf

tinerci commented 1 year ago

why what? i dont understand your question

i can bypass this challenge if i log in through my navigator first

Does this still work as a fix? what do you mean by "logging in through navigator"?

Probably the best way to fix this bug is hacking into private.py mixin but it seems that its easier to just add an elif at challenge_resolve_simple for handling this step_name.

Can you make a pull request for this? Im pretty sure adw0rd will accept this, @0wulf

hello, when you log in with the new device, the e-mail and phone number of the account cannot be changed anymore. Let's say it has changed. After 10 minutes, the account drops to security. It is necessary to create a solution for this.

reddere commented 12 months ago

why would you need to change mail or phone number @tinerci

0wulf commented 12 months ago

the problem was that there wasnt a handler for the "im not a robot" step in logging in, pretty sure the bot had a way of doing this but a way for instagram to lower bots is to change constanty. i bypassed the step by doing it myelf, i was running a gui of geckodriver so wasnt something i was trying to do fully by code, but it surely was annoying. i droped my project because of (in small part) that bug if you dealing with the gui driver you could probably set up selenium to do that part, but keep in mind that headless is faster and gui slower. probably there is a way to avoid doing that part by saving cookies or cache, maybe the way to go, because other ways seems a little hacky to me and not a real solution