Skip to content

Commit

Permalink
fix output mimetypes for no-action runs (#2606)
Browse files Browse the repository at this point in the history
Co-authored-by: ammar92 <[email protected]>
Co-authored-by: Jeroen Dekkers <[email protected]>
  • Loading branch information
3 people authored Mar 7, 2024
1 parent 2bfa89b commit d668b4a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions boefjes/boefjes/plugins/kat_wpscan/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@

def run(boefje_meta: BoefjeMeta) -> list[tuple[set, bytes | str]]:
input_ = boefje_meta.arguments["input"]
info_mimetype = {"info/boefje"}

if input_["software"]["name"] != "WordPress" or (
"netloc" not in input_["ooi"] or "name" not in input_["ooi"]["netloc"].dict()
):
return [(set(), "")]
if input_["software"]["name"] != "WordPress":
return [(info_mimetype, "Not wordpress.")]
if "netloc" not in input_["ooi"] or "name" not in input_["ooi"]["netloc"].dict():
return [(info_mimetype, "No hostname available for input OOI.")]

hostname = input_["ooi"]["netloc"]["name"]
path = input_["ooi"]["path"]
scheme = input_["ooi"]["scheme"]

if scheme != "https":
return [(set(), "")]
return [(info_mimetype, "To avoid double findings, we only scan https urls.")]

url = f"{scheme}://{hostname}{path}"

Expand Down

0 comments on commit d668b4a

Please sign in to comment.