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;
}
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
LinuxÌṩÁËÄÚ´æÓ³É亯Êýmmap, Ëü°ÑÎļþÄÚÈÝÓ³Éäµ½Ò»¶ÎÄÚ´æÉÏ(׼ȷ˵ÊÇÐéÄâÄÚ´æÉÏ), ͨ¹ý¶ÔÕâ¶ÎÄÚ´æµÄ¶ÁÈ¡ºÍÐÞ¸Ä, ʵÏÖ¶ÔÎļþµÄ¶ÁÈ¡ºÍÐÞ¸Ä, ÏÈÀ´¿´Ò»ÏÂmmapµÄº¯ÊýÉùÃ÷: Í·Îļþ: ÔÐÍ: void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offsize); ·µ» ......
ÔÚÉÏһƪÎÄÕÂÖУ¬½éÉÜÁËÏ̵߳Ĵ´½¨ºÍÍ˳ö£¬ÒÔ¼°Ïà¹Øº¯ÊýµÄʹÓá£ÆäÖÐpthread_createº¯ÊýµÄµÚ¶þ¸ö²ÎÊý£¬ÊǹØÓÚÏß³ÌÊôÐÔµÄÉèÖã¬ÕâÒ²ÊǽñÌìËùÓн²ÊöµÄ¡£ÕâЩÊôÐÔÖ÷Òª°üÀ¨°î¶¨ÊôÐÔ¡¢·ÖÀëÊôÐÔ¡¢¶ÑÕ»µØÖ·¡¢¶ÑÕ»´óС¡¢ÓÅÏȼ¶¡£ÆäÖÐϵͳĬÈϵÄÊǷǰ¡¢·Ç·ÖÀ롢ȱʡ1MµÄ¶ÑÕ»¡¢Ó븸½ø³ÌͬÑù¼¶±ðµÄÓÅÏȼ¶¡£ÔÚpthread_createÖÐ ......
Ïß³ÌÖл¥³âËøµÄʹÓ㬴ﵽ¶Ô¹²Ïí×ÊÔ´»¥³âʹÓᣳýÁËʹÓû¥³âËø£¬ÐźÅÁ¿£¬Ò²¾ÍÊDzÙ×÷ϵͳÖÐËùÌáµ½µÄPVÔÓÄÜ´ïµ½»¥³âºÍͬ²½µÄЧ¹û£¬Õâ¾ÍÊǽñÌìÎÒÃÇËùÒª½²ÊöµÄÐźÅÁ¿Ï߳̿ØÖÆ¡£
PVÔÓïÊǶÔÕûÊý¼ÆÊýÆ÷ÐźÅÁ¿semµÄ²Ù×÷£¬Ò»´ÎP²Ù×÷¿Éʹsem¼õÒ»£¬¶øÒ»´ÎV²Ù×÷¿ÉÊÇsem¼ÓÒ»¡£½ø³Ì£¨»òỊ̈߳©¸ù¾ÝÐźÅÁ¿µÄÖµÀ´ÅжÏÊÇ·ñ¶Ô¹«¹²× ......
/etc/sysconfig/i18n
±à¼/etc/sysconfig/i18nÕâ¸öÎļþ£¬
²»¹ÜÄã×°µÄÊÇÖÐÎİæ,»¹ÊÇÓ¢Îİæ.ɾµôÔÀ´µÄÅäÖÃ,°ÑÏÂÃæµÄ¿½±´¹ýÈ¥
LANG="zh_CN.GB18030"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"
±£´æ,ÖØÆð.OKÁË
×¢:
I18N ÊÇ internationalization µÄËõдÐÎʽ£¬Òâ¼´ÔÚ i ºÍ ......