-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharp_testing.py
More file actions
114 lines (75 loc) · 2.19 KB
/
arp_testing.py
File metadata and controls
114 lines (75 loc) · 2.19 KB
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
# ARP TESTING SITE
# IMPORTS
import requests, random, time
# UI IMPORTS
from rich.panel import Panel
from rich.table import Table
from rich.live import Live
from rich.console import Console
console = Console()
ips = ["nsm", "computer", "pc", "tablet", "ps4", "ps5", "3ds"]
active_devices = {}
amount = len(ips)
def iti():
for device in ips:
for num in range(amount):
if num != 0:
print(active_devices)
active_devices[num] = f"{device}"
def logic():
num = 1
for device in ips:
active_devices[num] = f"{device}"
num += 1
print(active_devices)
white_list = []
choices = []
while True:
try:
choice = console.input("Choose the ip you want to whitelist: ")
if choice == "exit":
console.print(f"Now exiting")
time.sleep(2)
break
elif choice in choices:
console.print("Can no duplicate inputs: Please try again")
else:
dict_key = int(choice)
device = (active_devices[dict_key])
choices.append(choice)
white_list.append(f"{dict_key}. {device}")
print(white_list)
#print(active_devices[dict_key])
except KeyError as e:
console.print(f"Error: Please enter a valid key")
console.input("Press enter to leave")
data = {
"1": "nsm",
"2": "pc",
"3": "computer",
"4": "laptop",
"5": "tablet",
"6": "phone",
"7": "ps4",
"8": "ps5"
}
import pyfiglet
import pyfiglet
import time
class user_interface():
def __init__(self):
pass
def welcome(self):
welcome = pyfiglet.figlet_format("Welcome to\nNet Alert 2.0",font="slant")
console.print(f"[bold red]{welcome}[/bold red]")
nsm = user_interface()
nsm.welcome()
def art():
import pyfiglet
import time
text = "Welcome to NetAlert!"
ascii_art = pyfiglet.figlet_format(text, font="slant")
for char in ascii_art:
print(char, end='', flush=True)
time.sleep(0.02)
input()