Restructure repository: organize tools by purpose, create what search tool
- Move single-file tools to tools/ organized by category (security, forensics, data, etc.) - Move multi-file projects to projects/ (go-tools, puzzlebox, timesketch, rust-tools) - Move system scripts to scripts/ (proxy, display, setup, windows) - Organize config files in config/ (shell, visidata, applications) - Move experimental tools to archive/experimental - Create 'what' fuzzy search tool with progressive enhancement (ollama->fzf->grep) - Add initial metadata database for intelligent tool discovery - Preserve git history using 'git mv' commands
This commit is contained in:
23
tools/forensics/extractfolder.py
Normal file
23
tools/forensics/extractfolder.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
image=sys.argv[1]
|
||||
inode=sys.argv[2]
|
||||
|
||||
|
||||
output = subprocess.check_output(f"fls -F {image} {inode}", shell=True)
|
||||
|
||||
output=output.decode()
|
||||
result = {}
|
||||
for row in output.split('\n'):
|
||||
if ':' in row:
|
||||
key, value = row.split(':')
|
||||
idx = key.split(" ")[-1]
|
||||
fsid = idx.split("-")[0]
|
||||
result[fsid] = value.strip()
|
||||
|
||||
for fsid in result:
|
||||
print(f"Writing Inode {fsid} -> {result[fsid]} ")
|
||||
outfile=open(result[fsid],'w')
|
||||
subprocess.run(["icat", image, fsid],stdout=outfile)
|
||||
|
||||
Reference in New Issue
Block a user