亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? windows internet programming part 3.html

?? a collection of mega hacking tools
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
    			  SYN:  Synchronize sequence numbers.

    			  FIN:  No more data from sender.



8.  Window		- Specifies the maximum size of a segment that you can

			  accept, if the segment is larger than this then it

			  must be fragmented.



9.  Checksum		- The TCP checksum just like we explained with the IP

			  header, is to ensure that there is no loss of Data

			  during transport, it gets the size of the packet and

			  when it gets to the host the host compares the size

			  of the packet with the value of the checksum and if

			  they dont match you can see the packet was mangled

			  during transport.



			  The TCP Checksum is calculated using a psuedo header

			  which is prefixed to the TCP Header. The purpose of

			  this Psuedo Header is to protect the TCP packet from

			  misrouted segments. The Psuedo Header contains 4

			  main pieces of information, the Source IP, the

			  Destination IP numbers, the protocol and the TCP

			  length.





   			  +-----------------------------------+

   			  |           Source Address          |

   			  +-----------------------------------+

   			  |         Destination Address       |

   			  +--------+--------+--------+--------+

   			  |  zero  |  PTCL  |    TCP Length   |

   			  +--------+--------+--------+--------+



			  FIG 1.3  - The structure of a Psuedo Header





			  The TCP Length field is the length of the TCP Header

			  + length of the Data and does not count the length of

			  the Psuedo Header (12 Bytes).



10. Urgent Pointer	- This field is only to be set when the URG control bit

			  is set. It points to a Data area.



11. Options		- The TCP options field is very similiar to the IP Options

			  field except it has fewer interesting parts that need

			  to be mentioned here...  none.



12. Padding		- The same as the IP Padding Field.









3.3 THE UDP HEADER

=======================================



   +---------------------------------+--------------------------------+

   |          Source Port            |       Destination Port         |

   |            16 bits              |           16 bits              |

   +---------------------------------+--------------------------------+

   |            Length               |           Checksum             |

   |            16 bits              |           16 bits              |

   +---------------------------------+--------------------------------+



   FIG 1.4  - The Structure of a UDP Header



The UDP Header is more basic than previous Headers, it has only 4 fields.



1. Source Port

2. Destination Port

3. Length

4. Checksum





1.  Source Port		- Same as in TCP.



2.  Destination Port	- Same as in TCP.



3.  Length		- The length of the Datagram, including UDP Header and

			  Data. Size must be at least 8.



4.  Checksum		- Same as TCP this field protects against misrouted packets

			  it also uses the same Psuedo Header as TCP.







3.4 THE ICMP HEADER

=======================================



   +----------------+----------------+--------------------------------+

   |      Type      |     Code       |           Checksum             |

   |     8 bits     |    8 bits      |           16 bits              |

   +----------------+----------------+--------------------------------+

   |                              Unused                              |

   |                              32 bits                             |

   +------------------------------------------------------------------+

   |            Internet Header + 64 bits of Original Data            |

   |                              32 bits                             |

   +------------------------------------------------------------------+



   FIG 1.5  - The Standard Structure of an ICMP Header



The ICMP Header changes depending on the message it is sending. Different

ICMP Messages are conveyed by combinations of different values and the

Unused Field can contain different values and become used depending upon

the different ICMP messages being sent. For example in some messages you

may need to specify the general Type of message and then its code, this

certain message may require additional information such as the IP Address

of a computer, this address would then be stored in the Unused Field.



The ICMP protocol is similiar to UDP in that it is used in messages of 1

Datagram in size, however, ICMP is more like an extension of IP and certain

fields must also be set for use with ICMP.





The Standard ICMP Header has 4 main fields.



1. Type

2. Code

3. Checksum

4. Unused





1.  Type		- Field declaring the type of ICMP Message.



2.  Code		- Field specifying the messages code to identify its

			  meaning.



3.  Checksum	- Calculated the same as other headers, the kernel may pad

			  this if the checksum is an odd number to respect 32 bit

			  boundaries in most ICMP messages but Checksum is not

			  calculated in some ICMP Messages.



