-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpinger.py
More file actions
69 lines (53 loc) · 1.36 KB
/
pinger.py
File metadata and controls
69 lines (53 loc) · 1.36 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
#python3
'''
This is a simple Ip-Pinger
The purpose of a pinger is to be an online/offline checker
Or it could be upgrade to be a DOS or even DDOS-Tool
'''
# imports
import os, time
# vars
hostname = "google.com"
response = ""
# funcs
#visuals
def ascii_greet():
print("TODO: ASCII ART WELCOME")
def madeBy():
print("Made By XxVinr_AlfakynxX (aka @vinralfakyn on IG)")
print("+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+")
#pinger itself
def getHostname():
global hostname
hostname = str(input("--=IP: "))
def grabbingSoulInfo():
os.system("clear")
print("TODO ASCII ART")
time.sleep(1)
print("getting the scythe...")
time.sleep(0.5)
os.system("clear")
def ping():
isPinging = True
counter = 0
while isPinging:
response = os.system("ping -c 4 -i 0.2 -n > /dev/null " + hostname)
if response.returncode == 0:
print("Reply from ", hostname, counter)
counter += 1
#time.sleep(0.3)
else:
isPinging = False
for i in range(10):
print("[*] OFFLINE [*] the reaper brought the scythe to reap ", hostname, "'s router")
time.sleep(0.3)
# main-loop
def main():
ascii_greet()
madeBy()
getHostname()
grabbingSoulInfo()
ping()
# calling main func
main()
print("")