+
Skip to content

Error while testing url with ssl #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,20 @@ Minimalistic performance and load testing tool written in Go.

## How to use gostorm?

- Build or download version for your OS
- Download and install to MacOS

```
curl -L https://github.com/vitalyliber/gostorm/releases/download/v.1.0.1/gostorm_macos -o /usr/local/bin/gostorm
sudo chmod a+x /usr/local/bin/gostorm
```

- Download and install to Linux


```
curl -L https://github.com/vitalyliber/gostorm/releases/download/v.1.0.1/gostorm_linux -o /usr/local/bin/gostorm
sudo chmod a+x /usr/local/bin/gostorm
```

- Run and paste url:
```bash
Expand Down Expand Up @@ -36,4 +49,4 @@ Windows

```bash
GOOS=windows GOARCH=amd64 go build -o gostorm_windows
```
```
18 changes: 13 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,24 @@ func main() {

func storm(url string) {
for {
log.Println("Start attack to url:", url)
log.Println("Start load test on the url:", url)
resp, err := http.Get(url)
if err != nil {
log.Println("Got error code from site:", resp.Status)
log.Println("Got error code from url:", resp.Status)
return
} else {
log.Println("Success attack:", resp.Status)
log.Println("Load test passed successfuly:", resp.Status)
}
defer resp.Body.Close()

defer func() {
err := resp.Body.Close()
if err != nil {
log.Println("Error while closing connection", err)
}
return
}()

counter += 1
log.Println("Number of attack:", counter)
log.Println("Number of successful test:", counter)
}
}
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载