summaryrefslogtreecommitdiff
path: root/crafted-pkt
AgeCommit message (Collapse)AuthorFilesLines
2019-04-18crafted-pkt/tls-handshake-fragments.py: actual fragment TCPPeter Wu1-3/+7
Actually fragment or coalesce TLS records across TCP segments.
2019-04-18crafted-pkt/tls-handshake-fragments.py: test for bug 3303Peter Wu1-0/+79
Dumb fuzzer for verifying that handshake reassembly works. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3303
2018-07-12crafted-pkt/retransmit-overlap.py: test for bug 13523Peter Wu1-0/+43
Used for crafting the capture in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=13523#c1
2018-07-06crafted-pkt/badsegments.py: test Follow TCP Stream edge casesPeter Wu1-0/+110
For testing various issues such as https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=14944 Code coverage checked with Clang 6.0.0 by building packet-tcp.c with options from https://clang.llvm.org/docs/SourceBasedCodeCoverage.html # link.sh is the command to link libwireshark.so with the two profiling options eval $(jq -r '.[] | select(.file | contains("packet-tcp.c")) | .command' compile_commands.json | sed 's/^[^ ]\+/clang -fprofile-instr-generate -fcoverage-mapping/') && time bash link.sh llvm-profdata merge -sparse tcp.profraw -o tcp.profdata && llvm-cov show epan/dissectors/CMakeFiles/dissectors.dir/packet-tcp.c.o -instr-profile=tcp.profdata /tmp/wireshark/epan/dissectors/packet-tcp.c -name-regex='check_follow_fragments|follow_tcp_tap_listener' Tested against https://code.wireshark.org/review/#/c/28614/4 with log: 1c6dc6d31f (master) Some fixes. 777dac163a Follow Stream: ensure linear performance with many packets b853858e84 tcp: remove repetitive "follow_record->is_server" 98c33f532e tcp: fix Follow TCP Stream with missing (but ACKed) segments 8f4abb0346 tcp: fix Follow TCP Stream for overlapping data 9219c4b1b6 tcp: ignore zero-length payloads for Follow TCP Stream 9499a15a4a Qt: fix wrong Follow Stream text position after changing mode All cases are covered, except for one: 1122| 1| data_offset = follow_info->seq[is_server] - sequence; 1123| 1| if (data_length <= data_offset) { 1124| 0| data_length = 0; 1125| 1| } else { To reach that situation, the IP header probably needs to be modified, or the pcap snaplen/caplen fields. Too much work for now and a visual inspection shows that the case does not hurt, so just go for it.
2016-09-17make-tcp.py: use HTTP (which activates reassembly)Peter Wu1-14/+12
2016-09-17make-tcp.py: create a crafted packet with TCP issuesPeter Wu1-0/+56
Prompted by https://code.wireshark.org/review/17749
2016-02-10replay-tcp-as-ssl.py: pass cipherlist to server tooPeter Wu1-3/+3
Avoids handshake failure when a cipher suite is used which is disabled by default (e.g. NULL-SHA).
2016-01-11replay-tcp-as-ssl.py: wrap TCP payload in SSLPeter Wu1-0/+120
Useful for wrapping existing protocols in SSL for testing.
2014-07-04replay-chunks: fallback to localhost on failurePeter Wu1-2/+9
2014-07-03replay-chunks.py: fix missing dataPeter Wu1-1/+3
Not all bytes were captured, it turns out that data was never read (and thus the send buffer becames full) which leads to data loss when the connection is closed.
2014-07-03replay-chunk: accept capture as arg, py2 compatPeter Wu1-10/+45
The common case is replaying a capture, so avoid all tshark boilerplate and run the command in the script. Fix the mixup of server and client sockets ("if reply, then write from the server socket"). Allow chunk size to be customized.
2014-07-02replay-chunks.py: fragmentize tcp dataPeter Wu1-0/+97