-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathxmlrpcscan.go
40 lines (32 loc) · 870 Bytes
/
xmlrpcscan.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"flag"
"fmt"
"os"
"github.com/nullfd/xmlrpc-scan/core"
"github.com/nullfd/xmlrpc-scan/utils"
)
func main() {
banner := utils.UglyBanner()
fmt.Println(banner)
target := flag.String("target", "", "[-] (e.g: https://wordpress.site.com)")
server := flag.String("server", "", "[-] (e.g: http://159.89.121.20 or http://mydomain.com")
flag.Parse()
serverUser := *server
targetUser := *target
if serverUser == "" {
fmt.Println("[+] Server is required to test ssrf..")
fmt.Println("./xmlrpcscan -server http://burpcollaborator.net")
os.Exit(1)
}
targetStruct := core.New(targetUser, serverUser)
//verify if data is from stdin
file, _ := os.Stdin.Stat()
if (file.Mode() & os.ModeCharDevice) == 0 {
targetStruct.FromStdin()
} else {
if targetStruct.IsAlive(targetUser) {
targetStruct.VerifyMethods(targetUser)
}
}
}