mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-06-02 11:40:24 +00:00
Update Parse.go
This commit is contained in:
parent
d90deb0201
commit
9092b09b16
@ -275,6 +275,16 @@ func parsePorts() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// parseExcludePorts 解析排除端口配置
|
||||
// 更新全局排除端口配置
|
||||
func parseExcludePorts() {
|
||||
if ExcludePorts != "" {
|
||||
LogInfo(GetText("exclude_ports", ExcludePorts))
|
||||
// 确保排除端口被正确设置到全局配置中
|
||||
// 这将由PortScan函数在处理端口时使用
|
||||
}
|
||||
}
|
||||
|
||||
// ReadFileLines 读取文件内容并返回非空行的切片
|
||||
// 通用的文件读取函数,处理文件打开、读取和错误报告
|
||||
func ReadFileLines(filename string) ([]string, error) {
|
||||
@ -321,6 +331,9 @@ func ParseInput(Info *HostInfo) error {
|
||||
// 处理端口配置组合
|
||||
processPortsConfig()
|
||||
|
||||
// 处理排除端口配置
|
||||
parseExcludePorts()
|
||||
|
||||
// 处理额外用户名和密码
|
||||
processExtraCredentials()
|
||||
|
||||
@ -381,6 +394,11 @@ func processPortsConfig() {
|
||||
}
|
||||
LogInfo(GetText("extra_ports", AddPorts))
|
||||
}
|
||||
|
||||
// 确保排除端口配置被记录
|
||||
if ExcludePorts != "" {
|
||||
LogInfo(GetText("exclude_ports_applied", ExcludePorts))
|
||||
}
|
||||
}
|
||||
|
||||
// processExtraCredentials 处理额外的用户名和密码
|
||||
|
Loading…
x
Reference in New Issue
Block a user