Skip to content

Commit 9a7b0aa

Browse files
author
ekultek
committed
created a way to validate IP addresses pythonically, also created prompts for platforms and autosploit console
1 parent ba39cb9 commit 9a7b0aa

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/settings.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import socket
2+
import getpass
3+
4+
5+
PLATFORM_PROMPT = "\n{}@\033[36mPLATFORM\033[0m$ ".format(getpass.getuser())
6+
AUTOSPLOIT_PROMPT = "\n\033[31m{}\033[0m@\033[36mautosploit\033[0m# ".format(getpass.getuser())
7+
8+
9+
def validate_ip_addr(provided):
10+
try:
11+
socket.inet_aton(provided)
12+
return True
13+
except:
14+
return False

0 commit comments

Comments
 (0)