Spaces:
Sleeping
Sleeping
Upload main.py
Browse files
main.py
CHANGED
@@ -182,7 +182,7 @@ def heuristic_reasons(feats: dict) -> str:
|
|
182 |
if feats.get("suspicious_tld"): rs.append(f"suspicious TLD: {feats.get('tld')}")
|
183 |
if feats.get("has_at"): rs.append("@ in URL")
|
184 |
if feats.get("has_port"): rs.append("explicit port")
|
185 |
-
if feats.get("len_url", 0) >= 100
|
186 |
if feats.get("query") and len(feats.get("query", "")) >= 40 and feats.get("query_ratio_alnum", 0) > 0.9:
|
187 |
rs.append("long query blob")
|
188 |
return ", ".join(rs) if rs else "no heuristic triggers"
|
|
|
182 |
if feats.get("suspicious_tld"): rs.append(f"suspicious TLD: {feats.get('tld')}")
|
183 |
if feats.get("has_at"): rs.append("@ in URL")
|
184 |
if feats.get("has_port"): rs.append("explicit port")
|
185 |
+
if feats.get("len_url", 0) >= 100: rs.append("very long URL") # ✅ fixed
|
186 |
if feats.get("query") and len(feats.get("query", "")) >= 40 and feats.get("query_ratio_alnum", 0) > 0.9:
|
187 |
rs.append("long query blob")
|
188 |
return ", ".join(rs) if rs else "no heuristic triggers"
|