mirror of
https://github.com/ivre/masscanned.git
synced 2025-10-02 06:38:21 +00:00
Tests: add routes to prevent wrong values from appearing in packets
This commit is contained in:
parent
70eae9bc0c
commit
4c508ccea6
1 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,9 @@ conf.iface = resolve_iface(IFACE)
|
||||||
# set interface
|
# set interface
|
||||||
subprocess.check_call(["ip", "addr", "add", "dev", IFACE, "192.0.0.2"])
|
subprocess.check_call(["ip", "addr", "add", "dev", IFACE, "192.0.0.2"])
|
||||||
subprocess.check_call(["ip", "link", "set", IFACE, "up"])
|
subprocess.check_call(["ip", "link", "set", IFACE, "up"])
|
||||||
|
subprocess.check_call(["ip", "route", "add", "192.0.0.1/32", "dev", IFACE])
|
||||||
|
subprocess.check_call(["ip", "route", "add", "1.2.3.4/32", "dev", IFACE])
|
||||||
|
conf.route.resync()
|
||||||
|
|
||||||
# start capture
|
# start capture
|
||||||
tcpdump = subprocess.Popen(
|
tcpdump = subprocess.Popen(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue