mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-13 21:02:44 +08:00
fix: Web扫描的Bug
This commit is contained in:
parent
46e0472ec1
commit
18aae783c6
@ -40,7 +40,7 @@ var PluginGroups = map[string][]string{
|
|||||||
"ms17010", "smbghost", "smb2",
|
"ms17010", "smbghost", "smb2",
|
||||||
},
|
},
|
||||||
ModeLocal: {
|
ModeLocal: {
|
||||||
"localinfo",
|
"localinfo", "minidump", "dcinfo",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1100,7 +1100,7 @@ var i18nMap = map[string]map[string]string{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 当前语言设置
|
// 当前语言设置
|
||||||
var currentLang = LangJA
|
var currentLang = LangZH
|
||||||
|
|
||||||
func SetLanguage() {
|
func SetLanguage() {
|
||||||
// 使用flag设置的语言
|
// 使用flag设置的语言
|
||||||
|
@ -35,9 +35,11 @@ func Scan(info Common.HostInfo) {
|
|||||||
switch {
|
switch {
|
||||||
case Common.LocalMode:
|
case Common.LocalMode:
|
||||||
// 本地信息收集模式
|
// 本地信息收集模式
|
||||||
|
LocalScan = true
|
||||||
executeLocalScan(info, &ch, &wg)
|
executeLocalScan(info, &ch, &wg)
|
||||||
case len(Common.URLs) > 0:
|
case len(Common.URLs) > 0:
|
||||||
// Web扫描模式
|
// Web扫描模式
|
||||||
|
WebScan = true
|
||||||
executeWebScan(info, &ch, &wg)
|
executeWebScan(info, &ch, &wg)
|
||||||
default:
|
default:
|
||||||
// 主机扫描模式
|
// 主机扫描模式
|
||||||
@ -67,6 +69,7 @@ func executeLocalScan(info Common.HostInfo, ch *chan struct{}, wg *sync.WaitGrou
|
|||||||
// 输出使用的插件信息
|
// 输出使用的插件信息
|
||||||
if Common.ScanMode == Common.ModeLocal {
|
if Common.ScanMode == Common.ModeLocal {
|
||||||
Common.LogInfo("使用全部本地插件")
|
Common.LogInfo("使用全部本地插件")
|
||||||
|
Common.ParseScanMode(Common.ScanMode)
|
||||||
} else {
|
} else {
|
||||||
Common.LogInfo(fmt.Sprintf("使用插件: %s", Common.ScanMode))
|
Common.LogInfo(fmt.Sprintf("使用插件: %s", Common.ScanMode))
|
||||||
}
|
}
|
||||||
@ -106,6 +109,7 @@ func executeWebScan(info Common.HostInfo, ch *chan struct{}, wg *sync.WaitGroup)
|
|||||||
// 输出使用的插件信息
|
// 输出使用的插件信息
|
||||||
if Common.ScanMode == Common.ModeWeb {
|
if Common.ScanMode == Common.ModeWeb {
|
||||||
Common.LogInfo("使用全部Web插件")
|
Common.LogInfo("使用全部Web插件")
|
||||||
|
Common.ParseScanMode(Common.ScanMode)
|
||||||
} else {
|
} else {
|
||||||
Common.LogInfo(fmt.Sprintf("使用插件: %s", Common.ScanMode))
|
Common.LogInfo(fmt.Sprintf("使用插件: %s", Common.ScanMode))
|
||||||
}
|
}
|
||||||
@ -292,7 +296,6 @@ func executeScans(targets []Common.HostInfo, ch *chan struct{}, wg *sync.WaitGro
|
|||||||
if !exists {
|
if !exists {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
taskAdded, newTasks := collectScanTasks(plugin, target, targetPort, pluginName, isSinglePlugin)
|
taskAdded, newTasks := collectScanTasks(plugin, target, targetPort, pluginName, isSinglePlugin)
|
||||||
if taskAdded {
|
if taskAdded {
|
||||||
actualTasks += len(newTasks)
|
actualTasks += len(newTasks)
|
||||||
|
Loading…
Reference in New Issue
Block a user