技工之家

Let's talk about tech

导航

2005年2月18日 #

Services (zz from MSDN)

摘要: ServicesA service application conforms to the interface rules of the Service Control Manager (SCM). It can be started automatically at system boot, by a user through the Services control panel applet,... 阅读全文

posted @ 2005-02-18 21:40 techmania 阅读(240) 评论(0) 推荐(0) 编辑

2005年1月29日 #

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 阅读(3548) 评论(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 阅读(467) 评论(0) 推荐(0) 编辑

2005年1月27日 #

winsock之raw socket的局限

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

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

2005年1月23日 #

WinMain - 如何检测是否已有应用程序的实例运行

摘要: 不能用hInstance参数以下摘自MSDN:hPrevInstance [in] Handle to the previous instance of the application. This parameter is always NULL. If you need to detect whether another instance already exists, create a uni... 阅读全文

posted @ 2005-01-23 16:47 techmania 阅读(383) 评论(0) 推荐(0) 编辑

2005年1月20日 #

include头文件的顺序matters

摘要: 要先#include 再#include , 否则就会发生灾难! 阅读全文

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

2005年1月19日 #

windows 2000的raw socket

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

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

2005年1月3日 #

1月2日工作总结

摘要: 今天本打算是想实践一下将一个XMLElement转化为一个DataSet对象,顺带封装了一个用于提交OAI-PMH请求的类,该类的方法可以返回一个OAIPMHtype的对象。做了一个ASP.NET页面用于调试,不料引出一堆奇怪的问题。同时做了Console和WinForm的用于调试的程序都没有问题,成功地将XMLElement的对象转化成了DataSet对象,用WinForm还可以用DataGri... 阅读全文

posted @ 2005-01-03 01:24 techmania 阅读(905) 评论(3) 推荐(0) 编辑

2004年12月27日 #

从XmlElement到DataSet的解决方案

摘要: 调查: XmlElement有一个WriteTo()方法,参数是一个XmlWriter. XmlWriter是一个抽象类,XmlTextWriter是它的一个实现 XmlTextWriter的构造函数的参数可以是 TextWriter, 或者 Stream, Encoding, 或者 文件名,Encoding DataSet有一个ReadXml()方法,参数可以是 Stream 文件名 Tex... 阅读全文

posted @ 2004-12-27 22:45 techmania 阅读(628) 评论(0) 推荐(0) 编辑

从xsd文件生成数据库表的工具

摘要: http://sourceforge.net/projects/xsd2db/ 以下是我用http://www.openarchives.org/OAI/2.0/oai_dc.xsd在SQL Server 2000中生成的表: 阅读全文

posted @ 2004-12-27 18:37 techmania 阅读(2032) 评论(6) 推荐(0) 编辑