3v4l.org

run code in 300+ PHP versions simultaneously
<?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"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 102
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 42
Branch analysis from position: 38
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 73
Branch analysis from position: 69
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 73
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 102
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c8VXO
function name:  (null)
number of ops:  103
compiled vars:  !0 = $url, !1 = $msg, !2 = $domd, !3 = $html, !4 = $xp, !5 = $challengeForm, !6 = $base_url, !7 = $hc, !8 = $relative_url, !9 = $inputs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'stripos'
          1        SEND_VAR                                                 !0
          2        SEND_VAL                                                 'signin%2Fselectchallenge'
          3        DO_ICALL                                         $10     
          4        TYPE_CHECK                                  1018          $10
          5      > JMPZ                                                     ~11, ->102
    4     6    >   ASSIGN                                                   !1, 'WARNING%3A+got+a+verify+its+you+recovery+email+challenge%21%0A'
    5     7        INIT_FCALL                                               'fprintf'
          8        FETCH_CONSTANT                                   ~13     'STDERR'
          9        SEND_VAL                                                 ~13
         10        SEND_VAL                                                 '%25s'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    6    13        ECHO                                                     !1
    7    14        BEGIN_SILENCE                                    ~15     
         15        INIT_STATIC_METHOD_CALL                                  'DOMDocument', 'loadHTML'
         16        SEND_VAR                                                 !3
         17        DO_FCALL                                      0  $16     
         18        END_SILENCE                                              ~15
         19        ASSIGN                                                   !2, $16
    8    20        NEW                                              $18     'DOMXPath'
         21        SEND_VAR_EX                                              !2
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !4, $18
    9    24        INIT_METHOD_CALL                                         !4, 'query'
         25        SEND_VAL_EX                                              '%2F%2Fform%5Bcontains%28%40action%2C%22%2Fsignin%2Fchallenge%2F%22%29%5D'
         26        DO_FCALL                                      0  $21     
         27        ASSIGN                                                   !5, $21
   10    28        FETCH_OBJ_R                                      ~23     !5, 'length'
         29        IS_SMALLER_OR_EQUAL                                      ~23, 0
         30      > JMPZ                                                     ~24, ->35
   11    31    >   NEW                                              $25     'RuntimeException'
         32        SEND_VAL_EX                                              'in+%22verify+yoour+recovery+email+challenge%22%2C+could+not+find+challenge+POST+html+form%21'
         33        DO_FCALL                                      0          
         34      > THROW                                         0          $25
   13    35    >   FETCH_OBJ_R                                      ~27     !5, 'length'
         36        IS_SMALLER                                               1, ~27
         37      > JMPZ                                                     ~28, ->42
   15    38    >   NEW                                              $29     'RuntimeException'
         39        SEND_VAL_EX                                              'in+verify+yoour+recovery+email+challenge%2C+could+not+determine+which+POST+html+form+was+the+correct+1%21'
         40        DO_FCALL                                      0          
         41      > THROW                                         0          $29
   17    42    >   INIT_METHOD_CALL                                         !5, 'item'
         43        SEND_VAL_EX                                              0
         44        DO_FCALL                                      0  $31     
         45        ASSIGN                                                   !5, $31
   18    46        INIT_METHOD_CALL                                         !7, 'getinfo'
         47        FETCH_CONSTANT                                   ~33     'CURLINFO_EFFECTIVE_URL'
         48        SEND_VAL_EX                                              ~33
         49        DO_FCALL                                      0  $34     
         50        ASSIGN                                                   !6, $34
   19    51        INIT_METHOD_CALL                                         !5, 'getAttribute'
         52        SEND_VAL_EX                                              'action'
         53        DO_FCALL                                      0  $36     
         54        ASSIGN                                                   !8, $36
   20    55        INIT_FCALL_BY_NAME                                       'merge_relative_absolute_urls'
         56        SEND_VAR_EX                                              !6
         57        SEND_VAR_EX                                              !8
         58        DO_FCALL                                      0  $38     
         59        ASSIGN                                                   !0, $38
   22    60        INIT_FCALL_BY_NAME                                       'getDOMDocumentFormInputs'
         61        SEND_VAR_EX                                              !2
         62        SEND_VAL_EX                                              <true>
         63        SEND_VAL_EX                                              <false>
         64        DO_FCALL                                      0  $40     
         65        ASSIGN                                                   !9, $40
   23    66        COUNT                                            ~42     !9
         67        IS_NOT_IDENTICAL                                         ~42, 2
         68      > JMPZ                                                     ~43, ->73
   24    69    >   NEW                                              $44     'LogicException'
         70        SEND_VAL_EX                                              'GOOGLE+CHANGED+SOMETHING%2C+SUPPOSED+TO+BE+2x+FORM+INPUTS+HERE+%28and+i+only+care+about+the+first+1...%29'
         71        DO_FCALL                                      0          
         72      > THROW                                         0          $44
   26    73    >   INIT_FCALL                                               'var_export'
         74        SEND_VAR                                                 !9
         75        DO_ICALL                                                 
   28    76        FETCH_DIM_R                                      ~47     !9, 0
         77        FREE                                                     ~47
   29    78        INIT_METHOD_CALL                                         !7, 'setopt_array'
   30    79        FETCH_CONSTANT                                   ~48     'CURLOPT_URL'
         80        INIT_ARRAY                                       ~49     !0, ~48
   31    81        FETCH_CONSTANT                                   ~50     'CURLOPT_POST'
         82        ADD_ARRAY_ELEMENT                                ~49     1, ~50
   32    83        FETCH_CONSTANT                                   ~51     'CURLOPT_POSTFIELDS'
         84        ADD_ARRAY_ELEMENT                                ~49     !9, ~51
         85        SEND_VAL_EX                                              ~49
         86        DO_FCALL                                      0  $52     
   33    87        INIT_METHOD_CALL                                         $52, 'exec'
         88        DO_FCALL                                      0          
   34    89        INIT_FCALL_BY_NAME                                       'hhb_var_dump'
         90        INIT_METHOD_CALL                                         !7, 'getStdErr'
         91        DO_FCALL                                      0  $54     
         92        SEND_VAR_NO_REF_EX                                       $54
         93        INIT_METHOD_CALL                                         !7, 'getStdOut'
         94        DO_FCALL                                      0  $55     
         95        SEND_VAR_NO_REF_EX                                       $55
         96        SEND_VAR_EX                                              !9
         97        DO_FCALL                                      0  $56     
         98      > EXIT                                                     
         99*       BW_AND                                           ~57     $56, <true>
        100*       FREE                                                     ~57
   36   101*       EXIT                                                     'FIXME+RECOVERY+EMAIL+CHALLENGE'
   37   102    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.85 ms | 1404 KiB | 19 Q