是否有任何檔案內容搜尋工具可以在查看 JAR 檔案之前對其進行解壓縮?

是否有任何檔案內容搜尋工具可以在查看 JAR 檔案之前對其進行解壓縮?

我使用 Agent Ransack 來 grep 整個目錄。但在查看 JAR 檔案之前它不會解壓縮它們,有沒有任何工具可以做到這一點?

答案1

嘗試使用unzip

unzip -p your_file.jar | grep "your_search"

man頁面:

-p     extract files to pipe (stdout).  Nothing but the file data is sent to
       stdout, and the files are always extracted in binary format, just as
       they are stored (no conversions).

相關內容