Question: Find out the correct output of the following :
<?php
ini_set("max_execution_time",120);
$rangeStart = 0;
$rangeStop = 1024;
$target = "localhost";
$range= range($rangeStart,$rangeStop);
echo "<p>Scan results for $target</p>";
foreach($range as $p){
$result=@fsockopen($target,$p,$errno,$errstr,1);
if($result) echo "<p>Socket open at port $p</p>";
}
?>
AScan results for localhost
Socket open at port 631
Socket open at port 22
Socket open at port 80
BSocket open at port 22
Socket open at port 80
Socket open at port 631
Scan results for localhost
CScan results for localhost
Socket open at port 22
Socket open at port 80
Socket open at port 631
DScan results for localhost
Socket open at port 80
Socket open at port 28
Socket open at port 631
Note: Not available