From 2ba488d1e40f032eb50333d3c75f7443753c9bf8 Mon Sep 17 00:00:00 2001 From: Mery-Sanz Date: Fri, 10 Jan 2025 16:10:40 +0000 Subject: [PATCH] add curl tool --- cai/tools/reconnaissance/curl.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cai/tools/reconnaissance/curl.py b/cai/tools/reconnaissance/curl.py index 6ec543af..08928e66 100644 --- a/cai/tools/reconnaissance/curl.py +++ b/cai/tools/reconnaissance/curl.py @@ -1,11 +1,13 @@ -from cai.tools.common import run_command """ Here are the curl tools. """ -def curl(args: str, target: str, ctf=None) -> str: +from cai.tools.common import run_command # pylint: disable=import-error + + +def curl(args: str = "", target: str = "", ctf=None) -> str: """ A simple curl tool to make HTTP requests to a specified target. - + Args: args: Additional arguments to pass to the curl command target: The target URL to request @@ -14,4 +16,4 @@ def curl(args: str, target: str, ctf=None) -> str: str: The output of running the curl command """ command = f'curl {args} {target}' - return run_command(command, ctf=ctf) \ No newline at end of file + return run_command(command, ctf=ctf)