Skip to content

Commit

Permalink
修复参数不能过滤
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiqll committed Feb 22, 2023
1 parent ffdc9c4 commit a6971f8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
Binary file modified Hiseek
Binary file not shown.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@
# 使用子域名 查询(example.com 存档记录太多时,有些记录查不到,可以使用 example.com 的子域名进行搜索)
echo example.com | Hiseek -w dict.txt

# path是否去重 (默认去重,可以设置不需要去重)

echo example.com | Hiseek -disrepeat

# 查询结果导出 子域名、子域名字典
# 生成 sub_domain_example.txt 、dict_example.txt 两个文件

cat example.com | Hiseek -od example.txt

# 联合xray、nuclei 等进行被动扫描
Expand Down
24 changes: 12 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func main() {
| | |__|.-----.-----.-----.| |--.
| | ||__ --| -__| -__|| <
|___|___|__||_____|_____|_____||__|__|
v1.0.9
v1.1.0
Search from "https://web.archive.org/cdx/search/cdx" matching urls containing a specific name
example: Hiseek -d example.com -s jump,proxy ...
Expand All @@ -47,7 +47,7 @@ example: Hiseek -d example.com -s jump,proxy ...
var search string
var exclude string
var world_dict string
var repeat bool
var disrepeat bool
var out_domain_path string
var proxy string
var scan string
Expand All @@ -63,7 +63,7 @@ example: Hiseek -d example.com -s jump,proxy ...
flag.StringVar(&out_domain_path, "o", "", "导出域名字典")
flag.StringVar(&proxy, "proxy", "", "使用代理,网络不通的需要设置代理")
flag.StringVar(&scan, "scan", "", "设置被动扫描器")
flag.BoolVar(&repeat, "re", true, "是否去除重复path (true,false)")
flag.BoolVar(&disrepeat, "disrepeat", false, "是否去除重复path")
flag.BoolVar(&online, "online", false, "检查是否在线 (true,false)")
flag.BoolVar(&silent, "silent", false, "静默状态")

Expand Down Expand Up @@ -119,12 +119,12 @@ example: Hiseek -d example.com -s jump,proxy ...

if online {
if IsOnline(s.Text()) {
search_web_archive(s.Text(), search, exclude, repeat, out_domain_path, silent)
search_web_archive(s.Text(), search, exclude, disrepeat, out_domain_path, silent)
continue
}
}

search_web_archive(s.Text(), search, exclude, repeat, out_domain_path, silent)
search_web_archive(s.Text(), search, exclude, disrepeat, out_domain_path, silent)
}

}
Expand All @@ -149,24 +149,24 @@ example: Hiseek -d example.com -s jump,proxy ...
fmt.Println(sub_domain)
if online{
if IsOnline(sub_domain) {
search_web_archive(sub_domain, search, exclude, repeat, out_domain_path, silent)
search_web_archive(sub_domain, search, exclude, disrepeat, out_domain_path, silent)
continue
}
}

search_web_archive(sub_domain, search, exclude, repeat, out_domain_path, silent)
search_web_archive(sub_domain, search, exclude, disrepeat, out_domain_path, silent)
}

} else {
// 查询是否包含
if online {
if IsOnline(domain) {
search_web_archive(domain, search, exclude, repeat, out_domain_path, silent)
search_web_archive(domain, search, exclude, disrepeat, out_domain_path, silent)
return
}
}

search_web_archive(domain, search, exclude, repeat, out_domain_path, silent)
search_web_archive(domain, search, exclude, disrepeat, out_domain_path, silent)

}

Expand All @@ -177,7 +177,7 @@ example: Hiseek -d example.com -s jump,proxy ...

}

func search_web_archive(domain string, search string, exclude string, repeat bool, out_domain_path string, silent bool) string {
func search_web_archive(domain string, search string, exclude string, disrepeat bool, out_domain_path string, silent bool) string {

// 替换逗号
match_search := strings.Replace(search, ",", ")|(", -1)
Expand Down Expand Up @@ -230,14 +230,14 @@ func search_web_archive(domain string, search string, exclude string, repeat boo
if exclude != "" {
// 排除含有特殊字符的 例如排除 www.domain.com

if is_exclude, _ := regexp.MatchString(exclude_pattern, path); is_exclude {
if is_exclude, _ := regexp.MatchString(exclude_pattern, value); is_exclude {
continue
}

}

// 判断是否去重
if !repeat {
if disrepeat {
if is_scan_proxy {
scan_client.SetTimeout(time.Second * 1).R().Get(value)
}
Expand Down

0 comments on commit a6971f8

Please sign in to comment.