php - No require, no include, no url rewriting, yet the script is executed without being in the url -
i trying trace flow of execution in legacy code. have report being accessed
http://site.com/?nq=showreport&action=view
this puzzle:
- in
index.php
there no$_get['nq']
or$_get['action']
(and no$_request
either), index.php
, or sources includes, not includeshowreport.php
,- in
.htaccess
there no url-rewriting
yet, showreport.php
gets executed.
i have access cpanel (but no apache config file) on server , live code cannot take liberty with.
what making happen? should look?
update
funny thing - sent client link question in status update keep him in loop; minutes latter access revoked , client informed me project cancelled. believe have taken enough care not leave traces code ...
i relieved has been taken off me now, itching know was!
thank time , help.
there "a hundreds" ways parse url - in various layers (system, httpd server, cgi script). it's not possible answer question information have got provided.
you leave quite distinct hint "legacy code". assume mean is, don't want read code, understand locate piece of application in question parsing parameter.
it if leave hints "how legacy" code is: age, php version targeted etc. can help.
it not $_get
used access these values (same true $_request
, cousins).
let's take in php 3 manual mirror:
http_get_vars
an associative array of variables passed current script via http method.
is script making use of array probably? that's guess, valid method access these parameter quite time.
anyway, must not search for. there misunderstood , mis-used (literally abused) feature called register globals php manual in php. might searching $nq
.
next that, there's request uri , apache / environment / cgi variables. see link php 3 manual above lists many of those. compare current manual broad understanding.
in case, might have grep
or multi file search available (eclipse has nice build in 1 if need inspect legacy code inside ide).
so in end of day might string nq
, 'nq'
, "nq"
or $nq
. check search brings up. string based search entry codebase don't know @ all.
Comments
Post a Comment