├── DNS-Spoofer └── Spoofer.py ├── LICENSE ├── PasswordCracking ├── hashpassword.py └── sha1cracker.py ├── PortScanner ├── AdvScanner.py ├── Multiport.py ├── Singleport.py └── bannerofport.py ├── README.md ├── images ├── abc └── image.png └── requirements.txt /DNS-Spoofer/Spoofer.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | 3 | from scapy.all import * 4 | 5 | def findDns(p): 6 | if p.haslayer(DNS): 7 | print(p[IP].src) 8 | print(p[DNS].summary()) 9 | 10 | sniff(prn=findDns) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Saad Hassan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PasswordCracking/hashpassword.py: -------------------------------------------------------------------------------- 1 | # !usr/bin/python 2 | 3 | import hashlib 4 | from termcolor import colored 5 | 6 | print(colored("[*] Enter string or password to hash","blue")) 7 | hashval = str(input()) 8 | 9 | print(colored("[*] Enter the hash you want to do",'blue')) 10 | print(colored("1. MD5\n2. SHA1\n3. SHA224\n4. SHA256\n5. SHA512\n6. All",'green')) 11 | option = int(input()) 12 | 13 | if option == 1: 14 | md5obj = hashlib.md5() 15 | md5obj.update(hashval.encode()) 16 | print(colored("Your hash is: "+ md5obj.hexdigest(),'green')) 17 | 18 | if option == 2: 19 | sha1obj = hashlib.sha1() 20 | sha1obj.update(hashval.encode()) 21 | print(colored("Your hash is: "+ sha1obj.hexdigest(),'green')) 22 | 23 | if option == 3: 24 | sha224obj = hashlib.sha224() 25 | sha224obj.update(hashval.encode()) 26 | print(colored("Your hash is: "+ sha224obj.hexdigest(),'green')) 27 | 28 | if option == 4: 29 | sha256obj = hashlib.sha256() 30 | sha256obj.update(hashval.encode()) 31 | print(colored("Your hash is: "+ sha256obj.hexdigest(),'green')) 32 | 33 | if option == 5: 34 | sha512obj = hashlib.sha512() 35 | sha512obj.update(hashval.encode()) 36 | print(colored("Your hash is: "+ sha512obj.hexdigest(),'green')) 37 | 38 | if option == 6: 39 | md5obj = hashlib.md5() 40 | md5obj.update(hashval.encode()) 41 | print(colored("MD5 is: "+ md5obj.hexdigest(),'green')) 42 | sha1obj = hashlib.sha1() 43 | sha1obj.update(hashval.encode()) 44 | print(colored("SH1 is: "+ sha1obj.hexdigest(),'green')) 45 | sha224obj = hashlib.sha224() 46 | sha224obj.update(hashval.encode()) 47 | print(colored("SHA224 is: "+ sha224obj.hexdigest(),'green')) 48 | sha256obj = hashlib.sha256() 49 | sha256obj.update(hashval.encode()) 50 | print(colored("SHA256 is: "+ sha256obj.hexdigest(),'green')) 51 | sha512obj = hashlib.sha512() 52 | sha512obj.update(hashval.encode()) 53 | print(colored("SHA512 is: "+ sha512obj.hexdigest(),'green')) -------------------------------------------------------------------------------- /PasswordCracking/sha1cracker.py: -------------------------------------------------------------------------------- 1 | # !usr/bin/python 2 | 3 | import hashlib 4 | from termcolor import colored 5 | from urllib.request import urlopen 6 | 7 | print(colored("[*] Enter SHA1 hashed value","blue")) 8 | hashval = str(input()) 9 | 10 | # We are using 1 million password dictionary to find our the SH1 hash reverse value 11 | passwordlist = str(urlopen('https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt').read(),'utf-8') 12 | 13 | print(colored("Password matching started\n",'green')) 14 | for password in passwordlist.split('\n'): 15 | hashguess = hashlib.sha1(bytes(password,'utf-8')).hexdigest() 16 | if hashguess == hashval: 17 | print(colored("Password found !! it is "+ str(password),'green')) 18 | quit() 19 | else: 20 | print(colored('dont matched trying next.....','red')) 21 | 22 | print(colored("Password not in the list",'red')) -------------------------------------------------------------------------------- /PortScanner/AdvScanner.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | 4 | from socket import * 5 | import socket 6 | from termcolor import colored 7 | from threading import * 8 | 9 | 10 | print(colored("[*] Enter Host IP Address or Website Name:","green")) 11 | host = input() 12 | print(colored("[*] Enter number of ports to scan:","green")) 13 | num = int(input()) 14 | 15 | def PScanner(port): 16 | # AF_INT means we want to connect to IPv4 and IPv6 Addresses 17 | # SOCK_STREAM means we want to connect using the TCP protocol not the UDP 18 | try: 19 | soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 20 | soc.connect((host,port)) 21 | print(colored("[+] %d/tcp is Open" %(port),"blue")) 22 | 23 | except: 24 | print(colored("[!!] %d/tcp is Closed" %(port),"red")) 25 | finally: 26 | soc.close() 27 | 28 | def ResolveScan(tHost,tPorts): 29 | try: 30 | targetIP = gethostbyname(tHost) 31 | except: 32 | print(colored("Unknown Host"),"red") 33 | try: 34 | targetname = gethostbyaddr(targetIP) 35 | print(colored("[+] Scan results for: "+ targetname[0],"blue")) 36 | except: 37 | print(colored("[+] Scan Results for: "+ targetIP,"blue")) 38 | 39 | setdefaulttimeout(1) 40 | 41 | for port in range(1,num): 42 | PScanner(port) 43 | 44 | 45 | ResolveScan(host,num) -------------------------------------------------------------------------------- /PortScanner/Multiport.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import socket 4 | from termcolor import colored 5 | 6 | soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 7 | 8 | # AF_INT means we want to connect to IPv4 and IPv6 Addresses 9 | # SOCK_STREAM means we want to connect using the TCP protocol not the UDP 10 | 11 | print(colored("[*] Enter Host IP Address:","green")) 12 | host = input() 13 | print(colored("[*] Enter number of ports to scan:","green")) 14 | num = int(input()) 15 | 16 | def PScanner(port): 17 | if soc.connect_ex((host,port)): 18 | print(colored("[!!] PORT %d is closed" %(port),"red")) 19 | 20 | else: 21 | print(colored("PORT %d is open" %(port),"blue")) 22 | 23 | for port in range(1,num): 24 | PScanner(port) -------------------------------------------------------------------------------- /PortScanner/Singleport.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import socket 4 | from termcolor import colored 5 | 6 | soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM) 7 | 8 | # AF_INT means we want to connect to IPv4 and IPv6 Addresses 9 | # SOCK_STREAM means we want to connect using the TCP protocol not the UDP 10 | 11 | print(colored("Enter Host IP Address:","green")) 12 | host = input() 13 | print(colored("Enter port number to scan:","green")) 14 | port = int(input()) 15 | 16 | def PScanner(host,port): 17 | if soc.connect_ex((host,port)): 18 | print(colored("PORT %d is closed" %(port),"red")) 19 | 20 | else: 21 | print(colored("PORT %d is open" %(port),"blue")) 22 | 23 | PScanner(host,port) -------------------------------------------------------------------------------- /PortScanner/bannerofport.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import socket 4 | from termcolor import colored 5 | 6 | 7 | print(colored("Select Option"),"blue") 8 | print(colored("1. Single Port\n2. Multi Port"),"blue") 9 | option = int(input()) 10 | 11 | if option == 1: 12 | print(colored("Enter Host IP Address:","green")) 13 | host = input() 14 | print(colored("Enter port number to scan:","green")) 15 | port = int(input()) 16 | 17 | if option == 2: 18 | print(colored("[*] Enter Host IP Address:","green")) 19 | host = input() 20 | print(colored("[*] Enter number of ports to scan:","green")) 21 | num = int(input()) 22 | 23 | def getBanner(ip,port): 24 | try: 25 | socket.setdefaulttimeout(2) 26 | soc = socket.socket() 27 | soc.connect((ip, port)) 28 | banner = soc.recv(1024).strip('/n') 29 | return banner 30 | except: 31 | return "Got Nothing" 32 | 33 | def PScanner(host,port,option): 34 | if option == 1: 35 | banner = getBanner(host, port) 36 | if banner: 37 | print(colored("[+]" + host + '/' + str(port) + ":" + banner.strip('/n'),"blue")) 38 | if option == 2: 39 | for port in range(1,num): 40 | banner = getBanner(host, port) 41 | print(colored("[+] " + host + '/' + str(port) + ": " + banner.strip('/n'),"blue")) 42 | 43 | if option == 1: 44 | PScanner(host,port,option) 45 | 46 | if option == 2: 47 | PScanner(host,num,option) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |