PHP: Scanner les ports

Author:


Download


<?php

   // Définir le temps d''exécution de Scan
   ini_set("max_execution_time",90);
   $cible = "www.exemple.com";
    echo "<p>Résultat de scan pour $cible</p>";
   for($port=0;$port<1024;$port++)
   {
         $resultat = @fsockopen($cible, $port,$errno,$errstr,1);
         if ($resultat)
         echo "<p>une Socketet est ouverte au port: $port</p>";

   }
?>

Leave a Reply

Your email address will not be published. Required fields are marked *


eight + 7 =