mirror of
https://github.com/ivre/masscanned.git
synced 2025-10-02 14:48:22 +00:00
Fix bug in HTTP segmented test + clean
This commit is contained in:
parent
b74d891385
commit
c6118e1448
4 changed files with 10 additions and 9 deletions
|
@ -20,7 +20,6 @@ use std::convert::TryInto;
|
||||||
use std::time::SystemTime;
|
use std::time::SystemTime;
|
||||||
|
|
||||||
use crate::client::ClientInfo;
|
use crate::client::ClientInfo;
|
||||||
use crate::logger::MetaLogger;
|
|
||||||
use crate::proto::TCPControlBlock;
|
use crate::proto::TCPControlBlock;
|
||||||
use crate::Masscanned;
|
use crate::Masscanned;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ def test_ipv4_tcp_http():
|
||||||
|
|
||||||
@test
|
@test
|
||||||
def test_ipv4_tcp_http_segmented():
|
def test_ipv4_tcp_http_segmented():
|
||||||
sport = 24592
|
sport = 24593
|
||||||
dports = [80, 443, 5000, 53228]
|
dports = [80, 443, 5000, 53228]
|
||||||
for dport in dports:
|
for dport in dports:
|
||||||
seq_init = int(RandInt())
|
seq_init = int(RandInt())
|
||||||
|
@ -120,7 +120,9 @@ def test_ipv4_tcp_http_segmented():
|
||||||
assert resp is not None, "expecting answer, got nothing"
|
assert resp is not None, "expecting answer, got nothing"
|
||||||
check_ip_checksum(resp)
|
check_ip_checksum(resp)
|
||||||
assert TCP in resp, "expecting TCP, got %r" % resp.summary()
|
assert TCP in resp, "expecting TCP, got %r" % resp.summary()
|
||||||
assert resp[TCP].flags == "A"
|
assert resp[TCP].flags == "A", (
|
||||||
|
'expecting TCP flag "A", got %r' % resp[TCP].flags
|
||||||
|
)
|
||||||
req = (
|
req = (
|
||||||
Ether(dst=MAC_ADDR)
|
Ether(dst=MAC_ADDR)
|
||||||
/ IP(dst=IPV4_ADDR)
|
/ IP(dst=IPV4_ADDR)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue