Open devopslinux opened 6 years ago
I believe I'm having the same problem. For me when I run the spider.php script on the command line, the only thing it does is output the admin HTML login form to stdout.
What I did was edit admin/auth.php and add a second elseif() test under the $_SESSION['admin'] checks on line 26:
// admin.php redirect code ends here
} elseif (isset($_SESSION['admin']) && isset($_SESSION['admin_pw']) &&$_SESSION['admin'] == ADMIN && $_SESSION['admin_pw'] == PASSW) {
// my addition } elseif (isset($_SERVER['argc']) && $_SERVER['argc'] >= 2) {
} else {
// Sphider Admin Login HTML code starts here
I believe my changes are safe, as it should only allow the execution of the code when run from the command line.
I Can't execute spidering by command line php spider.php -u http://www.domain.com/test.html -d 2 What can I do?