Created
February 9, 2015 04:04
-
-
Save ymotongpoo/1f008c4588610ceb4e6a to your computer and use it in GitHub Desktop.
X-Shiumachi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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