Repository navigation
Examples
English · 中文
Three examples ship inside the package, so you do not need to clone the repository. Each one drives the site's own JavaScript to produce the parameters it demands and then completes the flow end to end. None of them injects or replaces browser APIs.
Strictly prohibited for any unlawful use. The examples are provided solely for research into a new generation of AI browsers. Live results depend on current network conditions and each site's present responses.
| Name | System | Category | Default target |
|---|---|---|---|
akamai |
Akamai Bot Manager 3.x | sensor_data + sbsd challenge |
https://www.radissonhotels.com/zh-cn/ (change with --url) |
datadome |
DataDome | interstitial device-check (plv2 + plv3) | https://www.mouser.cn/ |
creepjs |
CreepJS | fingerprint audit, every section | https://abrahamjuliot.github.io/creepjs/ |
python -m ruyijs.examples # list the bundled examples
python -m ruyijs.examples akamai # Akamai Bot Manager 3.x
python -m ruyijs.examples datadome # DataDome interstitial device-check
python -m ruyijs.examples creepjs # CreepJS fingerprint audit
python -m ruyijs.examples akamai --help # all options of one exampleEverything after the example name is passed on to the example script. python -m ruyijs.examples with no name (or -h, --help, list) prints the list. The exit code is the script's own — 0 when the flow passed, 1 otherwise; an unknown name exits with 2.
python .\examples\akamai\akamai.py
python .\examples\DataDome\datadome.py
python .\examples\creepjs\creepjs.pyWhen the checkout has a local runtime (dist/js.exe, or dist/js on macOS), the scripts import the package from python/; otherwise they use the installed ruyijs. The DataDome and CreepJS scripts also switch to the source package when RUYIJS_SHELL is set.
| Flag | Meaning |
|---|---|
--proxy URL |
Use this HTTP(S) proxy, e.g. --proxy http://127.0.0.1:7890. |
--direct |
Connect directly; cannot be combined with --proxy. |
--output PATH |
Save the JSON result to a file, e.g. --output result.json. |
--help |
Show every option. |
Without --proxy or --direct, each example picks a proxy itself: the HTTPS_PROXY / https_proxy / HTTP_PROXY / http_proxy environment variables, then http://127.0.0.1:7890 if something listens there, otherwise a direct connection.
Gets past the two Akamai gates — sensor_data (_abck cookie) and the sec-if-cpt sbsd challenge (bm_sc cookie) — and reaches the real page.
-
Flow: select the system clock and a full Firefox-on-Windows profile whose user agent matches
--tls;navigate()to the target; let the challenge page load the sensor_data and sbsd scripts, which collect the environment and POST on their own; if_abckstill needs it, dispatch trusted mouse events withdispatch_input(); wait for the page's own reload to the real page. -
Options:
--url(defaulthttps://www.radissonhotels.com/zh-cn/),--timeoutoverall seconds (default 180),--output/-o,--tlsFirefox version 100–159 for both the TLS ClientHello and the User-Agent (default 159),--proxy/--direct.--test-apiis accepted but not used by the current script. -
Result: exit code 0 when the real page is reached. The JSON report includes a network summary, the cookie jar (
export_cookies()) and recent console records. - Background, request sequence and recorded runs: examples/akamai/README.md.
python -m ruyijs.examples akamai --direct --output result.json
python -m ruyijs.examples akamai --tls 120Runs DataDome's interstitial flow from the blocked homepage to a 200 response.
-
Flow:
navigate()to the homepage, which answers 403 and opens the interstitial iframe; DataDome's own JavaScript collects the environment, computespayload(plv2) andplv3and POSTs them; the returneddatadomecookie lands in the Necko cookie jar; the script then fetches the homepage with that cookie. -
Setup:
Context(timeout=90, proxy=..., environment=...)with screen, viewport and timezone; the POST is read back fromnet_log(). -
Options:
--proxy/--direct,--output(default:datadome_result.jsonnext to the script). -
Result: exit code 0 when the homepage returns 200. The homepage verdict is DataDome's server-side score (see docs/macos.md), so a run can end as submitted but not passed (
PARTIAL). - Flow diagram and sample output: examples/DataDome/README.md.
Runs the full CreepJS page and reports its verdict.
-
Flow: system clock,
navigate(), thenadvance()until both the loose and the stable fingerprint are reported. Pass/fail per section comes from the page's ownconsole.logoutput and the FP ID from the rendered page; nothing is injected. -
Options:
--proxy/--direct,--timeoutoverall deadline in seconds (default 60),--output(the JSON is printed either way). -
Output fields:
fpId,fuzzy,passed(section → milliseconds),failed,notRun,consoleErrors,scriptErrors,ok,elapsedSeconds. - Result: exit code 0 when fingerprinting completed, the loose and stable fingerprints both passed and no section failed.
- Details and the capabilities added for this example: examples/creepjs/README.md.
- Call
configure_clock("system")beforenavigate()on live sites. - Loop
advance(ms, max_tasks=...)and check the page state witheval()after each step. - Wrap
advance()intry/except JSErrorto record page script errors and keep going. - Build the report from
net_log(),console_log()andexport_cookies(). - Keep
tls=and thenavigator.userAgentversion together.
The index of examples in the repository is examples/README.md.
ruyiJS · GitHub · PyPI · LinuxDO · License: AGPL-3.0-only or commercial