<?php
if (false !== stripos($url, "signin/selectchallenge")) {
$msg = "WARNING: got a verify its you recovery email challenge!\n";
fprintf(STDERR, "%s", $msg);
echo $msg;
$domd = @DOMDocument::loadHTML($html);
$xp = new DOMXPath($domd);
$challengeForm = $xp->query('//form[contains(@action,"/signin/challenge/")]');
if ($challengeForm->length <= 0) {
throw new \RuntimeException('in "verify yoour recovery email challenge", could not find challenge POST html form!');
}
if ($challengeForm->length > 1) {
// google changed something, xpath needs an update..
throw new \RuntimeException("in verify yoour recovery email challenge, could not determine which POST html form was the correct 1!");
}
$challengeForm = $challengeForm->item(0);
$base_url = $hc->getinfo(CURLINFO_EFFECTIVE_URL);
$relative_url = $challengeForm->getAttribute("action");
$url = merge_relative_absolute_urls($base_url, $relative_url);
//hhb_var_dump($base_url,$relative_url,$url) & die();
$inputs = getDOMDocumentFormInputs($domd, true, false);
if (count($inputs) !== 2) {
throw new \LogicException("GOOGLE CHANGED SOMETHING, SUPPOSED TO BE 2x FORM INPUTS HERE (and i only care about the first 1...)");
}
var_export($inputs);
//hhb_var_dump($inputs) & die();
$inputs[0];
$hc->setopt_array(array(
CURLOPT_URL=>$url,
CURLOPT_POST=>1,
CURLOPT_POSTFIELDS=>$inputs,
))->exec();
hhb_var_dump ( $hc->getStdErr (), $hc->getStdOut (), $inputs ) & die ();
die("FIXME RECOVERY EMAIL CHALLENGE");
}
Warning: Undefined variable $url in /in/c8VXO on line 3
Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/c8VXO on line 3
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: Undefined variable $url in /in/c8VXO on line 3
Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /in/c8VXO on line 3
Output for 8.0.0 - 8.0.30
Warning: Undefined variable $url in /in/c8VXO on line 3