Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
tags:
- 'v*.*'
#on:
# push:
# branches:
# - 'main' # 修改触发条件为 main 分支的推送
jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 8 additions & 13 deletions cmd/finger.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -20,7 +20,6 @@ import (
"ehole/module/finger/source"
"os"

"github.com/gookit/color"
"github.com/spf13/cobra"
)

Expand All @@ -30,32 +29,26 @@ var fingerCmd = &cobra.Command{
Short: "ehole的指纹识别模块",
Long: `从fofa或者本地文件获取资产进行指纹识别,支持单条url识别。`,
Run: func(cmd *cobra.Command, args []string) {
color.RGBStyleFromString("105,187,92").Println("\n ______ __ ______ \n" +
" / ____/___/ /___ ____/_ __/__ ____ _____ ___ \n" +
" / __/ / __ / __ `/ _ \\/ / / _ \\/ __ `/ __ `__ \\\n" +
" / /___/ /_/ / /_/ / __/ / / __/ /_/ / / / / / /\n" +
" /_____/\\__,_/\\__, /\\___/_/ \\___/\\__,_/_/ /_/ /_/ \n" +
" /____/ https://forum.ywhack.com By:shihuang\n")
if localfile != "" {
urls := removeRepeatedElement(source.LocalFile(localfile))
s := finger.NewScan(urls, thread, output,proxy)
s := finger.NewScan(urls, thread, output, proxy, fingerFile)
s.StartScan()
os.Exit(1)
}
if fofaip != "" {
urls := removeRepeatedElement(source.Fofaip(fofaip))
s := finger.NewScan(urls, thread, output,proxy)
s := finger.NewScan(urls, thread, output, proxy, fingerFile)
s.StartScan()
os.Exit(1)
}
if fofasearche != "" {
urls := removeRepeatedElement(source.Fafaall(fofasearche))
s := finger.NewScan(urls, thread, output,proxy)
s := finger.NewScan(urls, thread, output, proxy, fingerFile)
s.StartScan()
os.Exit(1)
}
if urla != "" {
s := finger.NewScan([]string{urla}, thread, output,proxy)
s := finger.NewScan([]string{urla}, thread, output, proxy, fingerFile)
s.StartScan()
os.Exit(1)
}
Expand All @@ -69,7 +62,8 @@ var (
urla string
thread int
output string
proxy string
proxy string
fingerFile string
)

func init() {
Expand All @@ -81,6 +75,7 @@ func init() {
fingerCmd.Flags().StringVarP(&output, "output", "o", "", "输出所有结果,当前仅支持json和xlsx后缀的文件。")
fingerCmd.Flags().IntVarP(&thread, "thread", "t", 100, "指纹识别线程大小。")
fingerCmd.Flags().StringVarP(&proxy, "proxy", "p", "", "指定访问目标时的代理,支持http代理和socks5,例如:http://127.0.0.1:8080、socks5://127.0.0.1:8080")
fingerCmd.Flags().StringVarP(&fingerFile, "finger", "F", "", "指定指纹文件路径")
}

func removeRepeatedElement(arr []string) (newArr []string) {
Expand Down
Loading