Skip to content

Commit

Permalink
Using static extensions from core, not a statically-defined list (#124)
Browse files Browse the repository at this point in the history
* Using static extensions from core, not a statically-defined list

* .
  • Loading branch information
kazet authored Sep 30, 2024
1 parent 37cab43 commit 374cb3b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions karton_sqlmap/karton_sqlmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from artemis.binds import Service, TaskStatus, TaskType
from artemis.config import Config
from artemis.module_base import ArtemisBase
from artemis.modules.data.static_extensions import STATIC_EXTENSIONS
from artemis.task_utils import get_target_url
from bs4 import BeautifulSoup
from karton.core import Task
Expand Down Expand Up @@ -301,10 +302,7 @@ def run(self, current_task: Task) -> None:

new_url = new_url.split("#")[0]

if any(
new_url.split("?")[0].lower().endswith(extension)
for extension in [".png", ".jpg", ".svg", ".jpeg", ".css", ".js", ".ico", ".woff2"]
):
if any(new_url.split("?")[0].lower().endswith(extension) for extension in STATIC_EXTENSIONS):
# Let's not inject image/style paths
continue

Expand Down

0 comments on commit 374cb3b

Please sign in to comment.