<?php $target = "72.14.207.99"; // your target $ports = array(21, 25, 79, 80); // http://www.iss.net/security_center/advice/Exploits/Ports/default.htm $timeout = 1; // ...timeout function portScan($host, $port, $timeout=30) { $fp = @fsockopen($host, $port, $errno, $errstr, $timeout); if ($fp) { return True; } else { return False; } } ob_start(); foreach($ports as $port) { $scan=portScan($target, $port, $timeout); if($scan[0]) { echo "Success $target:$port<br />"; } else { echo "Fail $target:$port<br />"; } ob_flush(); // Used to send data right after instead of waiting for entire scan flush(); // See last comment. } ?>
Isnin, Ogos 19, 2013
PHP : Scan port
Langgan:
Catat Ulasan (Atom)
0 ulasan:
Catat Ulasan
Selamat datang ke 0x2013LΣΣT. Sekiranya anda mempunyai persoalan, pandangan, permintaan, bantuan, cadangan dan sebagainya. Tinggalkan pesanan anda ke dalam kotak komen. Terima kasih !
- http://0x2013.blogspot.com -