Skip to content

Commit 1983602

Browse files
author
bad
committed
fix: removed help unnecessary text
1 parent 8f5ac8a commit 1983602

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

main.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func main() {
2525
ui.GetBanner()
2626

2727
var opts struct {
28-
Url string `short:"u" long:"url" description:"Definition: Argument used to pass target URL (ex: http://127.0.0.1:8090/javax.faces.resource/dynamiccontent.properties.xhtml)" required:"false"`
28+
Url string `short:"u" long:"url" description:"Definition: Argument used to pass target URL (ex: http://127.0.0.1:8090)" required:"false"`
2929
Cmd string `short:"c" long:"cmd" description:"Definition: Argument used to pass the command" required:"false" default:"whoami"`
3030
Proxy string `short:"p" long:"proxy" description:"Definition: Argument used to pass proxy (SOCKS4, SOCKS4a, SOCKS5 or HTTP)" required:"false"`
3131
}
@@ -56,7 +56,14 @@ func main() {
5656
fmt.Println("[!] the required flag `-u, --url' was not specified")
5757
os.Exit(0)
5858
}
59+
60+
// Check if the last character is a / or not
5961
check_slash := opts.Url[len(opts.Url)-1:]
60-
if check_slash == "/" { exploit.TargetConnect(opts.Url, opts.Cmd, opts.Proxy, false) } else if check_slash != "/" { exploit.TargetConnect(opts.Url + "/", opts.Cmd, opts.Proxy, false) }
62+
if check_slash == "/" {
63+
exploit.TargetConnect(opts.Url, opts.Cmd, opts.Proxy, false)
64+
} else if check_slash != "/" {
65+
exploit.TargetConnect(opts.Url + "/", opts.Cmd, opts.Proxy, false)
66+
}
67+
6168
}
6269
}

0 commit comments

Comments
 (0)