2 #download, update and query local exploit database from exploit-db.com
3 target_dir
="/opt/exploit-db"
8 echo You must run exploit-db update as root
!;
11 echo "Downloading exploit archive from exploit-db.com..."
12 mkdir
-p "$target_dir"
14 wget
"http://www.exploit-db.com/archive.tar.bz2"
15 echo "Extracting archive..."
16 tar jxpf archive.
tar.bz2
21 cat "$target_dir/files.csv" |
grep -i "$2" |
while read line
; do
22 echo $target_dir$
(echo $line |
sed -r 's/^[0-9]+,([^,]+),"([^"]*)",([0-9-]+),.*/\/opt\/exploit-db\/\1 \2 (\3)/')
30 echo 'Local exploit-db.com exploit database tool by Deeno9 2010'
32 echo ' Local Milw0rm.com exploit database tool by Harvie 2009 ( http://blog.harvie.cz/ )'
34 echo "Target directory: $target_dir"
35 echo "usage: $0 {update|search regexp|usearch regexp}"