-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacchanger.py
43 lines (38 loc) · 1.17 KB
/
macchanger.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
import pyfiglet
import time
import os
import termcolor
from termcolor import colored
from pyfiglet import Figlet
os.system("clear")
figlet = Figlet(font="slant")
ascii_banner = figlet.renderText("Auto Mac Changer")
lines = ascii_banner.split('\n')
colors = ["red"]
for i, line in enumerate(lines):
color = colors[i % len(colors)]
print(colored(line, color))
def style_print(text, red):
print(colored(text,red, attrs=['bold']))
print()
style_print(" [ Made by Cyber Storm ]", 'cyan')
style_print("[+] Welcome to Auto Mac Changer [+]", 'red')
print()
a = (input(colored("[*] How often you want to change your mac address(In seconds)----> ", 'red', attrs=['bold'])))
def check_and_cast(input_value):
try:
# Attempt to convert the input to an integer
return int(input_value)
except ValueError:
# If conversion fails, print "wrong input"
print()
style_print("[*] Invalid input", 'red')
# Call the function and print the result
result = check_and_cast(a)
if result is not None:
a = int(a)
while True:
os.system('sudo macchanger -r eth0')
time.sleep(a)
else:
time.sleep(3)