|
9 | 9 | ## the files in the vulscan folder.
|
10 | 10 | ##
|
11 | 11 | declare -a FILES=(
|
12 |
| - "http://www.computec.ch/projekte/vulscan/download/cve.csv" |
13 |
| - "http://www.computec.ch/projekte/vulscan/download/exploitdb.csv" |
14 |
| - "http://www.computec.ch/projekte/vulscan/download/openvas.csv" |
15 |
| - "http://www.computec.ch/projekte/vulscan/download/osvdb.csv" |
16 |
| - "http://www.computec.ch/projekte/vulscan/download/scipvuldb.csv" |
17 |
| - "http://www.computec.ch/projekte/vulscan/download/securityfocus.csv" |
18 |
| - "http://www.computec.ch/projekte/vulscan/download/securitytracker.csv" |
19 |
| - "http://www.computec.ch/projekte/vulscan/download/xforce.csv" |
| 12 | + "https://raw.githubusercontent.com/scipag/vulscan/master/cve.csv" |
| 13 | + "https://raw.githubusercontent.com/scipag/vulscan/master/exploitdb.csv" |
| 14 | + "https://raw.githubusercontent.com/scipag/vulscan/master/openvas.csv" |
| 15 | + "https://raw.githubusercontent.com/scipag/vulscan/master/osvdb.csv" |
| 16 | + "https://raw.githubusercontent.com/scipag/vulscan/master/scipvuldb.csv" |
| 17 | + "https://raw.githubusercontent.com/scipag/vulscan/master/securityfocus.csv" |
| 18 | + "https://raw.githubusercontent.com/scipag/vulscan/master/securitytracker.csv" |
| 19 | + "https://raw.githubusercontent.com/scipag/vulscan/master/xforce.csv" |
20 | 20 | )
|
21 | 21 |
|
22 | 22 | UPDATED=false
|
@@ -51,17 +51,18 @@ cd downloading
|
51 | 51 | ##
|
52 | 52 | ## For each file, we want to download it, and see if it differs from old one.
|
53 | 53 | ## If it differs, we assume that it is new, and thus we want to replace the old one.
|
| 54 | +## Unfortunately GitHub is issuing the cert for www.github.com only and not for other |
| 55 | +## domains which is why we need to ignore cert warnings |
54 | 56 | ##
|
55 | 57 | for file in "${FILES[@]}"
|
56 |
| -do |
57 |
| - |
| 58 | +do |
58 | 59 | logIfDebug "Downloading ${file}..."
|
59 |
| - wget --quiet ${file} |
| 60 | + wget --quiet --no-check-certificate ${file} |
60 | 61 | filename=$(echo ${file} | awk -F/ '{print $NF}')
|
61 |
| - result=$(diff --suppress-common-lines --speed-large-files -y ${filename} ../${filename} | wc -l) |
| 62 | + result=$(diff --suppress-common-lines --speed-large-files -y ${filename} ../../../${filename} | wc -l) |
62 | 63 | if [ ${result} -ne 0 ]; then
|
63 | 64 | logIfDebug "Updating ${filename} as it differs"
|
64 |
| - mv ${filename} .. |
| 65 | + mv ${filename} ../../../ |
65 | 66 | UPDATED=true
|
66 | 67 | fi
|
67 | 68 | done
|
|
0 commit comments