Skip to content

Commit

Permalink
Merge pull request #1004 from psyray/add-nmap-vulscan-script-v2
Browse files Browse the repository at this point in the history
Add nmap vulscan script
  • Loading branch information
yogeshojha committed Oct 24, 2023
2 parents cd9c31e + 9c3cc13 commit 770947d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
11 changes: 11 additions & 0 deletions web/celery-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Package: firefox
Pin: version 1:1snap1-0ubuntu2
Pin-Priority: -1
' | tee /etc/apt/preferences.d/mozilla-firefox
apt update
apt install firefox -y

# update whatportis
Expand Down Expand Up @@ -76,6 +77,16 @@ then
fi
python3 -m pip install -r /usr/src/github/theHarvester/requirements/base.txt

# clone vulscan
if [ ! -d "/usr/src/github/scipag_vulscan" ]
then
echo "Cloning Nmap Vulscan script"
git clone https://github.com/scipag/vulscan /usr/src/github/scipag_vulscan
echo "Symlinking to nmap script dir"
ln -s /usr/src/github/scipag_vulscan /usr/share/nmap/scripts/vulscan
echo "Usage in reNgine, set vulscan/vulscan.nse in nmap_script scanEngine port_scan config parameter"
fi

# install h8mail
python3 -m pip install h8mail

Expand Down
14 changes: 11 additions & 3 deletions web/reNgine/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3248,9 +3248,17 @@ def parse_nmap_vulscan_output(script_output):
if not line:
continue
if not line.startswith('['): # provider line
provider_name, provider_url = tuple(line.split(' - '))
data[provider_name] = {'url': provider_url.rstrip(':'), 'entries': []}
continue
if "No findings" in line:
logger.info(f"No findings: {line}")
continue
elif ' - ' in line:
provider_name, provider_url = tuple(line.split(' - '))
data[provider_name] = {'url': provider_url.rstrip(':'), 'entries': []}
continue
else:
# Log a warning
logger.warning(f"Unexpected line format: {line}")
continue
reg = r'\[(.*)\] (.*)'
matches = re.match(reg, line)
id, title = matches.groups()
Expand Down

0 comments on commit 770947d

Please sign in to comment.