Skip to content

Commit

Permalink
more sql dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
kazet committed Nov 5, 2023
1 parent 2b4da4a commit 0ad0d19
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions artemis/reporting/modules/bruter/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ def is_sql_dump(found_url: FoundURL) -> bool:
if "sql dump" in found_url.content_prefix.lower():
return True

if "\ncreate table" in found_url.content_prefix.lower():
return True
if any([
# strip() to allow lines starting with whitespace
line.strip().startswith("create table") or
line.strip().startswith("alter table") or
line.strip().startswith("insert into")
for line in found_url.content_prefix.lower().split("\n")
]):
return True

return False

Expand Down

0 comments on commit 0ad0d19

Please sign in to comment.