-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from projectdiscovery/dev
pdtm v0.0.4
- Loading branch information
Showing
24 changed files
with
556 additions
and
560 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 🔨 Setup Test | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build: | ||
name: Test Setups | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest-16-cores, windows-latest-8-cores, macOS-latest] | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Dry Run - No Tool Installed | ||
run: go run . | ||
working-directory: cmd/pdtm/ | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Install Run - Setup All The Tools | ||
run: go run . -ia | ||
working-directory: cmd/pdtm/ | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Add binaries folder to ENV PATH (Unix-Like) | ||
if: runner.os != 'Windows' | ||
run: go run . -show-path -nsp >> $GITHUB_PATH | ||
working-directory: cmd/pdtm/ | ||
|
||
- name: Add binaries folder to ENV PATH (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
go run . -show-path -nsp | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
working-directory: cmd/pdtm/ | ||
|
||
- name: Checking tools existence | ||
run: | | ||
go run . | grep -vz "not installed" | ||
working-directory: cmd/pdtm/ | ||
|
||
- name: Update Run - Update All The Tools | ||
run: go run . -ua | ||
working-directory: cmd/pdtm/ | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Remove Run - Remove All The Tools | ||
run: go run . -ra | ||
working-directory: cmd/pdtm/ |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/projectdiscovery/goflags" | ||
"github.com/projectdiscovery/pdtm/pkg/utils" | ||
) | ||
|
||
type options struct { | ||
DisableUpdateCheck bool | ||
} | ||
|
||
func main() { | ||
options := &options{} | ||
flagSet := goflags.NewFlagSet() | ||
toolName := "nuclei" | ||
|
||
flagSet.CreateGroup("update", "Update", | ||
flagSet.CallbackVarP(utils.GetUpdaterCallback(toolName), "update", "up", fmt.Sprintf("update %v to the latest released version", toolName)), | ||
flagSet.BoolVarP(&options.DisableUpdateCheck, "disable-update-check", "duc", false, "disable automatic update check"), | ||
) | ||
|
||
if err := flagSet.Parse(); err != nil { | ||
panic(err) | ||
} | ||
|
||
if !options.DisableUpdateCheck { | ||
msg := utils.GetVersionCheckCallback(toolName)() | ||
fmt.Println(msg) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,52 @@ | ||
module github.com/projectdiscovery/pdtm | ||
|
||
go 1.18 | ||
go 1.19 | ||
|
||
require ( | ||
github.com/google/go-github v17.0.0+incompatible | ||
github.com/projectdiscovery/goflags v0.1.6 | ||
github.com/projectdiscovery/gologger v1.1.7 | ||
github.com/projectdiscovery/utils v0.0.4-0.20221214110533-9f95ee986a54 | ||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a | ||
github.com/projectdiscovery/goflags v0.1.8-0.20230227110143-6fd5a0dc706b | ||
github.com/projectdiscovery/gologger v1.1.8 | ||
github.com/projectdiscovery/utils v0.0.13 | ||
github.com/stretchr/testify v1.8.2 | ||
golang.org/x/oauth2 v0.5.0 | ||
golang.org/x/sys v0.5.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
) | ||
|
||
require ( | ||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect | ||
github.com/aymerick/douceur v0.2.0 // indirect | ||
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08 // indirect | ||
github.com/dsnet/compress v0.0.1 // indirect | ||
github.com/golang/protobuf v1.4.2 // indirect | ||
github.com/golang/protobuf v1.5.2 // indirect | ||
github.com/golang/snappy v0.0.1 // indirect | ||
github.com/google/go-querystring v1.1.0 // indirect | ||
github.com/gorilla/css v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect | ||
github.com/logrusorgru/aurora/v4 v4.0.0 | ||
github.com/mholt/archiver v3.1.1+incompatible // indirect | ||
github.com/microcosm-cc/bluemonday v1.0.21 // indirect | ||
github.com/miekg/dns v1.1.50 // indirect | ||
github.com/microcosm-cc/bluemonday v1.0.22 // indirect | ||
github.com/miekg/dns v1.1.51 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/nwaples/rardecode v1.1.0 // indirect | ||
github.com/pierrec/lz4 v2.6.0+incompatible // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/rogpeppe/go-internal v1.9.0 // indirect | ||
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect | ||
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect | ||
github.com/ulikunitz/xz v0.5.8 // indirect | ||
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect | ||
golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect | ||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect | ||
golang.org/x/mod v0.7.0 // indirect | ||
golang.org/x/net v0.7.0 // indirect | ||
golang.org/x/tools v0.1.12 // indirect | ||
google.golang.org/appengine v1.6.6 // indirect | ||
google.golang.org/protobuf v1.25.0 // indirect | ||
golang.org/x/tools v0.3.0 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/protobuf v1.28.0 // indirect | ||
gopkg.in/djherbis/times.v1 v1.3.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) | ||
) |
Oops, something went wrong.