From 7c6aca7abc5dba6d1db7a8c6c1ddb1b3e859d256 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 12:09:51 +0000 Subject: [PATCH 01/25] chore(deps): bump golang from 1.17.6-alpine to 1.17.7-alpine Bumps golang from 1.17.6-alpine to 1.17.7-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 60fcebb..99bfee3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.6-alpine as build-env +FROM golang:1.17.7-alpine as build-env RUN GO111MODULE=on go get -v github.com/projectdiscovery/chaos-client/cmd/chaos FROM alpine:latest From ac2b0bf908a043200986ff396e7cd307ca896b35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 12:07:32 +0000 Subject: [PATCH 02/25] chore(deps): bump golangci/golangci-lint-action from 2 to 3.1.0 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.1.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3.1.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index b777b2d..f7b926f 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3.1.0 with: version: latest args: --timeout 5m From ea8731c115e713163e59e4f6c55a27e9972f0518 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 12:06:46 +0000 Subject: [PATCH 03/25] chore(deps): bump actions/checkout from 2 to 3 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-test.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/dockerhub-push.yml | 2 +- .github/workflows/lint-test.yml | 2 +- .github/workflows/release-binary.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index eababe2..25e5503 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -11,7 +11,7 @@ jobs: name: Test Builds runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-go@v2 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 545cdea..601d89a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 33fd6c4..213374f 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Get Github tag id: meta diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index f7b926f..031c95c 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run golangci-lint uses: golangci/golangci-lint-action@v3.1.0 diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index a86411a..9f4a02f 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -10,7 +10,7 @@ jobs: if: ${{ startsWith(github.ref, 'refs/tags/v') }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-go@v2 with: From 353e567b539e35c122c73181a8c90b25a4b84001 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 12:28:06 +0000 Subject: [PATCH 04/25] chore(deps): bump golang from 1.17.7-alpine to 1.18.0-alpine Bumps golang from 1.17.7-alpine to 1.18.0-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 99bfee3..9afa832 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.7-alpine as build-env +FROM golang:1.18.0-alpine as build-env RUN GO111MODULE=on go get -v github.com/projectdiscovery/chaos-client/cmd/chaos FROM alpine:latest From 1ae2c221b686a6b54fc47bd98ea863e8924f35b8 Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:35:18 +0300 Subject: [PATCH 05/25] chore: GitHub action version updates --- .github/workflows/build-test.yml | 2 +- .github/workflows/release-binary.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 25e5503..1281c3a 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: 1.17 diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 9f4a02f..d9e7a27 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -12,9 +12,9 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: - go-version: 1.17 + go-version: 1.18 - uses: goreleaser/goreleaser-action@v2 with: From 79c009f2f90382e06df6e6c19211e2583d0d5b92 Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:35:54 +0300 Subject: [PATCH 06/25] chore: Dockerfile go version update to 1.18 and replaced "go get" with "go install" --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9afa832..ad51d73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM golang:1.18.0-alpine as build-env -RUN GO111MODULE=on go get -v github.com/projectdiscovery/chaos-client/cmd/chaos +RUN go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest FROM alpine:latest RUN apk add --no-cache bind-tools ca-certificates From df8c3f60545c8f0a7bf60b4f11c9a0db0eb4a85d Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:36:17 +0300 Subject: [PATCH 07/25] chore: go.mod version update to 1.17 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 6f01b5f..f8c7572 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/projectdiscovery/chaos-client -go 1.14 +go 1.17 require ( github.com/json-iterator/go v1.1.12 From f537ece56909bf139613fe753d1c295223ddbe0f Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:38:24 +0300 Subject: [PATCH 08/25] documentation: minor readme updates --- README.md | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 34dae2f..d708a40 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +

+Chaos Client +

+

Go client to communicate with Chaos dataset API.

+

@@ -8,10 +13,6 @@

-# Chaos Client - -Go client to communicate with Chaos dataset API. - ## Installation ```bash @@ -26,25 +27,25 @@ chaos -h This will display help for the tool. Here are all the switches it supports. -| Flag | Description | Example | -| ------------------------ | ---------------------------------------- | -------------------------------------------------------- | -| -d | Domain to find subdomains for | chaos -d uber.com | -| -count | Show statistics for the specified domain | chaos -d uber.com -count | -| -o | File to write output to (optional) | chaos -d uber.com -o uber.txt | -| -json | Print output as json | chaos -d uber.com -json | -| -key | Chaos key for API | chaos -key API_KEY | -| -dL | File with list of domains (optional) | chaos -dL domains.txt | -| -dns-record-type | Filter by dns record type | chaos -bbq -d uber.com -dns-record-type cname | -| -dns-status-code | Filter by dns status code | chaos -bbq -d uber.com -dns-status-code noerror | -| -filter-wildcard | Filter DNS wildcards | chaos -bbq -d uber.com -filter-wildcard | -| -http-url | Print URL of the subdomains | chaos -bbq -d uber.com -http-url | -| -http-title | Print title of the URL | chaos -bbq -d uber.com -http-title | -| -http-status-code | Print http status code | chaos -bbq -d uber.com -http-status-code | -| -http-status-code-filter | Filter http status code | chaos -bbq -d uber.com -http-status-code-filter 200 | -| -resp | Print DNS record with response | chaos -bbq -d uber.com -resp | -| -resp-only | Print the response of DNS record | chaos -bbq -d uber.com -dns-record-type cname -resp-only | -| -silent | Make the output silent | chaos -d uber.com -silent | -| -version | Print current version of chaos client | chaos -version | +| Flag | Description | Example | +|----------------------------|------------------------------------------|------------------------------------------------------------| +| `-d` | Domain to find subdomains for | `chaos -d uber.com` | +| `-count` | Show statistics for the specified domain | `chaos -d uber.com -count` | +| `-o` | File to write output to (optional) | `chaos -d uber.com -o uber.txt` | +| `-json` | Print output as json | `chaos -d uber.com -json` | +| `-key` | Chaos key for API | `chaos -key API_KEY` | +| `-dL` | File with list of domains (optional) | `chaos -dL domains.txt` | +| `-dns-record-type` | Filter by dns record type | `chaos -bbq -d uber.com -dns-record-type cname` | +| `-dns-status-code` | Filter by dns status code | `chaos -bbq -d uber.com -dns-status-code noerror` | +| `-filter-wildcard` | Filter DNS wildcards | `chaos -bbq -d uber.com -filter-wildcard` | +| `-http-url` | Print URL of the subdomains | `chaos -bbq -d uber.com -http-url` | +| `-http-title` | Print title of the URL | `chaos -bbq -d uber.com -http-title` | +| `-http-status-code` | Print http status code | `chaos -bbq -d uber.com -http-status-code` | +| `-http-status-code-filter` | Filter http status code | `chaos -bbq -d uber.com -http-status-code-filter 200` | +| `-resp` | Print DNS record with response | `chaos -bbq -d uber.com -resp` | +| `-resp-only` | Print the response of DNS record | `chaos -bbq -d uber.com -dns-record-type cname -resp-only` | +| `-silent` | Make the output silent | `chaos -d uber.com -silent` | +| `-version` | Print current version of chaos client | `chaos -version` | You can also set the API key as environment variable in your bash profile. From 6091bf71a550a659f55ab676bcf725a7370e4d01 Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Thu, 14 Apr 2022 15:40:53 +0300 Subject: [PATCH 09/25] chore: go mod tidy --- go.mod | 8 ++++++++ go.sum | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f8c7572..97c1ec7 100644 --- a/go.mod +++ b/go.mod @@ -9,3 +9,11 @@ require ( github.com/projectdiscovery/httputil v0.0.0-20210906072657-f3a099cb20bc github.com/projectdiscovery/retryablehttp-go v1.0.2 ) + +require ( + github.com/logrusorgru/aurora v2.0.3+incompatible // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + golang.org/x/net v0.0.0-20210521195947-fe42d452be8f // indirect + golang.org/x/text v0.3.6 // indirect +) diff --git a/go.sum b/go.sum index 492a018..b85951b 100644 --- a/go.sum +++ b/go.sum @@ -6,11 +6,9 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= @@ -45,7 +43,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= From 01c12556008185d54a119ac138ef5539bd4bac5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 12:13:02 +0000 Subject: [PATCH 10/25] chore(deps): bump golang from 1.18.0-alpine to 1.18.1-alpine Bumps golang from 1.18.0-alpine to 1.18.1-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ad51d73..5ead95b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.0-alpine as build-env +FROM golang:1.18.1-alpine as build-env RUN go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest FROM alpine:latest From d5af9eab26d19d49716c47d9308484f18dd710d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 May 2022 12:08:22 +0000 Subject: [PATCH 11/25] chore(deps): bump github/codeql-action from 1 to 2 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v1...v2) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 601d89a..9f533f8 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -27,12 +27,12 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 \ No newline at end of file + uses: github/codeql-action/analyze@v2 \ No newline at end of file From 1d4dd2eef16c6e841a81a2e4a4fd43eb1c4115b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 12:06:58 +0000 Subject: [PATCH 12/25] chore(deps): bump docker/build-push-action from 2 to 3 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dockerhub-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 213374f..8a29200 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -32,7 +32,7 @@ jobs: password: ${{ secrets.DOCKER_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64,linux/arm From 57f2baa7325d1a633b26b8fb22f8e37628369fc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 12:07:00 +0000 Subject: [PATCH 13/25] chore(deps): bump docker/setup-buildx-action from 1 to 2 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dockerhub-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 213374f..97569ef 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -23,7 +23,7 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub uses: docker/login-action@v1 From 975639acf107baf5f3a328d1dcad4d3b62e1f14b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 12:07:03 +0000 Subject: [PATCH 14/25] chore(deps): bump docker/login-action from 1 to 2 Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dockerhub-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 213374f..29b21d6 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -26,7 +26,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} From 9f47aeed2df2e824661e823b60a88e76dc87d1cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 12:07:05 +0000 Subject: [PATCH 15/25] chore(deps): bump docker/setup-qemu-action from 1 to 2 Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dockerhub-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub-push.yml b/.github/workflows/dockerhub-push.yml index 213374f..864be6b 100644 --- a/.github/workflows/dockerhub-push.yml +++ b/.github/workflows/dockerhub-push.yml @@ -20,7 +20,7 @@ jobs: echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/projectdiscovery/chaos-client/releases/latest" | jq -r .tag_name)" - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 From a68bbebe43f5d3d158a7f1e2be3613bdf62fe010 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 May 2022 12:07:23 +0000 Subject: [PATCH 16/25] chore(deps): bump golang from 1.18.1-alpine to 1.18.2-alpine Bumps golang from 1.18.1-alpine to 1.18.2-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5ead95b..2a13be5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.1-alpine as build-env +FROM golang:1.18.2-alpine as build-env RUN go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest FROM alpine:latest From a3df915e0f68a22aa28febed8e6c735da183cc73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 May 2022 12:07:24 +0000 Subject: [PATCH 17/25] chore(deps): bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/lint-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 031c95c..5baf150 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v3 - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3.1.0 + uses: golangci/golangci-lint-action@v3.2.0 with: version: latest args: --timeout 5m From 4bae4cb64422952bdd49b2cd80757587218ddd8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 May 2022 12:06:12 +0000 Subject: [PATCH 18/25] chore(deps): bump goreleaser/goreleaser-action from 2 to 3 Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3. - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/release-binary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index d9e7a27..2975180 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -16,7 +16,7 @@ jobs: with: go-version: 1.18 - - uses: goreleaser/goreleaser-action@v2 + - uses: goreleaser/goreleaser-action@v3 with: args: "release --rm-dist" version: latest From 29d6f77488a72306d69d66eb47904785e9450683 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 12:06:12 +0000 Subject: [PATCH 19/25] chore(deps): bump golang from 1.18.2-alpine to 1.18.3-alpine Bumps golang from 1.18.2-alpine to 1.18.3-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2a13be5..4189603 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.2-alpine as build-env +FROM golang:1.18.3-alpine as build-env RUN go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest FROM alpine:latest From 40c80a7351769175b5ab56b7aca24ff421b8aeea Mon Sep 17 00:00:00 2001 From: mzack Date: Wed, 13 Jul 2022 01:33:15 +0200 Subject: [PATCH 20/25] Refactoring internal error handling --- pkg/chaos/chaos.go | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkg/chaos/chaos.go b/pkg/chaos/chaos.go index 7d7e80d..6bcf0fd 100644 --- a/pkg/chaos/chaos.go +++ b/pkg/chaos/chaos.go @@ -50,12 +50,12 @@ func (c *Client) GetStatistics(req *GetStatisticsRequest) (*GetStatisticsRespons return nil, errors.Wrap(err, "could not make request.") } - if resp.StatusCode != 200 { + if resp.StatusCode != http.StatusOK { body, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, errors.Wrap(err, "could not read response.") } - return nil, fmt.Errorf("invalid status code received: %d - %s", resp.StatusCode, string(body)) + return nil, InvalidStatusCodeError{StatusCode: resp.StatusCode, Message: body} } defer pdhttputil.DrainResponseBody(resp) @@ -101,14 +101,14 @@ func (c *Client) GetSubdomains(req *SubdomainsRequest) chan *Result { return } - if resp.StatusCode != 200 { + if resp.StatusCode != http.StatusOK { body, err := ioutil.ReadAll(resp.Body) if err != nil { results <- &Result{Error: errors.Wrap(err, "could not read response.")} return } pdhttputil.DrainResponseBody(resp) - results <- &Result{Error: fmt.Errorf("invalid status code received: %d - %s", resp.StatusCode, string(body))} + results <- &Result{Error: InvalidStatusCodeError{StatusCode: resp.StatusCode, Message: body}} return } @@ -194,14 +194,14 @@ func (c *Client) GetBBQSubdomains(req *SubdomainsRequest) chan *BBQResult { return } - if resp.StatusCode != 200 { + if resp.StatusCode != http.StatusOK { body, err := ioutil.ReadAll(resp.Body) if err != nil { results <- &BBQResult{Error: errors.Wrap(err, "could not read response.")} return } pdhttputil.DrainResponseBody(resp) - results <- &BBQResult{Error: fmt.Errorf("invalid status code received: %d - %s", resp.StatusCode, string(body))} + results <- &BBQResult{Error: InvalidStatusCodeError{StatusCode: resp.StatusCode, Message: body}} return } @@ -246,13 +246,22 @@ func (c *Client) PutSubdomains(req *PutSubdomainsRequest) (*PutSubdomainsRespons } defer resp.Body.Close() - if resp.StatusCode != 200 { + if resp.StatusCode != http.StatusOK { body, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, errors.Wrap(err, "could not read response.") } - return nil, fmt.Errorf("invalid status code received: %d - %s", resp.StatusCode, string(body)) + return nil, InvalidStatusCodeError{StatusCode: resp.StatusCode, Message: body} } _, _ = io.Copy(ioutil.Discard, resp.Body) return &PutSubdomainsResponse{}, nil } + +type InvalidStatusCodeError struct { + StatusCode int + Message []byte +} + +func (e InvalidStatusCodeError) Error() string { + return fmt.Sprintf("invalid status code received: %d - %s", e.StatusCode, e.Message) +} From 8e8e5f59896d8e6b22290e6c7b37026caa37dbe0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:11:20 +0000 Subject: [PATCH 21/25] chore(deps): bump golang from 1.18.3-alpine to 1.18.4-alpine Bumps golang from 1.18.3-alpine to 1.18.4-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4189603..07facf9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.3-alpine as build-env +FROM golang:1.18.4-alpine as build-env RUN go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest FROM alpine:latest From 0e00e116420b07738c4ff65abc218a3490503481 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Aug 2022 12:05:59 +0000 Subject: [PATCH 22/25] chore(deps): bump golang from 1.18.4-alpine to 1.19.0-alpine Bumps golang from 1.18.4-alpine to 1.19.0-alpine. --- updated-dependencies: - dependency-name: golang dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 07facf9..c269e6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.4-alpine as build-env +FROM golang:1.19.0-alpine as build-env RUN go install -v github.com/projectdiscovery/chaos-client/cmd/chaos@latest FROM alpine:latest From 88e37c51d2e468256164a6b98d68bee5337a18eb Mon Sep 17 00:00:00 2001 From: sandeep Date: Thu, 25 Aug 2022 20:07:54 +0530 Subject: [PATCH 23/25] version update --- internal/runner/banner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/runner/banner.go b/internal/runner/banner.go index 08eabb8..d927b2d 100644 --- a/internal/runner/banner.go +++ b/internal/runner/banner.go @@ -7,11 +7,11 @@ const banner = ` _____/ /_ ____ _____ _____ / ___/ __ \/ __ / __ \/ ___/ / /__/ / / / /_/ / /_/ (__ ) -\___/_/ /_/\__,_/\____/____/ v0.2.0 +\___/_/ /_/\__,_/\____/____/ v0.3.0 ` // Version is the current version of chaos -const Version = `0.2.0` +const Version = `0.3.0` // showBanner is used to show the banner to the user func showBanner() { From 4f60a0c9eac394c8a8584e45ec50765220e1fb2a Mon Sep 17 00:00:00 2001 From: sandeep Date: Thu, 25 Aug 2022 20:38:05 +0530 Subject: [PATCH 24/25] removing bbq options --- internal/runner/options.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/runner/options.go b/internal/runner/options.go index 195b768..1b25a90 100644 --- a/internal/runner/options.go +++ b/internal/runner/options.go @@ -46,17 +46,6 @@ func ParseOptions() *Options { flag.StringVar(&opts.Output, "o", "", "File to write output to (optional)") flag.StringVar(&opts.DomainsFile, "dL", "", "File containing subdomains to query (optional)") flag.BoolVar(&opts.JSONOutput, "json", false, "Print output as json") - flag.BoolVar(&opts.BBQ, "bbq", false, "Public bugbounty recon data") - flag.StringVar(&opts.DNSStatusCode, "dns-status-code", "", "Filter by dns status code") - flag.StringVar(&opts.DNSRecordType, "dns-record-type", "", "Filter by dns record type") - flag.BoolVar(&opts.FilterWildcard, "filter-wildcard", false, "Filter wildcards") - flag.BoolVar(&opts.Response, "resp", false, "Print record response") - flag.BoolVar(&opts.ResponseOnly, "resp-only", false, "Print record response only") - flag.BoolVar(&opts.HTTPUrl, "http-url", false, "Print http url if the fqdn exposes a web server") - flag.BoolVar(&opts.HTTPTitle, "http-title", false, "Print http homepage title if the fqdn exposes a web server") - flag.BoolVar(&opts.HTTPStatusCode, "http-status-code", false, "Print http status code if the fqdn exposes a web server") - flag.IntVar(&opts.HTTPStatusCodeFilter, "http-status-code-filter", -1, "Print http status code if the value equals the specified one") - flag.BoolVar(&opts.HTTPContentLength, "http-content-length", false, "Print http content length if the fqdn exposes a web server") flag.BoolVar(&opts.Version, "version", false, "Show version of chaos") flag.Parse() From 368cb0949371b64eb58f777d9bbb8dc87690941b Mon Sep 17 00:00:00 2001 From: sandeep Date: Thu, 25 Aug 2022 20:41:38 +0530 Subject: [PATCH 25/25] readme update --- README.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/README.md b/README.md index d708a40..e25cf80 100644 --- a/README.md +++ b/README.md @@ -35,15 +35,6 @@ This will display help for the tool. Here are all the switches it supports. | `-json` | Print output as json | `chaos -d uber.com -json` | | `-key` | Chaos key for API | `chaos -key API_KEY` | | `-dL` | File with list of domains (optional) | `chaos -dL domains.txt` | -| `-dns-record-type` | Filter by dns record type | `chaos -bbq -d uber.com -dns-record-type cname` | -| `-dns-status-code` | Filter by dns status code | `chaos -bbq -d uber.com -dns-status-code noerror` | -| `-filter-wildcard` | Filter DNS wildcards | `chaos -bbq -d uber.com -filter-wildcard` | -| `-http-url` | Print URL of the subdomains | `chaos -bbq -d uber.com -http-url` | -| `-http-title` | Print title of the URL | `chaos -bbq -d uber.com -http-title` | -| `-http-status-code` | Print http status code | `chaos -bbq -d uber.com -http-status-code` | -| `-http-status-code-filter` | Filter http status code | `chaos -bbq -d uber.com -http-status-code-filter 200` | -| `-resp` | Print DNS record with response | `chaos -bbq -d uber.com -resp` | -| `-resp-only` | Print the response of DNS record | `chaos -bbq -d uber.com -dns-record-type cname -resp-only` | | `-silent` | Make the output silent | `chaos -d uber.com -silent` | | `-version` | Print current version of chaos client | `chaos -version` | @@ -87,9 +78,8 @@ kiosk-home-staging.uber.com 💡 Notes ----- -- **The API is rate-limited to 1 request at a time per token.** +- **The API is rate-limited to 60 request / min / ip** - Chaos API **only** supports domain name to query. -- Chaos recon data can be retrieved using `bbq` flag. 👨‍💻 Community ----- @@ -97,10 +87,4 @@ kiosk-home-staging.uber.com You are welcomed to join our [Discord Community](https://discord.gg/projectdiscovery). You can also follow us on [Twitter](https://twitter.com/pdchaos) to keep up with everything related to chaos project. -📌 Reference ------ - -- [Introducing Chaos Recon data API](https://blog.projectdiscovery.io/introducing-chaos-bug-bounty-recon-data-api) - - Thanks again for your contribution and keeping the community vibrant. :heart: