• Stars
    star
    201
  • Rank 193,327 (Top 4 %)
  • Language
    Go
  • Created over 2 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

一款用于快速导出URL、Domain和IP的小工具

MoreFind

GitHub Repo stars Go Report Card GitHub go.mod Go version GitHub release (latest SemVer)

一款用于快速导出URL、Domain和IP的魔法小工具

image-20231019140857250

欢迎使用 ⚡

本工具开发崇尚第一原则: 小、简、美

如果有简单的需求可以提交ISSUE,不支持复杂需求,目前该工具已经能满足作者工作常用的大部分操作。

快速安装 ⚡

方式一: 通过Go包管理安装

go install  github.com/mstxq17/MoreFind@latest

方式二: 直接安装二进制文件

wget --no-check-certificate  https://ghproxy.com/https://github.com/mstxq17/MoreFind/releases/download/v1.5.1/MoreFind_v1.5.1_`uname -s`_`uname -m`.tar.gz
tar -xzvf MoreFind_v1.5.1_`uname -s`_`uname -m`.tar.gz
sudo mv ./MoreFind /usr/bin/MoreFind && chmod +x /usr/bin/MoreFind

方式三: 本地编译

git clone https://github.com/mstxq17/MoreFind.git
chmod +x ./build.sh && ./build.sh

方式四:Release 页面已经发布各大系统的二进制执行文件直接下载执行

image-20231019121834019

用法说明 🔥

显示帮助信息

MoreFind -h
MoreFind is a very rapid script for extracting URL、Domain and Ip from data stream

Usage:
  morefind [flags]
  morefind [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  dedu        De-duplicated lines
  diff        File Comparator between two files
  grep        If no grep , use this
  help        Help about any command
  version     Print the semantic version number of MoreFind

Flags:
  -f, --file string                                              Specifies the input file path.
  -o, --output string                                            Specifies the output file path.
  -i, --ip                                                       Matches an IP from the input pipe or file.
      --exclude                                                  Excludes internal/private IP segments when using -i/--ip.
  -d, --domain                                                   Matches a domain from the input pipe or file.
      --root                                                     Outputs only the primary domain when using -d/--domain.
  -p, --port                                                     Filters only domain & IP:port combinations.
  -r, --rule string                                              Filters only domain & IP:port combinations.
      --flag string                                              Specifies the replacement identification. (default "{}")
  -u, --url                                                      Matches URLs from the input pipe or file.
      --filter string[="js,css,json,png,jpg,html,xml,zip,rar"]   Filters URLs with specific extensions.
  -c, --cidr string[="__pipe__"]                                 Outputs the specified CIDR IP list.
  -l, --len string                                               Specifies the length of string, e.g., "-l 35" == "-l 0-35".
  -s, --show                                                     Displays the length of each line and provides summaries.
  -m, --metric                                                   Outputs execution progress metrics.
  -U, --update                                                   Updates the tool engine to the latest released version.
  -h, --help                                                     help for morefind

Use "morefind [command] --help" for more information about a command.

1)导出URL

MoreFind -u
# append --filter(default:js,css,json,png,jpg,html,xml,zip,rar) or --filter="png,jpg,xls,custom..."
# 通过添加参数 --filter(默认排除常见静态文件) 或者 通过 --filter="png,jpg" 自定义需要排除的后缀
MoreFind  -u --filter="png"

2)导出域名

MoreFind -d
# append -root param can only search rootdomain
# 通过加上 --root 参数能够只显示根域名
MoreFind -d --root
# append --port param can retain domain:port format
# 通过加上 --port 参数保留域名:端口的格式,搭配grep
MoreFind -d --root --port

3)导出ip

# 默认会搜索全部ipv4地址
MoreFind -i
# 加上--exclude 排除属于内网的ip, 存在bug,比如localhost, 127.0.0.1 这些回环ip没排除
MoreFind -i --exclude
# 加上 --port 参数保留ip:端口的格式
MoreFind -i --exclude --port 

4)输出统计信息

MoreFind -s

5)筛选指定长度字符串

MoreFind -l 35 
MoreFind -l 0-35

6)解析CIDR生成指定ip列表

MoreFind -c="192.168.0.1/24"
MoreFind -c="192.168.0.1-192.168.2.254"
echo -e "192.168.4.1/24\n192.168.1.1/24"|./MoreFind --cidr

7)支持自定义输出规则

# 最终会将结果替换到 {} 
MoreFind -i --exclude -r "http://{}/"  
  1. 支持输出执行进度,读取大文件的时候让你心里有数 (默认不开启)
MoreFind -f 1.txt -m 
MoreFind -f 1.txt --metric

image-20231023031640316

