Skip to content

Commit

Permalink
style: 修复代码 typo
Browse files Browse the repository at this point in the history
修复代码 typo
  • Loading branch information
X1r0z committed Aug 7, 2023
1 parent bd61499 commit 40f4ae1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ usage
```shell
Usage of ./EBurstGo:
-check
检查目标 Exchange 可用接口
检测目标 Exchange 可用接口
-debug
显示 Debug 信息
-delay int
Expand All @@ -49,6 +49,7 @@ check

```shell
$ ./EBurstGo -url https://192.168.30.11 -check
[*] 检测目标 Exchange 可用接口
[+] 存在 owa 接口 (/owa/auth.owa), 可以爆破
[+] 存在 powershell 接口 (/powershell), 可以爆破
[+] 存在 ecp 接口 (/owa/auth.owa), 可以爆破
Expand Down
6 changes: 4 additions & 2 deletions lib/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

func Check(targetUrl string) {

Log.Info("[*] 检测目标 Exchange 可用接口")
for k, v := range ExchangeUrls {
u, _ := url.JoinPath(targetUrl, v)

Expand All @@ -19,14 +20,15 @@ func Check(targetUrl string) {
},
},
}
Log.Debug("[*] 尝试: %v", v)
res, err := client.Get(u)
if err != nil {
panic(err)
}
if res.StatusCode != 404 && res.StatusCode != 403 && res.StatusCode != 301 && res.StatusCode != 302 {
Log.Success("[+] 存在 %s 接口 (%s), 可以爆破", k, v)
Log.Success("[+] 存在 %v 接口 (%v), 可以爆破", k, v)
} else {
Log.Failed("[-] 不存在 %s 接口 (%s)", k, v)
Log.Failed("[-] 不存在 %v 接口 (%v)", k, v)
}
}
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func main() {
)
flag.StringVar(&targetUrl, "url", "", "Exchange 服务器地址")
flag.StringVar(&mode, "mode", "", "指定 Exchange Web 接口")
flag.BoolVar(&check, "check", false, "检查目标 Exchange 可用接口")
flag.BoolVar(&check, "check", false, "检测目标 Exchange 可用接口")
flag.StringVar(&domain, "domain", "", "AD 域名")
flag.StringVar(&user, "user", "", "用户名字典")
flag.StringVar(&pass, "pass", "", "密码字典")
Expand Down

0 comments on commit 40f4ae1

Please sign in to comment.