Browse Source

[Fix] Fix matching patterns with no paths

tags/1.7.6
Vsevolod Stakhov 6 years ago
parent
commit
b2c78d1b07
1 changed files with 9 additions and 2 deletions
  1. 9
    2
      src/plugins/lua/phishing.lua

+ 9
- 2
src/plugins/lua/phishing.lua View File

@@ -75,8 +75,12 @@ local function phishing_cb(task)
for _,d in ipairs(elt) do
if not d['path'] then
found_path = true
end

if query and d['query'] and query == d['query'] then
found_query = true
elseif not d['query'] then
found_query = true
break
end
end
end
@@ -101,7 +105,10 @@ local function phishing_cb(task)
task:insert_result(phish_symbol, 1.0, args)
else
-- Host + path match
task:insert_result(phish_symbol, 0.3, args)
if path then
task:insert_result(phish_symbol, 0.3, args)
end
-- No path, no symbol
end
else
if url:is_phished() then

Loading…
Cancel
Save