9)支持检测最新版本并自动更新

MoreFind -U
MoreFind --update

image-20231031085701682

*)支持导出结果

MoreFind -u -d -i -o result.txt

*)联动使用

echo -e 'baidu.com ccccxxxx 1.com'|MoreFind -d |MoreFind -l 5  

命令增强 💥

目前新增三个子命令:

子命令相当于 MoreFind 独立出来的一个子模块,起到补充增强的作用,目前代码结构存在多种可能性,整体处于灰度测试状态

1) 启发式去重

MoreFind dedu -h
# 基础去重
cat baidu.txt| MoreFind dedu 
# 智能去重复,去重相似的,目前只有一个规则
cat baidu.txt| MoreFind dedu --smart 
# -t / --theshold 是相似的阈值当超过指定值就不会进行输出
cat baidu.txt| MoreFind dedu --smart -t 20

image-20231031090513302

2)diff 比较 / 严格比较两个文件的行,支持输出三种结果: 1)A文件有的,B文件没有的行 2)B有A没有的 3)AB都有的

MoreFind diff -h
MoreFind diff 1.txt 2.txt -M 1 
MoreFind diff 1.txt 2.txt -M 2
MoreFind diff 1.txt 2.txt -M 3
# 严格按照顺序逐行比较
MoreFind diff 1.txt 2.txt -M 1 --strict

image-20231031090600695

3)grep 功能,抛弃window的find,实现 OSX/Linux 才有的正则匹配功能,统一使用

MoreFind grep -h
# 正则匹配
cat 1.txt|MoreFind grep "baidu.com"    ==  cat 1.txt|MoreFind grep -P "baidu.com"
# 反选
cat 1.txt|MoreFind grep "baidu.com" -v == cat 1.txt|MoreFind grep -P "baidu.com" -v

image-20231031091824133

使用场景 🔥

假设当前你有这样一个文本文件

baidu.com 127.0.0.2 baidu.com http://baidu.com:9090 http://www.baidu.com:9091
http://baidu.com/hi.jpg?a=1
http://baidu.com/xxx/hi.jpg  http://111.230.198.123:9090 http:/111.230.198.123:9091/
kk.baidu.com
http://x.kk.baidu.com/1.png
http://123.0.0.1/kkk/%2311  safafs
127.0.0.1/kkkk
111.230.198.123/2222/hellophp
111.230.198.123/2222/hello.php
192.168.1.1

如果你想提取里面的URL

# linux/osx
cat 1.txt|MoreFind           
# window
type 1.txt|MoreFind
# 通用
MoreFind -f 1.txt

image-20231019123028213

如果你只想提取域名,MoreFind 会自动去重,如果你想提取根域名

cat 1.txt|MoreFind -d
cat 1.txt|MoreFind -d --root

image-20231019130808020

image-20231019130928736

同理,ip也是可以这样的,有时候不想要内网域名

cat 1.txt|MoreFind -i
cat 1.txt|MoreFind -i --exclude

image-20231019131015426

image-20231019132813381

可能你还想提取带端口的ip和域名

MoreFind  -f 1.txt -d --port
MoreFind  -f 1.txt -i --port
MoreFind  -f 1.txt -d -i --port

image-20231019133102160

image-20231019133117388

image-20231019133133696

你可能想扫描https或者构造一些特殊URL,MoreFind也可以帮你实现

cat 1.txt|MoreFind -d --port -r "https://{}/"
cat 1.txt|MoreFind -d --port -r "https://$/" --flag '$'
cat 1.txt|MoreFind -d --port -r "https://redacted.com/{}/?url={}"

image-20231019133502798

image-20231019133518701

image-20231019133533504

性能方面 🚀

二进制文件大小约6.4M,

在i7 2.8ghz 环境跑完 646423W 条数据所需的时间为51s, 在性能上存在非常多的成长空间,TODO见。

time MoreFind -f ok_domain.txt

image-20231019131641587

Warning

虽然MoreFind 完全满足日常工作使用,但其不适合处理单行过长的文件,后面可能考虑优化,但是这种场景应该有更好的解决方案,我个人不是很愿意集成到MoreFind,不过还是放TODOS。

