From 22fe3da8cc64486136fc518b20092731f0746864 Mon Sep 17 00:00:00 2001 From: "Huy Phan (Harry)" Date: Mon, 18 Sep 2023 14:32:48 +1000 Subject: [PATCH] Fix bug of wrong file extension Currently when exporting results to certain file format, let's say `json`, `dirsearch` would use the extension `.{json}` for the output file. For example: ``` dirsearch --format json -u google.com _|. _ _ _ _ _ _|_ v0.4.3 (_||| _) (/_(_|| (_| ) Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25 | Wordlist size: 11714 _23-09-18_14-31-47.json Output: /home/hphan/dirsearch/reports/_google.com/_23-09-18_14-31-47.{json} ``` This change remove the curly brackets around the extension. --- lib/controller/controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index ad1fb47e4..8fe26f459 100755 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -362,7 +362,7 @@ def get_output_extension(self): if options["output_format"] in ("plain", "simple"): return "txt" - return {options["output_format"]} + return options["output_format"] def setup_reports(self): """Create report file"""