4.  Unused	- The value of this field varies depending on the type of

			  ICMP message, if no value is to be entered in this field

			  it must be specified as 0.





There are several different ICMP messages but here we are only going to refer

to the 2 most interesting types Echo and Netmask request and reply's.



======================

Echo Request and Reply

======================



Description:



These two ICMP Messages are commonly used in conjunction to form

the ping program. First we send an Echo Request to a host and

that host then sends us an echo reply. By sending multiple requests

to a host and comparing the time they were sent with the time that

the Echo Reply was recieved we can calculate the mean time that

packets are sent between us and that host. This Message is also

useful to determine whether a host is reachable and connected to the

internet or not.



Data can be inserted into an Echo request, perhaps for checking

the integrity of a packet which it is returned?





Type:



Echo Request	= 8

Echo Reply 	= 0





Code:



Field Unused	= 0





Checksum:



As specified above.





Identifier:



Same as the IP Identifier, useful to determine which ICMP Echo Reply

belongs to which Echo Request.





Sequence Number:



Used in the same way as the Identifier is above, useful for matching

Echo Reply's with Requests.



====================================================================



=========================

Netmask Request and Reply

=========================



Description:



We can send a netmask request to a host and it will return a netmask

reply containing its subnetmask, getting subnetmasks is useful for

mapping out and gathering information on network topology.





Type:



Netmask Request	= 17

Netmask Reply	= 18





Code:



Field Unused	= 0





Checksum:



Same as above.





Identifier:



Same as the IP Identifier, useful to determine which ICMP Netmask

Reply belongs to which Netmask Request.





Sequence Number:



Used in the same way as the Identifier is above, useful for matching

Netmask Reply's with Requests.



====================================================================







4.0 CREATING A PACKET

=======================================



OK well thats enough Protocol Header theory, lets look at how we are

going to construct a raw socket in code and the differences between

coding raw sockets and normal windows sockets code.



Now with normal Sockets we give certain information to the stack in

the case of windows, the Winsock. This information comprises of things

like what transport layer were gonna use, TCP or UDP, the address of

the host we are going to send it to, the port for it to go to, the

Data to be contained within the Datagram, we name the socket call

the sendto() function and off it goes. What we should consider now

is what then happens to the information that we just provided, we know

how the IP protocol sends it off zooming across the internet and how

the host handles and sends this Data, but what happens inbetween the

time we called sendto() and the time that packet leaves our computer?



Well we passed this information to the winsock, the winsock then

takes information such as the Destination address and our own address

along with the protocol we specified and fills out the relevant

fields in the protocol header, it then sets the TTL with its own

default value of 35.



Then the winsock uses the other information we provided, the source

and destination port numbers, and fills the relevant TCP or UDP

Header fields, and constructs the header, wraps the headers around

the Data we specified and calculates things such as fragmentation

and fills in the fields. Once everything is filled out and wrapped

up the winsock calculates the size of the packet and specifies the

checksum value.



With all this done the winsock sends the packet off to whiz around

the internet.



So with normal sockets we dont have to specify all those nasty fields

in the Headers we leave it up to good ol' winsock and it handles that

but we want to create our own headers so how do we stop the winsock

from prefixing its headers onto our packet?





4.1 SETSOCKOPT()

=======================================



The setsockopt() function is very important in raw sockets, its here

that we tell the winsock that we want to use our own headers for this

packet and for it to not add its own to ours.



The setsockopt() function has 5 parameters:



1. Socket

2. Level

3. Option Name

4. Option value

5. Option Length





1. Socket		- Just like in normal sockets this is a Socket

		 	  that we made earlier in the program.



2. Level		- This is the protocol we are going to be using

		 	  in the program, it has values such as

		 	  IPPROTO_TCP and IPPROTO_IP.



3. Option Name		- The socket option we are going to set, we will

			  be setting this to IP_HDRINCL, this option is

			  what tells the winsock we want to include our

			  own headers for the packet.



