Update report_to_abuseipdb
This commit is contained in:
parent
74d9f84df7
commit
b51a3099d7
1 changed files with 2 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ is_local_ip() {
|
|||
}
|
||||
|
||||
report_to_abuseipdb() {
|
||||
local ip="$1" categories="$2" proto="$3" spt="$4" dpt="$5" ttl="$6" len="$7" tos="$8" warsaw_time="$9"
|
||||
local ip="$1" categories="$2" proto="$3" spt="$4" dpt="$5" ttl="$6" len="$7" tos="$8" timestamp="$9"
|
||||
|
||||
local comment="Blocked by UFW ($proto on port $dpt).
|
||||
Source port: $spt"
|
||||
|
|
@ -87,7 +87,6 @@ Packet length: $len"
|
|||
TOS: $tos"
|
||||
|
||||
comment+="
|
||||
Timestamp: $warsaw_time [Europe/Warsaw]
|
||||
|
||||
This report (for $ip) was generated by:
|
||||
https://github.com/sefinek24/UFW-AbuseIPDB-Reporter" # Please do not remove the URL to the repository of this script. I would be really grateful. 💙
|
||||
|
|
@ -197,10 +196,9 @@ process_log_line() {
|
|||
fi
|
||||
|
||||
categories=$(determine_categories "$proto" "$dpt")
|
||||
warsaw_time=$(TZ="Europe/Warsaw" date -d "$timestamp" '+%Y-%m-%d %H:%M:%S')
|
||||
|
||||
log "INFO" "Reporting IP $src_ip ($proto $dpt) with categories $categories..."
|
||||
if report_to_abuseipdb "$src_ip" "$categories" "$proto" "$spt" "$dpt" "$ttl" "$len" "$tos" "$warsaw_time"; then
|
||||
if report_to_abuseipdb "$src_ip" "$categories" "$proto" "$spt" "$dpt" "$ttl" "$len" "$tos" "$timestamp"; then
|
||||
mark_ip_as_reported "$src_ip"
|
||||
save_reported_ips
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue