Scripts | Codes

All languages in three languages :-)
Showing posts with label ports. Show all posts


Un scanner de ports très petit...

Utilisation: [exemple]
perl scan.pl 127.0.0.1 0 55555
Va scanner le localhost du port 0 à 55555

A very small port scanner...

Usage: [example]
perl scan.pl 127.0.0.1 0 55555
Will scan all ports from 0 to 55555 on the localhost

يسمح بمسحح كل منافذ الكمبيوترو صغير جدا

يسمح بمسحح كل منافذ الكمبيوترو صغير جدا
 مثال عن الاستعمال‎ 
perl scan.pl 127.0.0.1 0 66666
يسمح بمسح كل المنافذ من ٠ إلى ٦٦٦٦٦ على لوكالهوست 

Open in a new window
<?
//#################################################
// find more codes on codes-n-scripts.blogspot.com
//#################################################
?>
<html>
 <head>
  <title>Web Ping</title>
  <style type='text/css'>
   pre {
    background:black;
 border:1px lime solid;
 color:lime;
   }
   td {
    font-family:monospace;
   }
  </style>
 </head>
 <body>
  <?php

   # clean the strings to prevent injection attacks
   $BADCHARS='/[^\.\w]/';
   $HOST=preg_replace($BADCHARS, '', $_GET['host']);
   $C=preg_replace($BADCHARS, '', $_GET['c']);
   $I=preg_replace($BADCHARS, '', $_GET['i']);
 
   if ($I=="") { $I=1; } # assign default values
   if ($C=="") { $C=4; } # assign default values

   if ($HOST!="") { # this is where the magic happens
    echo '<pre>';
    $last_line = system('/bin/ping '.$HOST.' -c '.$C.' -i '.$I, $retval);
    echo '</pre>';
   }
 
  ?>
  <form action='ping.php' method='get'>
   <table>
    <tr>
     <td>Hostname/IP:</td><td><input type='text' name='host' value='<?php echo $HOST ?>'/></td>
    </tr>
 <tr>
  <td>count:</td><td><input type='text' name='c' value='<?php echo $C ?>' /></td>
 </tr>
 <tr>
  <td>interval:</td><td><input type='text' name='i' value='<?php echo $I ?>' /></td>
 </tr>
    <tr>
     <td colspan='2'>
      <input type='submit' value='Ping It' /><br><br><br>
     </td>
    </tr>
   </table>
  </form>
 </body>
</html>

Subscribe to: Posts (Atom)
attendez....