Linux CÓïÑÔдµÄ³¬¼¶¼òµ¥¶Ë¿ÚɨÃèÆ÷
Õâ¸ö±¾À´ÒÔǰҲд¹ýµÄ£¬½ñÌìÎÞÁĸ´Ï°Ï ÔÙдһ±é¡£¼òµ¥µÄÒ»ËúºýÍ¿£¬Ð´µÄ²»Õ¦µØ´ó¼Ò¼ûÁÂŶ£¡ÓпÕÔÙ¼ÓÇ¿ ºÙºÙ£¡
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <time.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>
void msg()
{
printf("EP:scan ip startport endport\nEP:scan ip 127.0.0.1 20 2009\n");
}
int main(int argc,char** argv)
{
char *ip;
int startport,endport,sockfd,i;
struct sockaddr_in to;
float costtime;
clock_t start,end;
if(4!=argc)
{
msg();
return 0;
}
ip=argv[1];
startport=atoi(argv[2]);
endport=atoi(argv[3]);
if(startport<1 || endport>65535 || endport<startport)
{
printf("¶Ë¿Ú·¶Î§³ö´í\n");
return 0;
}
else
printf("IP:%s %d-%d\n",ip,startport,endport);
to.sin_family=AF_INET;
to.sin_addr.s_addr=inet_addr(ip);
start=clock();
for(i=startport;i<=endport;i++)
{
sockfd=socket(AF_INET,SOCK_STREAM,0);
to.sin_port=htons(i);
if(connect(sockfd,(struct sockaddr *)&to,sizeof(struct sockaddr))==0)
{
printf("%s %d\n",ip,i);
close(to);
}
}
end=clock();
costtime=(float)(end-start)/CLOCKS_PER_SEC;
printf("ÓÃʱ:%fÃë\n",costtime);
return 0;
}
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
Ò»¡¢´ÓÄÄÀïµ½ÄÄÀï
±¾ÎÄÖ¼ÔÚÃèÊölinuxÖÐÄÚºËÈçºÎµ÷ÓÃÆô¶¯£¬È»ºóÈçºÎ´ÓimgµÄÎļþϵͳÇл»µ½Ó²Å̵Ĺý³Ì¡£
ÃèÊöÆðÓÚ£ºlinux-2.6.11/init/main.cÖк¯Êý static int init(void * unused)
ÃèÊöÖ¹ÓÚ£º/etc/rc.d/rc.sysinitÎļþµÄ±»µ÷ÓÃ
¶þ¡¢ÃèдÁ÷³Ì
ÔÚlinux´úÂëlinux-2.6.11/init/main.cÖÐinitÕâ¸öº¯Êý±»µ÷ÓÃʱ£¬³ ......
½ø³ÌÊÇϵͳÖгÌÐòÖ´ÐкÍ×ÊÔ´·ÖÅäµÄ»ù±¾µ¥Î»¡£Ã¿¸ö½ø³Ì¶¼ÓÐ×Ô¼ºµÄÊý¾Ý¶Î£¬´úÂë¶ÎºÍ¶ÑÕ»¶Î£¬Õâ¾Íµ¼ÖÂÁ˽ø³ÌÔÚ½øÐÐÇл»µÈ²Ù×÷Æðµ½ÁËÏÖ³¡±£»¤×÷Óᣵ«ÊÇΪÁ˽øÒ»²½¼õÉÙ´¦Àí»úµÄ¿Õתʱ¼äÖ§³Ö¶à´¦ÀíÆ÷ºÍ¼õÉÙÉÏÏÂÎÄÇл»¿ªÏú£¬½ø³ÌÑÝ»¯ÖгöÏÖÁËÁíÍâÒ»¸ö¸ÅÄÕâ¾ÍÊÇỊ̈߳¬Ò²±»È˳ÆÎªÇáÁ¿¼¶µÄ½ø³Ì¡£ËüÊÇÒ»¸ö½ø³ÌÄڵĻù±¾µ÷¶Èµ¥ ......
linuxϵͳ°²È«(¶þ): ÈÕÖ¾
http://www.ibm.com/developerworks/cn/linux/security/l-ossec/part2/index.html
ÎĵµÑ¡Ïî
´òÓ¡±¾Ò³
½«´ËÒ³×÷Ϊµç×ÓÓʼþ·¢ËÍ
¼¶±ð£º ³õ¼¶
½úÁÁ (sound810@sina.com), ÍøÂ簲ȫ¹¤³Ìʦ
2003 Äê 1 ÔÂ 09 ÈÕ
ÎÒÃÇÖ÷Òª½²Ò»ÏÂLinux»·¾³ÖеÄϵͳ¼ÇÕʺÍϵͳÈÕÖ¾¹ÜÀíÒÔ¼°ÔõôÓÃÒ ......
³ÉΪһÃû¾«Í¨ Linux ³ÌÐòÉè¼ÆµÄ¸ß¼¶³ÌÐòÔ±Ò»Ö±ÊDz»ÉÙÅóÓÑ×Î×ÎÒÔÇóµÄÄ¿±ê¡£¸ù¾ÝÖлªÓ¢²ÅÍøÍ³¼ÆÊý¾Ý£¬±±¾©µØÇø Linux ³ÌÐòÔ±ÔÂнƽ¾ùΪ Windows ³ÌÐòÔ±µÄ 1.8 ±¶¡¢Java ³ÌÐòÔ±µÄ 2.6 ±¶£¬ Linux ³ÌÐòÔ±ÄêÖÕ½±½ðƽ¾ùΪ Windows ³ÌÐòÔ±µÄ 2.9 ±¶¡£Í¬Ê±Êý¾ÝÏÔʾ£¬Ëæ×ʤ×÷¾ÑéµÄÔö³¤£¬ Linux ³ÌÐòÔ±Óë Windows ³ÌÐòÔ±µÄÊÕÈë²î¾à» ......