File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -8,13 +8,17 @@ if [ ! "$userid" = "0" ]; then
88 exit 9
99fi
1010
11- if [ ! -f /etc/dshield.ini ]; then
12- echo " missing /etc/dshield.ini file"
11+ if [ ! -f /srv/dshield/ etc/dshield.ini ]; then
12+ echo " missing /srv/dshield/ etc/dshield.ini file"
1313 exit 9
1414fi
1515honeypotip=$( curl -s https://www4.dshield.org/api/myip? json | jq .ip | tr -d ' "' )
1616if echo -n $honeypotip | egrep -q ' ^[0-9\.]+$' ; then
17- sed -i " s/^honeypotip=.*/honeypotip=$honeypotip /" /etc/dshield.ini
17+ sed -i " s/^honeypotip=.*/honeypotip=$honeypotip /" /srv/dshield/etc/dshield.ini
18+ if ! grep -q ' ^piid=' dshield.ini; then
19+ piid=$( openssl rand -hex 10)
20+ sed -i " ^apikey/a piid=$piid " /srv/dshield/etc/dshield.ini
21+ fi
1822else
1923 echo " Bad IP address"
2024 exit 9
You can’t perform that action at this time.
0 commit comments