문제

I wanted to implement the three-way handshake using python.And here is what I did:

1-I created syn packet .

2-I send the packet to the destination .

3-I created a function that will listen to all the traffic that pass through my NIC .it's kinda like sniffer.If this function were to find a packet that is destined to my IP address and the same port that I send the syn packet through, it will parse it .

4-If the flags in the captured packet are set to syn+ack,the function will generate a TCP packet with the ack flag set.

The problem is, before I send the ack packet the system send RST packet . So , what is the meaning of the behaviour?? Is there anyway to stop it??

Note: I am not implementing the three-way handshake for production purposes.I just want to understand how the protocol TCP work.

올바른 솔루션이 없습니다

다른 팁

Disable the system's TCP/IP stack so that you have complete control over what it sends over the network. Usually the easiest way to do this is simply not to configure IP on the interface you are using. Note that you will need to handle ARP requests.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top