Skip to content

Commit a7938fb

Browse files
committed
Fixed relative path and URLs
1 parent cdb92c8 commit a7938fb

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

utilities/updater/updateFiles.sh

+14-13
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
## the files in the vulscan folder.
1010
##
1111
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"
2020
)
2121

2222
UPDATED=false
@@ -51,17 +51,18 @@ cd downloading
5151
##
5252
## For each file, we want to download it, and see if it differs from old one.
5353
## 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
5456
##
5557
for file in "${FILES[@]}"
56-
do
57-
58+
do
5859
logIfDebug "Downloading ${file}..."
59-
wget --quiet ${file}
60+
wget --quiet --no-check-certificate ${file}
6061
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)
6263
if [ ${result} -ne 0 ]; then
6364
logIfDebug "Updating ${filename} as it differs"
64-
mv ${filename} ..
65+
mv ${filename} ../../../
6566
UPDATED=true
6667
fi
6768
done

0 commit comments

Comments
 (0)