Ç°ÑÔ
¡¡¡¡PHPÊÇÒ»ÖÖ¹¦ÄÜÇ¿´óµÄWeb¿ª·¢ÓïÑÔ¡£¿ª·¢Ð§Âʸߣ¬Óï·¨¼òµ¥£¬Îª¶¯Ì¬ÍøÕ¾Á¿Éí¶¨×ö£¬¼ÓÇ¿ÃæÏò¶ÔÏó£¨ÏòC++¿¿Â££¬ÓëJAVA´îÁ˵ã±ß£©£¬¿Éϧµ¥Ị̈߳¨ÕâÊÇÖÁÃüÈõµã£¬¾Ý˵PHPÊÇÓÃC\C++±àдµÄ¡££©£¬Ò²ÄÜÓÃC¡¢C++¡¢JAVA¿ª·¢Öмä²ã£¬µ÷ÓÃCOM£¬·þÎñÆ÷ά»¤ÄѶÈС£¬¹ÊÕÏÉÙ¡£
¡¡¡¡¼ÈÈ»ÊÇΪ¶¯Ì¬ÍøÕ¾Á¿Éí¶¨×ö£¬ËùÒÔ×¢¶¨²»ÄÜ¿ª·¢³öX-scanÕâÑùµÄ³¬Ç¿É¨ÃèÆ÷£¬²»¹ýÈç¹ûҪʵÏÖһЩ¼òµ¥µÄ¹¦ÄÜ£¬»¹ÊǴ´ÂÓÐÓàµÄ¡£
¡¡¡¡¶Ë¿ÚɨÃèÊÇÎÒÃÇ×î³£ÓõIJȵãÊֶΡ£Èç¹ûÔÚÍø°ÉÕâÖֵط½£¬ÏÂÔØÒ»¸öרÃŵÄɨÃèÆ÷ÓֱȽÏÂé·³£¬Èç¹ûÀûÓÃÏÖÓеÄWeb·þÎñÌṩµÄ¶Ë¿ÚɨÃè¡£ÄÇ¿ÉÕæµÄÊÇÊ¡Á˲»ÉÙÊ¡£
¡¡¡¡ÏÂÃæÎÒÃǾͿ´¿´ÎÒдµÄÕâ¸öPHP¶Ë¿ÚɨÃèÆ÷µÄÔ´´úÂ룺
ÒýÓà or ´úÂ룺 <?php
//Codz by angel //Welcome to My Website /http://www.4ngel.net
$youip=$HTTP_SERVER_VARS["REMOTE_ADDR"]; // »ñÈ¡±¾»úIPµØÖ· $remoteip=$HTTP_POST_VARS[remoteip]; // »ñÈ¡±íµ¥Ìá½»µÄIPµØÖ· ?> <html> <head> <title>°²È«Ììʹ¡ª¡ª¶Ë¿ÚÔÚÏß¼ì²â</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style TYPE="text/css"> <!-- BODY { FONT-SIZE: 12px; FONT-FAMILY: Verdana;color:#000000; } TD { FONT-SIZE: 12px; FONT-FAMILY: Verdana; color:#000000; line-height: 14px; } .style1 {color: #FFFFFF} --> </style> </head> <body> <center> <?php if (!empty($remoteip)){ // Èç¹û±íµ¥²»Îª¿Õ¾Í½øÈëIPµØÖ·¸ñʽµÄÅжÏ
function err() { die("¶Ô²»Æ𣬸ÃIPµØÖ·²»ºÏ·¨<p><a href=javascript:history.back(1)>µã»÷ÕâÀï·µ»Ø</a>"); } // ¶¨ÒåÌá½»´íÎóIPµÄÌáʾÐÅÏ¢
$ips=explode(".",$remoteip); // ÓÃ.·Ö¸îIPµØÖ·
if (intval($ips[0])<1 or intval($ips[0])>255 or intval($ips[3])<1 or intval($ips[3]>255)) err(); // Èç¹ûµÚÒ»¶ÎºÍ×îºóÒ»¶ÎIPµÄÊý×ÖСÓÚ1»òÕß´óÓÚ255£¬ÔòÌáʾ³ö´í
if (intval($ips[1])<0 or intval($ips[1])>255 or intval($ips[2])<0 or intval($ips[2]>255)) err(); // Èç¹ûµÚ¶þ¶ÎºÍµÚÈý¶ÎIPµÄÊý×ÖСÓÚ0»òÕß´óÓÚ255£¬ÔòÌáʾ³ö´í
$closed=´Ë¶Ë¿ÚÄ¿Ç°´¦ÓڹرÕ״̬¡£; $opened=<font color=red>´Ë¶Ë¿ÚÄ¿Ç°´¦ÓÚ´ò¿ª×´Ì¬£¡</font>; $close="¹Ø±Õ"; $open="<font color=red>´ò¿ª</font>"; $port=array(21,23,25,79,80,110,135,137,138,139,143,443,445,1433,3306,3389); $msg=array( Ftp, Telnet, Smtp, Finger, Http, Pop3, Location Service, Netbios-NS, Netbios-DGM, Netbios-SSN, IMAP, Https, Microsoft-DS, MSSQL, MYSQL, Terminal Services ); // ͨ¹ýIP¸ñʽµÄ¼ì²éºóÓÃÊý×鶨Òå¸÷¶Ë¿Ú¶ÔÓ¦µÄ·þÎñÃû³Æ¼°×´Ì¬
echo "<table border=0 cellpadding=15 cellspacing=0>\n"; echo "<tr>\n"; echo "<td align=center><strong>ÄúɨÃèµÄIP£º<font color=red>".$remoteip."</font></strong></td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "<table cellpadding=5 cellspacing=1 bgcolor=#636194>\n"; echo "<tr bgcolor=#7371A5 align=center>\n"; echo "<td><span class=style1>¶Ë¿Ú</span></td>\n"; echo "<td><span class=style1>·þÎñ</span></td>\n"; echo "<td><span class=style1>¼ì²â½á¹û</span></td>\n"; echo "<td><span class=style1>ÃèÊö</span></td>\n"; echo "</tr>\n"; // Êä³öÏÔʾµÄ±í¸ñ
for($i=0;$i<sizeof($port);$i++) { $fp = @fsockopen($remoteip, $port[$i], &$errno, &$errstr, 1); if (!$fp) { echo "<tr bgcolor=#FFFFFF><td align=center>".$port[$i]."</td><td>".$msg[$i]."</td><td align=center>".$close."</td><td>".$closed."</td></tr>\n"; } else { echo "<tr bgcolor=#F4F7F9><td align=center>".$port[$i]."</td><td>".$msg[$i]."</td><td align=center>".$open."</td><td>".$opened."</td></tr>"; } } // ÓÃforÓï¾ä£¬·Ö±ðÓÃfsockopenº¯ÊýÁ¬½ÓÔ¶³ÌÖ÷»úµÄÏà¹Ø¶Ë¿Ú£¬²¢Êä³ö½á¹û
echo "<tr><td colspan=4 align=center>\n"; echo "<a href=portscan.php><font color=#FFFFFF>¼ÌÐøɨÃè>>></font></a></td>\n"; echo "</tr\n"; echo "</table>\n"; echo "<TABLE cellSpacing=0 cellPadding=10 width=100% border=0>\n"; echo "<TR>\n"; echo "<TD align=center><b>Copyright © 2004 Security Angel Team[S4T] All Rights Reserved.</b></TD>\n"; echo "</TR>\n"; echo "</TABLE>\n"; echo "</center>\n"; echo "</body>\n"; echo "</html>\n"; exit; } // ̽²â½áÊø
echo "<table border=0 cellpadding=15 cellspacing=0>\n"; echo "<tr>\n"; echo "<td align=center><strong>ÄúµÄIP£º<font color=red>".$youip."</font></strong></td>\n"; echo "</tr>\n"; echo "<form method=POST action=portscan.php>\n"; echo "<tr><td>\n"; echo "<input type=text name=remoteip size=12>\n"; echo "<input type=submit value=ɨÃè name=scan>\n"; echo "</td></tr>\n"; echo "</form>"; echo "</table>\n"; // Èç¹û±íµ¥Îª¿ÕÔòÏÔʾÌá½»IPµØÖ·µÄ±íµ¥
?>
<TABLE cellSpacing=0 cellPadding=10 width="100%" border=0> <TR> <TD align=center><b>Copyright © 2004 Security Angel Team[S4T] All Rights Reserved.</b></TD> </TR> </TABLE> </center> </body> </html>
ºó¼Ç
¡¡¡¡Õâ¸öɨÃèÆ÷ºÜ¼òµ¥¡£¾ÍÊÇÓÃÁËÒ»¸öÊý×éÀ´¶¨Òå¶Ë¿ÚµÄÏà¹ØÐÅÏ¢£¬ÔÀí¾ÍÊÇÓÃfsockopenº¯ÊýÁ¬½Ó£¬Èç¹û¿ÉÒÔÁ¬½Ó£¬¾Í±íʾ¶Ë¿Ú´ò¿ª£¬·ñÔò¾ÍÊǹرա£
¡¡¡¡×î´óµÄȱµã¾ÍÊÇPHPÊǵ¥Ï̵߳ģ¬ËùÒÔËٶȻáºÜÂý£¬Õâ¸öÊÇÓ÷½±ã¡¢¼òµ¥×÷Ϊ´ú¼ÛµÄ£¬ÆäʵдÕâ¸ö´úÂëµÄ¾ÍÊÇÏë¸æËß´ó¼Ò£¬PHP²¢²»½ö½öÓÃÓÚ¶¯Ì¬ÍøÕ¾µÄ¿ª·¢£¬Ò²¿ÉÒÔÓÃÓÚÍøÂ簲ȫÁìÓò£¬ÍùÍù̫עÒâÊÂÎïµÄ±¾Ö°¹¤×÷£¬¾Í»áºöÂÔÆäËû·½ÃæµÄÌص㡣 |