Heya!
So, Iam using pcap to to capture specific tcp packets.
I would like to be able to track tcp state of connections,
especially connect (SYN->SYN/ACK->ACK) and close (FIN->ACK || FIN/ACK->ACK).
Ths would give me the ability to read and write over existing connection
by tracking the sequence number and keeping client and server in sync.
So Iam looking for code that deduces tcp state by parsing the tcp flags.
Im sure I could figure this out eventually, but figured it would be alot faster
if there was some code and/or documentation covering it.
Already tried quickly parsing connection handshake but countered some shenanigans.
Any help would be appreciated.
2 replies to this topic
#1
Posted 01 May 2010 - 08:48 AM
std::string s("oberq zhpu?");std::for_each(s.begin(),s.end(),[&](char&c){c=~c;c=~c-0x01/(~(c|0x20)/0x0D*0x02-0x0B)*0x0D;});std::cout<<s;
|
|
|
#2
Posted 01 May 2010 - 01:32 PM
Transmission Control Protocol - Wikipedia, the free encyclopedia
Last resort, check linux kernal source, TCP/IP part, you should be able to figure everything you need.
Last resort, check linux kernal source, TCP/IP part, you should be able to figure everything you need.
#3
Posted 01 May 2010 - 06:15 PM
Lance said:
Last resort, check linux kernal source, TCP/IP part, you should be able to figure everything you need.
Little wider read than I hoped, but guess it will have to do. (:
std::string s("oberq zhpu?");std::for_each(s.begin(),s.end(),[&](char&c){c=~c;c=~c-0x01/(~(c|0x20)/0x0D*0x02-0x0B)*0x0D;});std::cout<<s;
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









