scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Implement TCP server Automaton

Open jabbate19 opened this issue 2 years ago • 3 comments

As a child class of TCP_client, new TCP_server automatically completes a TCP handshake when a client connects and is integrated with supersocket. Inspiration was taken from #2409

Anything that could be removed due to parent class was removed. States were required to stay due to Automaton design.

While working on this, I found/fixed a bug within TCP_client that would cause the ACK number of a response from data to be wrong when a small amount of data was sent. Padding was being considered in the length for the ack number when it is not in the protocol.

Part of #399

jabbate19 avatar Jul 15 '22 19:07 jabbate19

Codecov Report

Merging #3690 (9961fa9) into master (2c92b03) will decrease coverage by 0.06%. The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #3690      +/-   ##
==========================================
- Coverage   86.23%   86.16%   -0.07%     
==========================================
  Files         296      296              
  Lines       66907    66987      +80     
==========================================
+ Hits        57698    57722      +24     
- Misses       9209     9265      +56     
Impacted Files Coverage Δ
scapy/layers/inet.py 65.28% <33.33%> (-1.95%) :arrow_down:
scapy/arch/windows/__init__.py 67.73% <0.00%> (-0.57%) :arrow_down:
scapy/contrib/automotive/ecu.py 94.33% <0.00%> (-0.34%) :arrow_down:
scapy/layers/ntp.py 84.55% <0.00%> (-0.28%) :arrow_down:
scapy/fields.py 90.72% <0.00%> (-0.06%) :arrow_down:
scapy/layers/l2.py 76.90% <0.00%> (+0.69%) :arrow_up:

codecov[bot] avatar Jul 15 '22 20:07 codecov[bot]

Thanks for your PR. Looks good, so far. Could you please provide some unit-tests?

polybassa avatar Jul 18 '22 19:07 polybassa

I will continue this soon, been out of town for a bit so please don't close

jabbate19 avatar Jul 25 '22 12:07 jabbate19

Still working on this @jabbate19 ?

stryngs avatar Dec 06 '22 07:12 stryngs

Closing for inactivity.

gpotter2 avatar Feb 05 '24 22:02 gpotter2