2020
09-28
09-28
python构造IP报文实例
我就废话不多说了,大家还是直接看代码吧!importsocketimportsysimporttimeimportstructHOST,PORT="10.60.66.66",10086defmake_forward_iphdr(source_ip='1.0.0.1',dest_ip='2.0.0.2',proto=socket.IPPROTO_UDP):#ipheaderfieldsip_ihl=5ip_ver=4ip_tos=0ip_tot_len=0#kernelwillfillthecorrecttotallengthip_id=54321#Idofthispacketip_frag_off=0ip_ttl=255...
继续阅读 >