Created
May 13, 2011 16:21
-
-
Save kaldas/970827 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require "yahttp.class.php"; | |
| //config | |
| error_reporting(0); | |
| set_time_limit(0); | |
| ini_set("default_socket_timeout",5); | |
| $newLine = "<br>\n"; | |
| //html interface | |
| echo '<br><form name="form" method="post" action=""> | |
| Host: <input type="text" name="host" /> Port: <input name="port" | |
| type="text" value="80" size="6" /> Path: <input name="path" type="text" | |
| value="/" /><br><br>Dirs: (one per line)<br><br> <textarea name="dirs" | |
| cols="45" rows="5">imagens/</textarea><br><br><input type="submit" | |
| name="button" id="button" value="Submit" /></form>'; | |
| if(empty($_REQUEST['host'])) /* if no user input came then nothing to be done */ | |
| exit; | |
| echo $newLine."Starting response scan at ".$_REQUEST['host'].$newLine; | |
| Yahttp::$host = $_REQUEST['host']; | |
| Yahttp::$port = $_REQUEST['port']; | |
| Yahttp::$path = $_REQUEST['path']; | |
| $dirlist = explode("\n",$_REQUEST['dirs']); | |
| foreach($dirlist as Yahttp::$currdir) | |
| { | |
| $output =& Yahttp::getResponseCode(); | |
| if($output) | |
| echo $output.$newLine; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment