diff --git a/cai/tools/reconnaissance/netstat.py b/cai/tools/reconnaissance/netstat.py index 86fd2910..44d7ae09 100644 --- a/cai/tools/reconnaissance/netstat.py +++ b/cai/tools/reconnaissance/netstat.py @@ -1 +1,17 @@ -#NetworkConnectionstool in exploitFlow \ No newline at end of file +# NetworkConnectionstool in exploitFlow +""" +Netstat tool +""" +from cai.tools.common import run_command # pylint: disable=import-error + + +def netstat(args: str = '', ctf=None) -> str: + """ + netstat tool to list all listening ports and their associated programs. + Args: + args: Additional arguments to pass to the netstat command + Returns: + str: The output of running the netstat command + """ + command = f'netstat -tuln {args}' + return run_command(command, ctf=ctf) diff --git a/cai/tools/reconnaissance/wget.py b/cai/tools/reconnaissance/wget.py index 11529ece..b47ada0a 100644 --- a/cai/tools/reconnaissance/wget.py +++ b/cai/tools/reconnaissance/wget.py @@ -1 +1,19 @@ -#FileDownloadTool in exploitFlow \ No newline at end of file +#FileDownloadTool in exploitFlow + +""" +Wget tool +""" +from cai.tools.common import run_command # pylint: disable=import-error + +def wget(url: str, args: str = '', ctf=None) -> str: + """ + Wget tool to download files from the web. + Args: + url: The URL of the file to download + args: Additional arguments to pass to the wget command + + Returns: + str: The output of running the wget command + """ + command = f'wget {args} {url}' + return run_command(command, ctf=ctf) \ No newline at end of file