-
Notifications
You must be signed in to change notification settings - Fork 941
Expand file tree
/
Copy pathsend.py
More file actions
executable file
·34 lines (27 loc) · 878 Bytes
/
Copy pathsend.py
File metadata and controls
executable file
·34 lines (27 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2019 Stephen Ibanez
#
# SPDX-License-Identifier: GPL-2.0-only
import sys
import time
from probe_hdrs import *
def main():
probe_pkt = Ether(dst='ff:ff:ff:ff:ff:ff', src=get_if_hwaddr('eth0')) / \
Probe(hop_cnt=0) / \
ProbeFwd(egress_spec=4) / \
ProbeFwd(egress_spec=1) / \
ProbeFwd(egress_spec=4) / \
ProbeFwd(egress_spec=1) / \
ProbeFwd(egress_spec=3) / \
ProbeFwd(egress_spec=2) / \
ProbeFwd(egress_spec=3) / \
ProbeFwd(egress_spec=2) / \
ProbeFwd(egress_spec=1)
while True:
try:
sendp(probe_pkt, iface='eth0')
time.sleep(1)
except KeyboardInterrupt:
sys.exit()
if __name__ == '__main__':
main()