CreaCaptcha

Test_Bypass_Command
in package

`wp creacaptcha test-bypass`

Table of Contents

Methods

__invoke()  : void
Simulates the bypass evaluation with the supplied flag values. Flags are optional — anything not provided is treated as non-matching.
note_ip_resolution_gap()  : void
Points out that `--ip` skips the client-IP resolution a real request goes through — but only when the site is actually configured to resolve a forwarded IP, because only then can simulation and reality diverge.

Methods

__invoke()

Simulates the bypass evaluation with the supplied flag values. Flags are optional — anything not provided is treated as non-matching.

public __invoke(array<int, string> $args, array<string, string|array<int, string>> $assoc_args) : void

Exit code: 0 if the request would be bypassed, 1 otherwise.

Was dieses Werkzeug tut — und was nicht (CLI-9): Es ist ein REGEL-SIMULATOR. Die übergebenen Werte werden unverändert gegen die Bypass-Regeln gehalten. Ein echter Request durchläuft vorher creationell_captcha_get_client_ip(), das je nach Proxy-Konfiguration eine ANDERE IP ermittelt als die des unmittelbaren Peers. „Kein Bypass" ist deshalb eine Aussage über die Regeln bei DIESER Eingabe, kein Nachweis, dass ein realer Request nicht durchkommt.

OPTIONS

[--ip=] : IP address (IPv4 or IPv6) to test against the IP allowlist. Wird unverändert an die Regelprüfung übergeben — siehe die Anmerkung zur Proxy-Auflösung oben. Eine IPv4-mapped Schreibweise (::ffff:a.b.c.d, wie sie REMOTE_ADDR auf manchen Servern liefert) muss NICHT vorab umgeschrieben werden: creationell_captcha_ip_in_list() — die einzige Engstelle, durch die die Erlaubnisliste läuft — kanonisiert das Subjekt seit 1.1.0 selbst, unabhängig vom Aufrufer.

[--ua=] : User-Agent string to test against the UA bypass patterns.

[--cookie=<name_value>] : Cookie pair to test against the cookie bypass list (format: name=value). Mehrere Cookies in EINEM Flag, mit ; getrennt — WP-CLI wertet bei mehrfach angegebenem --cookie nur das LETZTE aus, die früheren verschwinden ohne Meldung.

EXAMPLES

wp creacaptcha test-bypass --ip=203.0.113.4
wp creacaptcha test-bypass --ua="Mozilla/5.0"
wp creacaptcha test-bypass --cookie="my_pass=abc"
wp creacaptcha test-bypass --cookie="my_pass=abc; other=xyz"
wp creacaptcha test-bypass --ip=203.0.113.4 --ua="GoogleBot" --cookie="my_pass=abc"
Parameters
$args : array<int, string>

Positional arguments.

$assoc_args : array<string, string|array<int, string>>

Associative arguments.

Tags
when

after_wp_load

note_ip_resolution_gap()

Points out that `--ip` skips the client-IP resolution a real request goes through — but only when the site is actually configured to resolve a forwarded IP, because only then can simulation and reality diverge.

private note_ip_resolution_gap(string|null $ip) : void
Parameters
$ip : string|null

The value passed as --ip, or null.


        
On this page

Search results