TODO 条目

  • 输出结果自动去重复
  • 搜索ip的时候支持排除私有IP地址
  • 搜索URL的时候支持排除自定义后缀的URL
  • 增加返回结果形式,支持过滤数据返回域名:port的格式
  • 增加返回结果形式,支持过滤数据返回ip:port的格式
  • 支持搜索域名的时候根据etld+1的形式只显示根域名
  • 读取文件流,输出统计信息,显示每行长度
  • 可指定每行长度筛选出符合条件的字符串
  • 增加命令行中文版本,防止自己的蹩脚英语影响使用
  • 支持生成解析CIDR从而生成指定ip列表
  • 支持自定义输出规则,如原输出123 -> http://{}/ -> 转换输出-> http://123/
  • 排除内网IP功能,增加支持对回环本地IP进行过滤
  • 增加执行状态参数,实时输出程序的执行过程的进度条
  • 完善Log的输出和处理(* 继续需要改进)
  • 加入部分URL智能去重代码
  • 支持优化读取单行超大文本(* 这一块有点问题)
  • 支持简单的grep功能: 正则匹配和反选
  • 支持比较两个文件的每一行并输出3种结果
  • 支持检测最新版本并实现自更新
  • 命令帮助信息规范化,目前默认统一为英文
  • 增强cidr生成IP列表功能,支持输出ip的多种格式
  • 支持命令行控制显示中文/英文的帮助提示
  • 重新设计代码结构,并完善脚本异常处理部分
  • 优化项目代码和提高程序执行速度!!! >>>>>>>>>>>>>>>>>>>>

More Repositories

1

FrpProPlugin

frp0.33修改版,过流量检测,免杀,支持加载远程配置文件可用于cs直接使用的插件
521
star
2

SecurityArticleLogger

分类和整理自己看过的所有文章,方便知识体系的建立和查漏补缺
153
star
3

CVE-2021-1675_RDL_LPE

PrintNightMare LPE提权漏洞的CS 反射加载插件。开箱即用、通过内存加载、混淆加载的驱动名称来ByPass Defender/EDR。
145
star
4

VunHunterTips

漏洞挖掘技巧及其一些工具集成
135
star
5

SeCDictionary

少而精的常用字典,积累各种场景实现字典进化,只追求更简单更有效,不建议star,但建议pr。
PHP
112
star
6

cve-2020-1472

cve-2020-1472 复现利用及其exp
Python
104
star
7

badGuyHacker

一些自己打比赛的捣蛋脚本
Python
51
star
8

MorePing

A cdn detector with high speed! 基于Python 多线程+多协程实现高并发查询API接口进行多地Ping Host来确认IP的真实归属。
Python
24
star
9

dbLeakscan

this scanner try to scan some dbbak or ctf #源码泄露
Python
23
star
10

AssetExploer

以子域名作为基础数据进行分析出关键词,然后基于FoFa、Shodan、Zoomye网络引擎的多维度资产探测脚本
Python
21
star
11

MoreCode

一个常用编码加解密的懒人工具,自动识别,尝试转换所有类型,包括html实体化,base64,base32,32位md5,16位md5,hash,\x,0x等十六进制格式,url编码...
Python
14
star
12

article

sgk
13
star
13

eduSrcToolSet

简单记录自己挖掘教育SRC所用到的工具,方便后期整理结合,应用到eduKing系统的开发
Python
13
star
14

ForwardAPP

Confd+Etcd+Nginx动态反向代理,WEB可视化配置,绕过备案,集成内网穿透模块,docker一键化部署。
HTML
10
star
15

MoreIP

一款基于Python的面向 MacOS/Linux 用户用于查询IP/域名信息的日常渗透小工具
Python
10
star
16

JavaStudyExample

记录自己学习java方向时的一些代码
Java
9
star
17

webPoc

some web exp by python # 收集和编写一些cms的exp 带有攻击性
Python
8
star
18

ctf_web

ctf解题记录
PHP
7
star
19

cryptograph-of-web

crypt
6
star
20

RMIPortScan

基于python的RMI分布式简易端口扫描工具
Python
5
star
21

Snack

java web实训 零食商城系统的开发
JavaScript
4
star
22

MoreEnc

弥补Linux/OSX 原生编码工具不足,MoreEnc 致力于提供多种命令行编码选择
Go
3
star
23

TaskManagePro

ASP.NET 课程设计之任务展示管理系统TaskManagePro
JavaScript
3
star
24

PythonHighStudy

Python高并发学习脚本
Python
2
star
25

blog

my first project
CSS
2
star
26

ctf_misc

misc学习总结
HTML
2
star
27

CodeCheck

PHP
2
star
28

scrapytest

scrapy test for practical coding
CSS
2
star
29

figuredbed

2
star
30

scrapy_item

scrapy框架-扫描器的url收集兵
Python
1
star
31

FrontEndLogger

记录、收集和整理前端功能页面的代码,方便用于快速二次开发
CSS
1
star
32

MoreScripts

自己实验用来锻炼自动化脚本能力的小仓库,请勿star
1
star
33

DrinkeryManageSystem

酒店管理系统JAVA开发实践
Java
1
star
34

mstxq17

1
star