Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions jpscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import pprint

## TODO
## 2.- Add Nikto and Gobuster to any HTTP service
## 4.- EyeWitness
## 6.- if IKEVPN ikescan
## 7.- default creds on SSH and FTP using Hydra and rockyou
Expand Down Expand Up @@ -123,8 +122,19 @@ def check_banner(banner):
return ["Not found"]


def website_bruteforce(target):
print("try)")
def website_bruteforce(target, port, use_https=False):
url = f"{'https' if use_https else 'http'}://{target}:{port}"
print(f"[+] Running nikto scan on {url}")
try:
subprocess.run(["nikto", "-host", url])
except FileNotFoundError:
print("[-] nikto not installed, skipping")
print(f"[+] Running gobuster dir scan on {url}")
wordlist = "/usr/share/wordlists/dirb/common.txt"
try:
subprocess.run(["gobuster", "dir", "-u", url, "-w", wordlist])
except FileNotFoundError:
print("[-] gobuster not installed, skipping")
return

def nmap_vuln_scan(target_ports):
Expand Down Expand Up @@ -200,6 +210,8 @@ def nmap_scan(target_ports):
else:
#exploits = check_banner(banner)
exploits = ""
if "http" in line.lower():
website_bruteforce(ip, port, use_https="https" in line.lower())
if ip in output:
if prot in output[ip]:
output[ip][prot].append([port,banner,exploits])
Expand Down