|
@@ -74,14 +74,11 @@ curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
|
|
--form "enter=Sign+in" \
|
|
--form "enter=Sign+in" \
|
|
|
--form "name=Admin" \
|
|
--form "name=Admin" \
|
|
|
--form "password=zabbix" \
|
|
--form "password=zabbix" \
|
|
|
- "$zabbixFullpath/index.php"
|
|
|
|
|
|
|
+ "${zabbixFullpath}index.php"
|
|
|
|
|
|
|
|
sid=$(curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
|
sid=$(curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
|
|
- "$zabbixFullpath/conf.import.php" \
|
|
|
|
|
- |grep sid |head -n 1 \
|
|
|
|
|
- |awk -Fsid= '{print $2}' \
|
|
|
|
|
- |awk -F\" '{print $1}' \
|
|
|
|
|
- |cut -c -16 )
|
|
|
|
|
|
|
+ "${zabbixFullpath}/import.php" \
|
|
|
|
|
+ | grep -Po 'name="sid" value="\K([a-z0-9]{16})(?=")' )
|
|
|
|
|
|
|
|
curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
|
curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
|
|
--form "config=1" \
|
|
--form "config=1" \
|
|
@@ -108,7 +105,7 @@ curl -s --cookie cookiejar.txt --cookie-jar cookiejar.txt \
|
|
|
--form "backurl=templates.php" \
|
|
--form "backurl=templates.php" \
|
|
|
--form "form_refresh=1" \
|
|
--form "form_refresh=1" \
|
|
|
--form "sid=${sid}" \ \
|
|
--form "sid=${sid}" \ \
|
|
|
- 'https://$zabbixFullpath/conf.import.php?rules_preset=template'
|
|
|
|
|
|
|
+ 'https://${zabbixFullpath}conf.import.php?rules_preset=template'
|
|
|
|
|
|
|
|
#=================================================
|
|
#=================================================
|
|
|
# Disable default admin for security issue
|
|
# Disable default admin for security issue
|