forked from fikrado-orgnasation/python-for-Hackers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlpha-scanner.py
67 lines (57 loc) · 1.9 KB
/
Alpha-scanner.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# made with python3
import nmap
scanner = nmap.portscanner
logo = """
/ \ _-'
_/| \-''- _ /
__-' { | \
/ \
/ "o. |o }
| \ ;
',
\_ __\
''-_ \.//
/ '-____'
╔═══╦╗───╔╗
║╔═╗║║───║║
║║─║║║╔══╣╚═╦══╗
║╚═╝║║║╔╗║╔╗║╔╗║
║╔═╗║╚╣╚╝║║║║╔╗║
╚╝─╚╩═╣╔═╩╝╚╩╝╚╝
──────║║
──────╚╝
"""
print("______________________________")
print(logo)
print("-------------------------------")
ip_addr = input(" Please enter ip address ")
print(" The ip you enter is:", ip_addr)
type(ip_addr)
resp = input("""\nEnter the ip address you want to scan
1:SYN ACK scan
2:UDP scan
3:Super scanner \n""")
print("your option", resp)
if resp == '1':
print("Nmap Version: ", scanner.nmap_version())
scanner.scan(ip_addr, '1-1024', '-v -sS')
print(scanner.scaninfo())
print("ip statu: ", scanner[ip_addr].state())
print(scanner[ip_addr].all_protocols())
print("open ports: ", scanner[ip_addr]['tcp'].keys())
elif resp == '2':
print("Nmap Version: ", scanner.nmap_version())
scanner.scan(ip_addr, '1-1024', '-v -sU')
print(scanner.scaninfo())
print("ip statu: ", scanner[ip_addr].state())
print(scanner[ip_addr].all_protocols())
print("open ports: ", scanner[ip_addr]['udp'].keys())
elif resp == '3':
print("Nmap Version: ", scanner.nmap_version())
scanner.scan(ip_addr, '1-1024', '-v -sS -sV -A -O')
print(scanner.scaninfo())
print("ip statu: ", scanner[ip_addr].state())
print(scanner[ip_addr].all_protocols())
print("open ports: ", scanner[ip_addr]['tcp'].keys())
elif resp >= '4':
print("wrong option dude")