new tools netstat wget -- typo in curl

This commit is contained in:
lidia9 2025-01-10 16:13:09 +00:00
parent 2ba488d1e4
commit 8eb4d90a50
2 changed files with 36 additions and 2 deletions

View File

@ -1 +1,17 @@
#NetworkConnectionstool in exploitFlow
# 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)

View File

@ -1 +1,19 @@
#FileDownloadTool in exploitFlow
#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)