(進行中の作業)チートシートの例をすばやく検索して実行するインタラクティブツール。
このプロジェクトを作成する主な動機は次のとおりです。
このプロジェクトの唯一の依存関係はPython 3です。実際にチートシートの例を実行するには、関係するツールをインストールする必要があることは事実ですが、少し邪魔すぎるため、スクリプトは緑と非インストールされたツールにインストールされたツールを赤で印刷するだけです。
追加のツールをインストールする必要はありません。ただし、エイリアスを追加してより簡単な方法でエイリアスを追加することをお勧めします。
alias eg="python3 /path/to/eg/repo/app/eg.py"
これを行うことにより、 python3 eg.py keywordのeg keyword Instedを実行することができます。
$ 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):
チートシートDBとして機能するapp/tools_info.jsonに新しいチートシートの例を自由に追加してください。パラメーター値がキャッシュされ、同じセッション中に他のコマンドを実行するためにデフォルトとして使用されるため、コマンドパラメーター名を一貫性のあるものにしようとすることは重要です。
GPL-3.0