|
|
|
@ -50,11 +50,12 @@ actionban = curl -s -X POST "<_cf_api_url>" \
|
|
|
|
|
# <time> unix timestamp of the ban time
|
|
|
|
|
# Values: CMD
|
|
|
|
|
#
|
|
|
|
|
actionunban = id=$(curl -s -X GET "<_cf_api_url>?mode=<cfmode>¬es=<notes>&configuration.target=<cftarget>&configuration.value=<ip>" \
|
|
|
|
|
<_cf_api_prms> \
|
|
|
|
|
| awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'id'\042/){print $(i+1)}}}' \
|
|
|
|
|
| tr -d ' "' \
|
|
|
|
|
| head -n 1)
|
|
|
|
|
actionunban = id=$(curl -s -X GET "<_cf_api_url>" \
|
|
|
|
|
--data-urlencode "mode=<cfmode>" --data-urlencode "notes=<notes>" --data-urlencode "configuration.target=<cftarget>" --data-urlencode "configuration.value=<ip>" \
|
|
|
|
|
<_cf_api_prms> \
|
|
|
|
|
| awk -F"[,:}]" '{for(i=1;i<=NF;i++){if($i~/'id'\042/){print $(i+1)}}}' \
|
|
|
|
|
| tr -d ' "' \
|
|
|
|
|
| head -n 1)
|
|
|
|
|
if [ -z "$id" ]; then echo "<name>: id for <ip> cannot be found using target <cftarget>"; exit 0; fi; \
|
|
|
|
|
curl -s -X DELETE "<_cf_api_url>/$id" \
|
|
|
|
|
<_cf_api_prms> \
|
|
|
|
|