-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMULTIPLE-PORT-SCANNER.py
More file actions
51 lines (48 loc) · 2.69 KB
/
MULTIPLE-PORT-SCANNER.py
File metadata and controls
51 lines (48 loc) · 2.69 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
#!/usr/bin/python3
# Date Created : 2 January 2019
# Copyright 2019, Aniket.N.Bhagwate, All rights reserved.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# libraries
import os
import socket
from colorama import Fore, Back, Style
os.system("clear")
print(Fore.GREEN + Style.BRIGHT + "")
print(" __ __ _ _ _ _____ ___ ____ _ _____ ____ ___ ____ _____ ")
print(" | \/ | | | | | |_ _|_ _| _ \| | | ____| | _ \ / _ \| _ \_ _| ")
print(" | |\/| | | | | | | | | || |_) | | | _| _____| |_) | | | | |_) || | ")
print(" | | | | |_| | |___| | | || __/| |___| |__|_____| __/| |_| | _ < | | ")
print(" |_| |_|\___/|_____|_| |___|_| |_____|_____| |_| \___/|_| \_\|_| ")
print(" ____ ____ _ _ _ _ _ _____ ____ ")
print(" / ___| / ___| / \ | \ | | \ | | ____| _ \ ")
print(" \___ \| | / _ \ | \| | \| | _| | |_) | ")
print(" ___) | |___ / ___ \| |\ | |\ | |___| _ < ")
print(" |____/ \____/_/ \_\_| \_|_| \_|_____|_| \_\ ")
print(" --------------------------------------------------------------------------")
print(Fore.RED + Style.BRIGHT + "")
print(" [ ~ #Code By: Aniket.N.Bhagwate]")
print(Fore.GREEN + Style.BRIGHT + "")
print(" --------------------------------------------------------------------------")
host_name = socket.gethostname()
host_ip_address = socket.gethostbyname(host_name)
print(Fore.CYAN + Style.BRIGHT + "")
ip_range = input("Input the Port range for Scan\nExample : 100-200\n -->> ")
print(Fore.GREEN + Style.BRIGHT + "")
ip_range = ip_range.split("-")
for x in range(int(ip_range[0]),int(ip_range[1])):
try:
print("\nHost Name : " + str(host_name) + " Has Ip address : " + str(host_ip_address) + " Has -->> \"" + socket.getservbyport(x) + "\" <<-- Running on Port : " + str(x))
except:
pass
if x != 100:
continue