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