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
#pip3 install pandas | |
#tested on ubuntu 18.04 python 3.7 | |
#help from: https://beenje.github.io/blog/posts/parsing-html-tables-in-python-with-pandas/ | |
#DESCRIPTION: with a file.html extracted from openvas with results, it show each vuln with assets that have, | |
#usefull for massive scans and need to write a report | |
#tip: use filter "rows=" at "Scans>Results" menu with a big number to be faster | |
#url example: https://<IP_OPENVAS>:9392/omp?cmd=get_results&filter=first=301 rows=200 severity>6.9 rows=200 first=101 sort=vulnerability min_qod=70 apply_overrides=1 autofp=0&token=XXXXXXXXXXXXXXXXXXXXXXX | |
#download (or copy) all content of page (like previous url) and put in a file that pass as argument | |
#python3 getVulnCoincidence.py ./file.html |
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
import sys, subprocess | |
print(sys.argv[1]) | |
proc = subprocess.Popen([sys.argv[1]], stdout=subprocess.PIPE, shell=True) | |
(out, err) = proc.communicate() | |
print(out.decode("utf-8")) |
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
#!/bin/bash | |
#arguments are <ip range to set name to a folder> <csv (',' separator) with all ip you want> | |
#you can use this script with a csv generated by checkUpIps.sh | |
#organize nmap outputs inside a folder, show output console to know for what ip is going inside the csv | |
#./nmapAutomated.sh 192.158.2.0 example.csv | |
namefolder='nmap'$(echo $1 | tr . -) | |
mkdir -p $namefolder | |
while IFS="," read col1 | |
do |
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
#Auth | |
#python3.4 or newer | |
#use "screen python3 registerIp.py" for better experience then ctrl+a+d and 'screen -r' (see more screen linux command on google) | |
#to stop ctrl + c | |
#interesting url to develope this | |
#help from https://medium.com/greedygame-engineering/an-elegant-way-to-run-periodic-tasks-in-python-61b7c477b679 (but in python 2) | |
#if you want to mount your own server https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-16-04 | |
#https://www.freecodecamp.org/news/send-emails-using-code-4fcea9df63f/ | |
# | |
#This script is designed for who wants the external ip and send it with email. For who want to have services at home |
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
#!/bin/bash | |
#script extract the IPs of a network that answer to a ping request | |
#create a csv for others automated vuln scanners | |
#use fo this: ./checkUpIps.sh 192.168.1.0 (only networks /24 ended with 0 without writing /24) | |
ip=$1 | |
ipname=$(echo $1 | tr . -) | |
nameResult='ips'$ipname'.txt' | |
namecsv='onlyIps'$ipname'.csv' |