Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Leeon123 authored Aug 2, 2020
1 parent 68a3552 commit 91cfa42
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions httpflood.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,38 +130,42 @@ func flood(ip, port, page, mode string) {
header += acceptall[rand.Intn(len(acceptall))]
header += referers[rand.Intn(len(referers))] + "\r\n"
} else {
fi, err := os.Open(os.Args[7])
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
defer fi.Close()
br := bufio.NewReader(fi)
for {
a, _, c := br.ReadLine()
if c == io.EOF {
break
func() {
fi, err := os.Open(os.Args[7])
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
header += string(a) + "\r\n"
}
defer fi.Close()
br := bufio.NewReader(fi)
for {
a, _, c := br.ReadLine()
if c == io.EOF {
break
}
header += string(a) + "\r\n"
}
}()
}
} else if mode == "post" {
data := ""
if os.Args[7] != "nil" {
fi, err := os.Open(os.Args[7])
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
defer fi.Close()
br := bufio.NewReader(fi)
for {
a, _, c := br.ReadLine()
if c == io.EOF {
break
func() {
fi, err := os.Open(os.Args[7])
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
data += string(a) + "\r\n"
}
defer fi.Close()
br := bufio.NewReader(fi)
for {
a, _, c := br.ReadLine()
if c == io.EOF {
break
}
header += string(a) + "\r\n"
}
}()

} else {
for x := 0; x > 100; x++ {
Expand Down

0 comments on commit 91cfa42

Please # to comment.