pub trait JavascriptInterpreter: Send + Sync {
// Required method
fn solve_challenge(
&self,
page_html: &str,
host: &str,
) -> Result<String, InterpreterError>;
// Provided method
fn execute(
&self,
script: &str,
host: &str,
) -> Result<String, InterpreterError> { ... }
}Expand description
Abstraction over JavaScript runtimes capable of solving Cloudflare logic.
Required Methods§
Sourcefn solve_challenge(
&self,
page_html: &str,
host: &str,
) -> Result<String, InterpreterError>
fn solve_challenge( &self, page_html: &str, host: &str, ) -> Result<String, InterpreterError>
Evaluate a challenge page and return the solved answer formatted with 10 decimal places.