mirror of https://github.com/aliasrobotics/cai.git
add string extraction tool
- Added StringExtractionTool using the 'strings' command to extract printable strings from binary files - Updated the commented tool list to remove StringExtractionTool from the deprecated section - All new tools leverage the existing generic_linux_command security infrastructure - The string_extraction tool provides specialized filesystem reconnaissance capabilities for analyzing binary files
This commit is contained in:
parent
8b03c4b361
commit
d8303b2e98
|
|
@ -88,11 +88,25 @@ def file_permissions(file_path: str, args: str = "", ctf=None) -> str:
|
||||||
command = f'ls -la {args} "{file_path}"'
|
command = f'ls -la {args} "{file_path}"'
|
||||||
return run_command(command, ctf=ctf)
|
return run_command(command, ctf=ctf)
|
||||||
|
|
||||||
|
@function_tool
|
||||||
|
def string_extraction(file_path: str, args: str = "", ctf=None) -> str:
|
||||||
|
"""
|
||||||
|
Extract printable strings from a file.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
file_path: Path to the file to extract strings from
|
||||||
|
args: Additional arguments to pass to the strings command
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: The output of running the strings command
|
||||||
|
"""
|
||||||
|
command = f'strings {args} "{file_path}"'
|
||||||
|
return run_command(command, ctf=ctf)
|
||||||
|
|
||||||
# FileSearchTool
|
# FileSearchTool
|
||||||
# ListDirTool
|
# ListDirTool
|
||||||
# TextSearchTool
|
# TextSearchTool
|
||||||
# FileAnalysisTool
|
# FileAnalysisTool
|
||||||
# StringExtractionTool
|
|
||||||
# ReadFileTool
|
# ReadFileTool
|
||||||
# FilePermissionsTool
|
# FilePermissionsTool
|
||||||
# FileCompressionTool
|
# FileCompressionTool
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue