Commit df4b7fc8 authored by Your Name's avatar Your Name
Browse files

Improved Searchsploit utility

parent 4da64fbb
cat nmap_all_ports.gnmap| grep -o -E '\/\/[A-Z](\w+.)*' |sed 's/\///g' > list_software_version.txt
#!/bin/bash
cat nmap_all_ports.gnmap | grep -o -E 'Ports: .*'| sed 's/Ports: //g' | sed 's/\tIgnored State/\,\ /g'| sed 's/\/\, /\n/g' | grep -E '[0-9]{1,5}' | grep -v 'filtered' | cut -d'/' -f 7 | cut -d '(' -f 1 > ./list_software_version.txt
input="./list_software_version.txt"
while IFS= read -r line
do
echo "==============="
echo "Testing: $line"
echo "=============="
searchsploit "$line"
echo "#####################"
echo "\n\n"
# Software name
soft=$(echo $line | cut -d' ' -f 1)
# Version number
version=$(echo $line | grep -o -E '([0-9]{1,}\.)+([0-9]{1,}\w*|\w+)')
for i in $(echo $version)
do
search_string="$soft $i"
echo "========================"
echo "search for: $search_string"
echo "========================"
#searchsploit $search_string
echo "#####################"
echo
echo
done
done < "$input"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment