-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
120 lines (81 loc) · 2.27 KB
/
main.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
from __future__ import print_function
import click
# from protocols.arp import send_arp_pkt, configure_arp_pkt
# from protocols.ecmp import send_ecmp_pkt, configure_ecmp_pkt
from protocols.ether import send_ether_pkt, configure_ether_pkt
# from protocols.ip import send_ip_pkt, configure_ip_pkt
# from protocols.ipv6 import send_ipv6_pkt, configure_ipv6_pkt
# from protocols.tcp import send_tcp_pkt, configure_tcp_pkt
# from protocols.udp import send_udp_pkt, configure_udp_pkt
# from protocols.vxlan import send_vxlan_pkt, configure_vxlan_pkt
@click.group()
def packet_sender_cli():
# type () -> None
"""A tool helpful for sending different protocols of packets"""
pass
@packet_sender_cli.group()
def arp():
# type () -> None
"""Send arp packet"""
pass
@packet_sender_cli.group()
def ecmp():
# type () -> None
"""Send ecmp packet"""
pass
@packet_sender_cli.group()
def ether():
# type () -> None
"""Send ethernet packet"""
pass
@packet_sender_cli.group()
def ip():
# type () -> None
"""Send ip packet"""
pass
@packet_sender_cli.group()
def ipv6():
# type () -> None
"""Send ipv6 packet"""
pass
@packet_sender_cli.group()
def tcp():
# type () -> None
"""Send tcp packet"""
pass
@packet_sender_cli.group()
def udp():
# type () -> None
"""Send udp packet"""
pass
@packet_sender_cli.group()
def vxlan():
# type () -> None
"""Send vxlan packet"""
pass
# Add command to arp type
# arp.add_command(configure_arp_pkt)
# arp.add_command(send_arp_pkt)
# Add command to ecmp type
# ecmp.add_command(configure_ecmp_pkt)
# ecmp.add_command(send_ecmp_pkt)
# Add command to ether type
ether.add_command(configure_ether_pkt)
ether.add_command(send_ether_pkt)
# Add command to ip type
# ip.add_command(configure_ip_pkt)
# ip.add_command(send_ip_pkt)
# # Add command to ipv6 type
# ipv6.add_command(configure_ipv6_pkt)
# ipv6.add_command(send_ipv6_pkt)
# Add command to tcp type
# tcp.add_command(configure_tcp_pkt)
# tcp.add_command(send_tcp_pkt)
# Add command to udp type
# udp.add_command(configure_udp_pkt)
# udp.add_command(send_udp_pkt)
# Add command to vxlan type
# vxlan.add_command(configure_vxlan_pkt)
# vxlan.add_command(send_vxlan_pkt)
if __name__ == "__main__":
packet_sender_cli()