if rule['type'] == 'ip' then
if rule['cdb'] then
local ip = task:get_from_ip()
- if ip:is_valid() and rule['hash']:lookup(ip) then
+ if ip:is_valid() and rule['hash']:lookup(ip:to_string()) then
task:insert_result(rule['symbol'], 1)
end
else
- local ip = task:get_from_ip():to_number()
- if ip:is_valid() and rule['ips'] and rule['ips']:get_key(ip) then
+ local ip = task:get_from_ip()
+ if ip:is_valid() and rule['ips'] and rule['ips']:get_key(ip:to_number()) then
task:insert_result(rule['symbol'], 1)
end
end