eg
1.0.0
(正在進行的工作)交互式工具快速搜索和運行備忘單示例。
創建此項目的主要動機是:
該項目的唯一依賴性是Python 3。的確,對於實際運行備忘單示例,必須安裝所涉及的工具,但是由於它有點侵入性,腳本只會以紅色打印綠色和未安裝的工具。
無需安裝任何額外的工具。不過,我建議添加一個別名以更簡單的方式執行它:
alias eg="python3 /path/to/eg/repo/app/eg.py"
通過這樣做,可以運行python3 eg.py keyword的eg keyword 。
$ eg -h
NAME
eg -- Interactive tool to search and run cheat-sheet examples
SYNOPSIS
eg [keyword]
EXAMPLES
# Search for tools related to dns
eg dns
# Directly access nmap examples
eg nmap
# Access the interactive app
eg
將它們添加到app/tools_info.json 。請記住,還向其添加一些關鍵字,以便在通過關鍵字搜索時檢索它們。
示例可能具有參數,在執行時會要求這些參數。使用雙捲髮括號添加參數,例如:
find . -name {{keyword}}
搜索與DNS關鍵字匹配的工具:
$ eg dns
Results for dns:
1) nslookup: Query Internet name servers interactively
2) dig: DNS lookup utility
3) dnsrecon: DNS Enumeration and Scanning Tool
4) dnsmap: DNS Network Mapper
Enter tool index (or enter to go back):
現在,選擇列出其備忘單示例的工具之一:
Enter tool index (or enter to go back): 1
Examples for nslookup:
1 - Query A records
nslookup {{RHOST}}
-------
2 - Query NS records
nslookup -type=ns {{RHOST}}
-------
3 - Query MX records
nslookup -type=mx {{RHOST}}
-------
4 - Query all available DNS records
nslookup -type=any {{RHOST}}
-------
Enter index of the example to run (or enter to go back):
選擇要運行,設置參數並運行的示例:
Enter index of the example to run (or enter to go back): 1
nslookup {{RHOST}}
Please set parameters
RHOST: google.com
$ nslookup google.com
Server: 192.168.1.1
Address: 192.168.1.1#53
Non-authoritative answer:
Name: google.com
Address: 172.217.172.46
按工具名稱搜索時,自動完成工具選擇:
$ eg nmap
Examples for nmap:
1 - Aggressive: Standard scripts, OS and versions detection
nmap -A {{RHOST}}
-------
2 - Scan all 65535 ports
nmap -p- {{RHOST}}
-------
Enter index of the example to run (or enter to go back):
隨意將新的備忘單示例添加到app/tools_info.json中,該示例用作備忘單DB。嘗試保持命令參數名稱一致是鍵,因為參數值被緩存並用作在同一會話中執行其他命令的默認值。
GPL-3.0