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:
Giveen 2025-12-14 13:38:45 -07:00 committed by GitHub
parent 8b03c4b361
commit d8303b2e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 1 deletions

View File

@ -88,11 +88,25 @@ def file_permissions(file_path: str, args: str = "", ctf=None) -> str:
command = f'ls -la {args} "{file_path}"'
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
# ListDirTool
# TextSearchTool
# FileAnalysisTool
# StringExtractionTool
# ReadFileTool
# FilePermissionsTool
# FileCompressionTool