mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2026-09-24 14:20:08 +01:00
debug: fix the tamper probe's escaping
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
3eeba1616b
commit
8aa5f921e0
+8
-6
@@ -86,12 +86,14 @@ async def main() -> None:
|
||||
log(f"### {URL} budget={BUDGET}s")
|
||||
async for dep in get_browser():
|
||||
try:
|
||||
log(f" attachShadow patched: {not await dep.page.evaluate(
|
||||
'() => /\\\\[native code\\\\]/.test('
|
||||
'Element.prototype.attachShadow.toString())'
|
||||
)}")
|
||||
except Exception: # noqa: BLE001
|
||||
pass
|
||||
native = await dep.page.evaluate(
|
||||
"() => Element.prototype.attachShadow.toString()"
|
||||
)
|
||||
flagged = await dep.page.evaluate("() => '_shadowRootPatched' in window")
|
||||
log(f" attachShadow native: {'[native code]' in native}")
|
||||
log(f" _shadowRootPatched flag on window: {flagged}")
|
||||
except Exception as exc: # noqa: BLE001
|
||||
log(f" tamper probe failed: {str(exc)[:80]}")
|
||||
|
||||
watcher = asyncio.create_task(watch(dep.page, BUDGET))
|
||||
started = time.perf_counter()
|
||||
|
||||
Reference in New Issue
Block a user