fscan/main.go
ZacharyZcR b60a2af424 feat: 添加SOCKS5代理本地插件
- 实现完整的SOCKS5协议支持,包括握手和连接请求处理
- 支持IPv4/IPv6地址和域名解析
- 添加-socks5-port命令行参数用于指定代理端口
- 实现双向数据转发和并发连接处理
- 集成主程序生命周期管理,避免代理运行时程序退出
- 支持跨平台运行(Windows/Linux/macOS)
- 通过curl测试验证代理功能正常
2025-08-10 10:25:51 +08:00

40 lines
932 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package main
import (
"fmt"
"os"
"github.com/shadow1ng/fscan/common"
"github.com/shadow1ng/fscan/core"
// 引入本地插件以触发注册
_ "github.com/shadow1ng/fscan/plugins/local/fileinfo"
_ "github.com/shadow1ng/fscan/plugins/local/dcinfo"
_ "github.com/shadow1ng/fscan/plugins/local/minidump"
_ "github.com/shadow1ng/fscan/plugins/local/reverseshell"
_ "github.com/shadow1ng/fscan/plugins/local/socks5proxy"
)
func main() {
var Info common.HostInfo
common.Flag(&Info)
// 在flag解析后初始化logger确保LogLevel参数生效
common.InitLogger()
// 解析 CLI 参数
if err := common.Parse(&Info); err != nil {
os.Exit(1)
}
// 初始化输出系统,如果失败则直接退出
if err := common.InitOutput(); err != nil {
common.LogError(fmt.Sprintf("初始化输出系统失败: %v", err))
os.Exit(1)
}
defer common.CloseOutput()
// 执行 CLI 扫描逻辑
core.RunScan(Info)
}