Skip to content

Instantly share code, notes, and snippets.

@k2tzumi
Created November 11, 2023 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k2tzumi/88e74f6a8d3b52562a07ecada941967d to your computer and use it in GitHub Desktop.
Save k2tzumi/88e74f6a8d3b52562a07ecada941967d to your computer and use it in GitHub Desktop.
A runn scenario where you try to break Google's Auth authentication using the Chrome DevTools Protocol and get played.
desc: Scenario of trying to break Google's Auth authentication using Chrome DevTools Protocol and getting played.
runners:
cc: chrome://new
vars:
email: ${EMAIL}
steps:
clickLogin:
desc: "Click Login button"
cc:
actions:
- navigate: https://zenn.dev/
- click: '#__next > header > div > div > div > div > button'
- waitVisible: 'body > div.ReactModalPortal'
loginWithGoogle:
desc: 'Click on the "Login with Google" button'
cc:
actions:
- click: 'body > div.ReactModalPortal > div > div > div > div > div > div > div > button'
- waitVisible: '#initialView'
- location
test: |
current.url startsWith "https://accounts.google.com/"
inputMailAddress:
desc: 'Enter your email address'
cc:
actions:
- sendKeys:
sel: 'input[name=identifier]'
value: '{{ vars.email }}'
- wait:
time: '1sec'
- setUserAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36'
- click: '#identifierNext > div > button'
- wait:
time: '1sec'
- screenshot
saveScreenShot:
desc: 'Save screenshot'
dump:
expr: steps.inputMailAddress.png
out: screenshot.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment