Skip to content

Commit

Permalink
Merge pull request #5 from juancarlosm/google-page-changes
Browse files Browse the repository at this point in the history
fix handle_captcha_new with form data
  • Loading branch information
mestuddtc authored May 2, 2024
2 parents 8359d4a + fe70a3b commit d363cad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions aws_google_auth/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,16 @@ def handle_captcha_new(self, response_page, payload):
except NameError:
captcha_input = input("Captcha (case insensitive): ") or None

# Add form inputs
for tag in response_page.find_all('input'):
if tag.get('name') is None:
continue
payload[tag.get('name')] = tag.get('value')

# Set bg_response in request payload to passwd challenge
if self.config.bg_response:
payload['bgresponse'] = self.config.bg_response

# Update the payload
payload['ca'] = captcha_input

Expand Down

0 comments on commit d363cad

Please sign in to comment.