INNER CODE UNIT · Python

_send

shuvonsec/claude-bug-bounty · demo/app.py:137

    def _send(self, status: int, body: bytes, headers: dict) -> None:
        self.send_response(status)
        for k, v in headers.items():
            self.send_header(k, v)
        self.send_header("Content-Length", str(len(body)))
        self.send_header("X-Powered-By", "shuvonsec/1.0")
        self.end_headers()
        self.wfile.write(body)

    def do_GET(self):  # noqa: N802
        parsed = urllib.parse.urlparse(self.path)
        path = parsed.path
        qs = urllib.parse.parse_qs(parsed.query, keep_blank_values=True)

        # Routes ──────────────────────────────────────────────────────────
        if path == "/":
            return self._send(*_html(LANDING))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…