Skip to content

Instantly share code, notes, and snippets.

@ymotongpoo
Created February 9, 2015 04:04
Show Gist options
  • Save ymotongpoo/1f008c4588610ceb4e6a to your computer and use it in GitHub Desktop.
Save ymotongpoo/1f008c4588610ceb4e6a to your computer and use it in GitHub Desktop.
X-Shiumachi
package main
import (
"log"
"net/http"
"time"
)
const (
TargetURL = `http://www.cloudera.co.jp/shiumachi`
UserAgent = `Shachiku/1.0`
DoSInterval = 100 * time.Millisecond
)
func main() {
req, err := http.NewRequest("GET", TargetURL, nil)
if err != nil {
panic(err)
}
req.Header.Set("User-Agent", UserAgent)
req.Header.Set("X-Shiumachi", "ʕ ◔ϖ◔ʔ Go~")
interval := time.Tick(DoSInterval)
for range interval {
if _, err := http.DefaultClient.Do(req); err != nil {
log.Println(err)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment