Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Oct 11, 2022
1 parent d374041 commit de3ef02
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/log4jcenter/log4j.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package log4jcenter
import (
"crypto/tls"
"fmt"
"io"
"net"
"os"
"strings"
Expand Down Expand Up @@ -176,13 +175,17 @@ func exec_cmd(url, rmiserver, command, version string) (bool, string) {
// resp, err := client.R().
// SetHeaders(myheader).
// Get(url + "/websso/SAML2/SSO/vsphere.local?SAMLRequest=")
if err != nil && err == io.ErrUnexpectedEOF {
//
} else if strings.Contains(err.Error(), "NO_ERROR") {
// if err != nil && err == io.ErrUnexpectedEOF {
// //
// } else if strings.Contains(err.Error(), "NO_ERROR") {
// //
// } else {
// log.Fatal(err)
// // fmt.Println("[-] 连接失败,请检查网络.")
// // os.Exit(0)
// }
if err != nil {
//
} else {
fmt.Println("[-] 连接失败,请检查网络.")
os.Exit(0)
}
if resp.StatusCode() == 200 {
result := resp.String()
Expand All @@ -204,14 +207,15 @@ func Execc(url, rmiserver, command string) {
temp1, temp2 := exec_cmd(url, rmiserver, command, "7")
if temp1 {
fmt.Println(temp2)
break
return
}
temp3, temp4 := exec_cmd(url, rmiserver, command, "6")
if temp3 {
fmt.Println(temp4)
break
return
}
}
fmt.Println("[-] 利用失败或不存在漏洞.")
}

func getIpAddr2(url string) string {
Expand Down

0 comments on commit de3ef02

Please sign in to comment.