-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Miguel Sanchez
authored and
Miguel Sanchez
committed
Oct 29, 2023
1 parent
c1b5c13
commit 4b0490e
Showing
12 changed files
with
190 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from colorama import Fore | ||
from plugins import agent_list | ||
import requests | ||
|
||
user_a = agent_list.get_useragent() | ||
header = {"User-Agent": user_a} | ||
|
||
def securitytxt(domain: str) -> str: | ||
sec_loc = ["security.txt", ".well-known/security.txt"] | ||
for sec_locs in sec_loc: | ||
s = requests.Session() | ||
r = s.get(f"{domain}/{sec_locs}", verify=False, headers=header) | ||
if r.status_code == 200: | ||
print(f"{Fore.MAGENTA}[+] {Fore.CYAN}-{Fore.WHITE} Security.txt: {Fore.GREEN}{domain}/{sec_locs}") | ||
else: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from colorama import Fore | ||
from plugins import agent_list | ||
import requests | ||
|
||
user_a = agent_list.get_useragent() | ||
header = {"User-Agent": user_a} | ||
|
||
def sitemap(domain: str) -> str: | ||
sitemap_loc = ["sitemap.txt", "sitemap.xml", "sitemap-index.xml", "sitemap/sitemap.xml"] | ||
for sitemap_locs in sitemap_loc: | ||
s = requests.Session() | ||
r = s.get(f"{domain}/{sitemap_locs}", verify=False, headers=header) | ||
if r.status_code == 200: | ||
print(f"{Fore.MAGENTA}[+] {Fore.CYAN}-{Fore.WHITE} Sitemap: {Fore.GREEN}{domain}/{sitemap_locs}") | ||
else: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
from colorama import Fore | ||
from time import perf_counter | ||
import requests | ||
import threading | ||
import urllib3 | ||
import sys | ||
|
||
urllib3.disable_warnings() | ||
|
||
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36" | ||
header = {"User-Agent": user_agent} | ||
|
||
banner = f""" | ||
█████▒ █ ██ ▒███████▒ ▒███████▒ ▓██ ██▓ | ||
▓██ ▒ ██ ▓██▒ ▒ ▒ ▒ ▄▀░ ▒ ▒ ▒ ▄▀░ ▒██ ██▒ | ||
▒████ ░ ▓██ ▒██░ ░ ▒ ▄▀▒░ ░ ▒ ▄▀▒░ ▒██ ██░ | ||
░▓█▒ ░ ▓▓█ ░██░ ▄▀▒ ░ ▄▀▒ ░ ░ ▐██▓░ | ||
░▒█░ ▒▒█████▓ ▒███████▒ ▒███████▒ ░ ██▒▓░ | ||
▒ ░ ░▒▓▒ ▒ ▒ ░▒▒ ▓░▒░▒ ░▒▒ ▓░▒░▒ ██▒▒▒ | ||
░ ░░▒░ ░ ░ ░░▒ ▒ ░ ▒ ░░▒ ▒ ░ ▒ ▓██ ░▒░ | ||
░ ░ ░░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ▒ ▒ ░░ | ||
░ ░ ░ ░ ░ ░ ░ | ||
░ ░ ░ ░ | ||
{Fore.WHITE}Author: {Fore.CYAN}c0d3ninja | ||
{Fore.WHITE}Version: {Fore.CYAN}v1.0 | ||
""" | ||
|
||
print(f"{Fore.RED}{banner}") | ||
|
||
with open("payloads/api.txt", "r") as f: | ||
api_list = (x.strip() for x in f.readlines()) | ||
|
||
def api_fuzzer(domain: str, api: str) -> None: | ||
try: | ||
s = requests.Session() | ||
url = f"{domain}{api}" | ||
r = s.get(url, headers=header, verify=False) | ||
if r.status_code == 200: | ||
print(f"{Fore.GREEN}[+] {Fore.WHITE} - {Fore.MAGENTA}{url}") | ||
else: | ||
print(f"{Fore.RED}[-] {Fore.WHITE} - {Fore.MAGENTA}{url}") | ||
except requests.exceptions.RequestException: | ||
pass | ||
|
||
def main(domain: str) -> None: | ||
threads = [] | ||
for api in api_list: | ||
t = threading.Thread(target=api_fuzzer, args=(domain, api)) | ||
t.start() | ||
threads.append(t) | ||
for thread in threads: | ||
thread.join() | ||
|
||
if __name__ == "__main__": | ||
time_before = perf_counter() | ||
try: | ||
main(sys.argv[1]) | ||
except (urllib3.exceptions.MaxRetryError, requests.exceptions.RequestException): | ||
print(f"{Fore.YELLOW}[!] {Fore.WHITE} - Exception occurred during scanning.") | ||
print(f"{Fore.MAGENTA}Time: {Fore.WHITE}{perf_counter() - time_before}") | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
from utils import logins | ||
from plugins import agent_list | ||
from colorama import Fore | ||
import httpx | ||
import asyncio | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,34 @@ | ||
from colorama import Fore | ||
from modules import urltoip | ||
import socket | ||
import threading | ||
import socket | ||
from modules import urltoip | ||
import ipaddress | ||
|
||
open_ports = [] | ||
closed_ports = [] | ||
start_port = 1 | ||
end_port = 65000 | ||
|
||
ports = [80, 8080, 443, 8443] | ||
|
||
def scan_port(port): | ||
def portscanner(domain: str): | ||
ip = urltoip.get_ip(domain) | ||
open_ports = [] | ||
try: | ||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
sock.settimeout(1) | ||
result = sock.connect_ex((ip_address, port)) | ||
|
||
if result == 0: | ||
open_ports.append(f"{port}") | ||
print(f"{Fore.MAGENTA}[+] {Fore.CYAN}-{Fore.WHITE} PORTS: {Fore.GREEN}{', '.join(map(str,open_ports))}") | ||
else: | ||
pass | ||
|
||
sock.close() | ||
except: | ||
for port in ports: | ||
sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
data = sck.connect_ex((ip, port)) | ||
if data == 0: | ||
open_ports.append(f"{port}") | ||
sck.close() | ||
else: | ||
pass | ||
print(f"{Fore.MAGENTA}[+] {Fore.CYAN}-{Fore.WHITE} PORTS: {Fore.GREEN}{', '.join(map(str,open_ports))}") | ||
except socket.error: | ||
print (Fore.RED + "Could not connect to host") | ||
pass | ||
except KeyboardInterrupt: | ||
print ("You pressed CTRL+C") | ||
except ipaddress.AddressValueError: | ||
print ("IP address not allowed") | ||
except TypeError: | ||
pass | ||
|
||
def main(domain: str): | ||
global ip_address | ||
ip_address = urltoip.get_ip(domain) | ||
threads = [] | ||
for port in range(start_port, end_port + 1): | ||
thread = threading.Thread(target=scan_port, args=(port,)) | ||
threads.append(thread) | ||
thread.start() | ||
|
||
# wait for all threads to complete | ||
for thread in threads: | ||
thread.join() | ||
if __name__=="__main__": | ||
t1 = threading.Thread(target=portscanner, args=(ports,)) | ||
t1.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.