4. Option Value		- Pointer to the buffer in which the value for

			  the requested option is supplied. We will be

			  using a boolean called bOpt set to true for

			  this, set to false would mean that we dont want

			  to use the IP_HDRINCL option.



5. Option Length	- The size of the buffer which supplies the

			  value. We will use sizeof(bOpt) for this.





The setsockopt() function well be looking at so will look like this:



setsockopt(myraw, IPPROTO_IP, IP_HDRINCL, (char *)&bOpt, sizeof(bOpt)





So now how do we tell the winsock that we want to use raw sockets

instead of normal sockets in the first place?





4.2 SOCKET()

=======================================



Of course weve already covered the socket() function in the past and

are familiar with its different parameters but what we have to be

concerned about two of its parameters, its type and protocol.



A normal socket looks like the following:



socket(AF_INET, SOCK_STREAM, 0)



Before we used to set its type as SOCK_STREAM or SOCK_DGRAM for TCP

and UDP respectively. In raw sockets however we will set the type

parameter to SOCK_RAW and the protocol to IPPROTO_RAW.



A Raw Socket looks like this:



socket(AF_INET, SOCK_RAW, IPPROTO_RAW);



So thats how we tell the winsock that its a raw socket that we will

be using which still leaves the question how do we build the actual

header?



?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合色8888| 国产农村妇女毛片精品久久麻豆 | 欧美二区在线观看| 色噜噜夜夜夜综合网| 99视频超级精品| 成人国产精品免费观看| 99国产精品久久久久久久久久 | 欧美综合亚洲图片综合区| av一区二区三区在线| 99re成人在线| 色婷婷久久综合| 3d成人h动漫网站入口| 7777精品伊人久久久大香线蕉| 欧美色视频在线| 91麻豆精品91久久久久同性| 欧美精品一区二区三区很污很色的| 精品国产露脸精彩对白| 国产亚洲精品精华液| 亚洲三级小视频| 午夜国产精品一区| 极品少妇一区二区| av一区二区不卡| 欧美亚洲国产一区在线观看网站 | 亚洲人成网站在线| 亚洲最快最全在线视频| 丝袜美腿亚洲一区| 国产老女人精品毛片久久| 成人av片在线观看| 69成人精品免费视频| 国产亚洲精品免费| 亚洲一区二区黄色| 国产精品自产自拍| 在线视频一区二区三区| 精品剧情在线观看| 一区二区三区在线影院| 日韩电影在线一区| 国产成人亚洲精品青草天美| 91福利资源站| 久久久久久久精| 亚洲国产精品久久不卡毛片| 国产+成+人+亚洲欧洲自线| 欧美三级中文字| 国产精品国产三级国产有无不卡| 亚洲午夜视频在线| 成人久久久精品乱码一区二区三区 | 欧美高清视频www夜色资源网| 日韩视频在线观看一区二区| 亚洲啪啪综合av一区二区三区| 欧美aaaaaa午夜精品| 成年人网站91| 久久久久久久精| 日本成人中文字幕在线视频 | 欧美日韩在线一区二区| 欧美国产日韩亚洲一区| 男男成人高潮片免费网站| 色综合久久久久综合99| 国产丝袜美腿一区二区三区| 免费高清在线一区| 欧美性猛片aaaaaaa做受| 国产精品久久久久影院| 国产麻豆午夜三级精品| 日韩写真欧美这视频| 亚洲国产一区二区视频| 97超碰欧美中文字幕| 国产色婷婷亚洲99精品小说| 美女免费视频一区| 欧美日韩一区三区| 亚洲欧美日韩久久精品| 99久久久久久99| 国产精品麻豆一区二区| 成人av手机在线观看| 国产日韩欧美a| 岛国精品一区二区| 国产日韩欧美激情| 国产aⅴ综合色| 国产精品婷婷午夜在线观看| 国产精品一区二区黑丝| 日本一区二区久久| 国产91在线看| 久久久.com| 99re在线精品| 亚洲一本大道在线| 欧美日韩视频在线第一区 | 亚洲大片一区二区三区| 91福利资源站| 日韩av中文字幕一区二区三区| 555www色欧美视频| 美国三级日本三级久久99| 欧美xxxxx牲另类人与| 麻豆一区二区99久久久久| 久久一区二区三区四区| 成人免费看的视频| 亚洲乱码中文字幕| 欧美一区日韩一区| 久久超级碰视频| 欧美韩日一区二区三区| 欧美综合在线视频| 奇米四色…亚洲| 久久久久99精品国产片| 不卡欧美aaaaa| 午夜精品视频一区| 久久精品亚洲精品国产欧美kt∨| 99久久综合狠狠综合久久| 亚洲一区影音先锋| 欧美成人艳星乳罩| 99精品桃花视频在线观看| 亚洲国产精品久久不卡毛片| 精品国产一区二区三区久久久蜜月| 国产激情91久久精品导航| 亚洲精品ww久久久久久p站| 欧美一级二级在线观看| 成人福利视频在线| 日韩av二区在线播放| 亚洲国产精品成人综合| 欧美日韩在线观看一区二区 | 国产福利一区在线观看| 亚洲精品久久嫩草网站秘色| 精品蜜桃在线看| 91网页版在线| 激情综合一区二区三区| 亚洲1区2区3区4区| 中文字幕一区视频| 日韩精品一区二区三区四区视频| 91色乱码一区二区三区| 国产一区二区免费在线| 亚洲成人免费av| 亚洲特级片在线| 久久网站最新地址| 欧美丰满一区二区免费视频| 色综合视频一区二区三区高清| 国内精品不卡在线| 天堂av在线一区| 一区二区三区在线视频免费观看| 久久精品一区二区三区不卡牛牛 | 日韩毛片精品高清免费| 2020国产精品久久精品美国| 欧美电影在线免费观看| 欧美影视一区在线| 91性感美女视频| 不卡av电影在线播放| 狠狠v欧美v日韩v亚洲ⅴ| 日韩影视精彩在线| 亚洲成av人片一区二区梦乃| 一区二区欧美国产| 最新热久久免费视频| 国产欧美一区二区三区沐欲| wwwwww.欧美系列| 欧美大黄免费观看| 欧美videos大乳护士334| 欧美一区二区免费视频| 欧美精品乱人伦久久久久久| 欧美日韩亚洲另类| 欧美美女bb生活片| 欧美人妖巨大在线| 欧美日韩日日夜夜| 制服.丝袜.亚洲.另类.中文| 欧美美女一区二区三区| 在线播放中文一区| 欧美一卡2卡3卡4卡| 日韩精品一区二区三区视频在线观看| 91精品国产一区二区人妖| 91精品一区二区三区在线观看| 欧美人与禽zozo性伦| 欧美xxxx老人做受| 亚洲精品一区二区三区蜜桃下载 | 一区二区三区免费| 亚洲高清不卡在线| 蜜臀av性久久久久蜜臀av麻豆| 美腿丝袜在线亚洲一区| 国产河南妇女毛片精品久久久 | 欧美日韩精品欧美日韩精品一 | 国产一区二区不卡| 丁香天五香天堂综合| 91丝袜呻吟高潮美腿白嫩在线观看| 94-欧美-setu| 宅男在线国产精品| 久久久91精品国产一区二区精品| 国产精品久久久久久福利一牛影视 | 国产v日产∨综合v精品视频| 不卡av在线网| 91精品久久久久久久91蜜桃| 久久精品人人做人人综合| 国产精品久久久久久久久免费丝袜| 亚洲精品国久久99热| 日韩中文字幕不卡| 成人三级在线视频| 欧美日本一区二区三区| 国产欧美日韩不卡| 午夜久久福利影院| 高清国产一区二区三区| 欧美视频一区二区三区四区| 久久理论电影网| 一区二区三区中文免费| 国产精品一区二区视频| 欧美日韩一区二区欧美激情 | 在线观看日韩av先锋影音电影院| 日韩久久久精品| 亚洲一区影音先锋| 粉嫩高潮美女一区二区三区| 欧美老肥妇做.爰bbww视频|