Skip to content

Commit

Permalink
修复一些问题
Browse files Browse the repository at this point in the history
  • Loading branch information
qiwentaidi committed Dec 31, 2024
1 parent 0824435 commit b796c7c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
3 changes: 1 addition & 2 deletions core/portscan/portscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func TcpScan(ctx context.Context, addresses <-chan Address, workers, timeout int
// 如果该IP在1-10端口有开放,后续端口必须识别到服务
return // 如果没有识别到服务,则不返回
}
fmt.Printf("pr.StatusCode: %v\n", pr.StatusCode)
retChan <- pr
}
threadPool, _ := ants.NewPoolWithFunc(workers, func(ipaddr interface{}) {
Expand Down Expand Up @@ -99,7 +98,7 @@ func Connect(ip string, port, timeout int, proxy clients.Proxy) *structs.InfoRes
URL: fmt.Sprintf("%v://%v:%v", response.FingerPrint.Service, ip, port),
}
resp, _, err := clients.NewSimpleGetRequest(result.URL, clients.DefaultClient())
if err != nil && resp != nil {
if err == nil && resp != nil {
result.StatusCode = resp.StatusCode
}
return result
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export async function InitConfigFile(timeout: number) {
catchError(result, loading)
}
}
// 联动
loading.setText('正在初始化资源中...')
const waitRouter = ["/Permeation/Webscan", "/"]
for (const route of waitRouter) {
await sleep(timeout)
router.push(route);
}
loading.close();
}

Expand Down
18 changes: 15 additions & 3 deletions frontend/src/views/Permeation/Webscan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ function stopScan() {
if (!form.runnningStatus) return
form.runnningStatus = false
ExitScanner("[webscan]")
ExitScanner("[portscan]")
ExitScanner("[portbrute]")
ElMessage.warning("任务已停止")
}
Expand Down Expand Up @@ -387,15 +389,18 @@ class Engine {
).map(item => item.URL);
// 对web服务先去提取再去除,之后扫描
updateActivities({
content: "Remove result data and wait fingerprint count: " + this.inputLines.length.toString(),
content: "Extracting and removing webpage activity detection information, totaling: " + this.inputLines.length.toString() + ", followed by fingerprint detection",
timestamp: (new Date()).toTimeString()
})
fp.table.result = fp.table.result.filter(
(line) => line.Scheme !== "http" && line.Scheme !== "https"
);
fp.ctrl.watchResultChange(fp.table)
}
// 每个阶段任务前检查是否为退出状态
if (!form.runnningStatus) {
return
}
// 指纹扫描
let deepScan = false
let callNuclei = false
Expand Down Expand Up @@ -446,6 +451,10 @@ class Engine {
})
form.runnningStatus = false
return
}
// 每个阶段任务前检查是否为退出状态
if (!form.runnningStatus) {
return
}
let crackLinks = fp.table.result.filter(
(line) => crackDict.options.includes(line.Scheme.toLowerCase())
Expand Down Expand Up @@ -483,6 +492,9 @@ class Engine {
timestamp: (new Date()).toTimeString()
})
async.eachLimit(crackLinks, global.webscan.crack_thread, async (target: string, callback: () => void) => {
if (!form.runnningStatus) {
return
}
let protocol = target.split("://")[0]
userDict = crackDict.usernames.find(item => item.name.toLocaleLowerCase() === protocol)?.dic!
Callgologger("info", target + " is start brute")
Expand Down Expand Up @@ -1383,7 +1395,7 @@ function checkDictInput() {
<!-- 联动模块 dialog -->
<el-dialog v-model="spaceEngineConfig.fofaDialog">
<template #header>
<span class="drawer-title"><img src="/app/hunter.ico">导入FOFA目标</span>
<span class="drawer-title"><img src="/app/fofa.ico">导入FOFA目标</span>
</template>
<el-form :model="form" label-width="auto">
<el-form-item label="查询条件">
Expand Down

0 comments on commit b796c7c

Please sign in to comment.