支持-u url或者-uf url.txt,进行url批量扫描

This commit is contained in:
shadow1ng
2021-03-04 14:42:10 +08:00
parent 423c0bebea
commit 5e7def5085
16 changed files with 65 additions and 26 deletions
+4 -4
View File
@@ -37,7 +37,7 @@ func CheckMultiPoc(req *http.Request, Pocs embed.FS, workers int, pocname string
continue
}
if isVul {
result := fmt.Sprintf("%s %s", task.Req.URL, task.Poc.Name)
result := fmt.Sprintf("[+] %s %s", task.Req.URL, task.Poc.Name)
common.LogSuccess(result)
}
}
@@ -183,6 +183,7 @@ func executePoc(oReq *http.Request, p *Poc) (bool, error) {
for k, v := range rule.Headers {
newRequest.Header.Set(k, v)
}
resp, err := DoRequest(newRequest, rule.FollowRedirects)
if err != nil {
return false, err
@@ -200,7 +201,6 @@ func executePoc(oReq *http.Request, p *Poc) (bool, error) {
return false, nil
}
}
out, err := Evaluate(env, rule.Expression, variableMap)
if err != nil {
return false, err
@@ -486,8 +486,8 @@ func clusterpoc1(oReq *http.Request, p *Poc, variableMap map[string]interface{},
if len(varset) == 2 {
look2:
// (var1 tomcat ,keys[0] username)
for _, var1 := range p.Sets[varset[0]] {
for _, var2 := range p.Sets[varset[1]] {
for _, var1 := range p.Sets[varset[0]] { //username
for _, var2 := range p.Sets[varset[1]] { //password
setMap := cloneMap1(setMapbak)
setMap[varset[0]] = var1
setMap[varset[1]] = var2
+3 -1
View File
@@ -37,6 +37,9 @@ func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) err
DisableKeepAlives: false,
}
if DownProxy != "" {
if DownProxy == "1" {
DownProxy = "http://127.0.0.1:8080"
}
u, err := url.Parse(DownProxy)
if err != nil {
return err
@@ -144,7 +147,6 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
if err != nil {
return nil, err
}
defer gr.Close()
for {
buf := make([]byte, 1024)
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth1
rules:
- method: GET
path: /swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth2
rules:
- method: GET
path: /api/swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth3
rules:
- method: GET
path: /service/swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth4
rules:
- method: GET
path: /web/swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth5
rules:
- method: GET
path: /swagger/swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth6
rules:
- method: GET
path: /actuator/swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui-unauth7
rules:
- method: GET
path: /libs/swagger-ui.html
+1 -1
View File
@@ -1,4 +1,4 @@
name: poc-yaml-druid-monitor-unauth
name: poc-yaml-swagger-ui8
rules:
- method: GET
path: /template/swagger-ui.html
+1 -1
View File
@@ -4,7 +4,7 @@ rules:
path: /console/images/%252E./console.portal
follow_redirects: false
expression: |
response.status == 302 && (response.body.bcontains(bytes("/console/console.portal")) || response.body.bcontains(bytes("/console/jsp/common/NoJMX.jsp")))
(response.status == 302 && response.body.bcontains(bytes("/console/console.portal")) || response.body.bcontains(bytes("/console.portal?_nfpb=true")))
detail:
author: canc3s(https://github.com/canc3s),Soveless(https://github.com/Soveless)
weblogic_version: 10.3.6.0.0, 12.1.3.0.0, 12.2.1.3.0, 12.2.1.4.0, 14.1.1.0.0