Skip to content

Instantly share code, notes, and snippets.

@mpfund
Created July 14, 2014 08:28
Show Gist options
  • Save mpfund/5935566bd92f1d24f34f to your computer and use it in GitHub Desktop.
Save mpfund/5935566bd92f1d24f34f to your computer and use it in GitHub Desktop.
extremly simple fuzzer for http
package main
import "fmt"
import "net"
import "bufio"
import "io/ioutil"
import "time"
import "bytes"
import "strings"
func main() {
fmt.Println(time.Now())
for k:=30;k<50;k++{
conn, err := net.Dial("tcp", "biteron.com:8080")
if err != nil {
fmt.Println(err)
}
sendto := []byte("GET /")
sendto = append(sendto,bytes.Repeat([]byte{0x00+byte(k)},10000)...);
sendto = append(sendto,[]byte("P/1.0\r\n\r\n")...)
conn.Write(sendto)
status, err := ioutil.ReadAll(bufio.NewReader(conn))
//fmt.Println(string(status))
if strings.Contains(string(status),"HTTP/1.0 200"){
fmt.Println("ok " + string(byte(k)))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment