技工之家

Let's talk about tech

导航

随笔分类 -  network programming

nmap-3.75源码分析(1. 整体流程)
摘要:从nmap.cc文件的nmap_main()函数开始第307行:while((arg=getopt_long_only(argc,fakeargv,"6Ab:D:d::e:Ffg:hIi:M:m:NnOo:P:p:qRrS:s:T:Vv",long_options,&option_index))!=EOF){开始解析命令行参数,根据解析结果对相应的变量进行设置。第736行:winip_po... 阅读全文

posted @ 2005-01-29 12:40 techmania 阅读(3605) 评论(2) 推荐(0)

一种在一定程度上防止SYN flood的方法(转载)
摘要:摘自http://www.linuxworld.com/story/34589_1.htmSYN CookiesSYN Flooding leaves a finite number of half-open connections in the server while the server is waiting for a SYN-ACK acknowledgment. As long as ... 阅读全文

posted @ 2005-01-29 01:13 techmania 阅读(478) 评论(0) 推荐(0)

winsock之raw socket的局限
摘要:往一个端口发包时,如果没有置SYN位就发不出去。虽然sendto()可以成功,但是从sniffer看不到这个包,猜测是这个包在驱动层中被扣下了。而一旦发送了一个SYN包后,就可以往这个端口发置ACK或FIN位的包,不能发置PSH或URG位的包。此时发置RST的包也发不出去(从sniffer上看不到),而且从此以后发ACK和FIN包也不行了,直到再次发SYN包。如果在发送SYN包后一段时间之内不再往... 阅读全文

posted @ 2005-01-27 11:59 techmania 阅读(904) 评论(0) 推荐(0)

include头文件的顺序matters
摘要:要先#include 再#include , 否则就会发生灾难! 阅读全文

posted @ 2005-01-20 11:11 techmania 阅读(545) 评论(0) 推荐(0)

windows 2000的raw socket
摘要:创建时指定IPPROTO_TCP的话,发送时会失败。因此要发TCP的包,创建socket的时候要制定IPPROTO_RAW,然后setsockopt,选IP_HDRINCL,自己组装IP包。 阅读全文

posted @ 2005-01-19 18:07 techmania 阅读(346) 评论(0) 推荐(0)