-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathfindip.py
31 lines (24 loc) · 911 Bytes
/
findip.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
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#+--------------------+
#|Creators : |
#|-Drarqua GHS Storm |
#|-Rebel Yell |
#+--------------------+
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
import socket
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
def restart_program():
python = sys.executable
os.execl(python, python, * sys.argv)
curdir = os.getcwd()
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
host = raw_input( "Site you want to find Ip:" )
ip = socket.gethostbyname( host )
print ("The ip is :")
print ("[" + ip + "]")
if __name__ == "__main__":
answer = raw_input("Do you want to search for another site's IP?")
if answer.strip() in "y Y yes Yes YES".split():
restart_program()
else:
os.system(curdir+"\Deq\main.py")