diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 289a6e6..eb99ca7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -37,14 +37,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - go-version: '1.24' + go-version: '1.25' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - go-version: '1.23' + go-version: '1.25' # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. @@ -58,7 +58,7 @@ jobs: - name: Autobuild uses: github/codeql-action/autobuild@v3 with: - go-version: '1.23' + go-version: '1.25' # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -73,5 +73,5 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 with: - go-version: '1.23' + go-version: '1.25' category: "/language:${{matrix.language}}" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1d73735..2dda1ee 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: 1.25 - name: Build run: go build -v ./... diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index d0bbff7..60a6709 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -18,13 +18,13 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: 1.25 - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v8 + uses: golangci/golangci-lint-action@v9 with: # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: v2.3.0 + version: v2.11.3 args: --timeout=5m # Optional: working directory, useful for monorepos diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index fbe3626..bbf56bc 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -18,7 +18,7 @@ jobs: - name: "Set up Go" uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: 1.25 - name: "Create release on GitHub" timeout-minutes: 10 diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml index e510774..89c0a3a 100644 --- a/.github/workflows/release-test.yml +++ b/.github/workflows/release-test.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.24 + go-version: 1.25 - name: release test uses: goreleaser/goreleaser-action@v6 diff --git a/go.mod b/go.mod index e73090e..438b461 100644 --- a/go.mod +++ b/go.mod @@ -1,25 +1,17 @@ module github.com/edoardottt/pphack -go 1.24.0 +go 1.25.0 require ( github.com/chromedp/chromedp v0.14.2 github.com/edoardottt/golazy v0.1.4 github.com/projectdiscovery/goflags v0.1.74 github.com/projectdiscovery/gologger v1.1.68 - github.com/projectdiscovery/utils v0.9.0 + github.com/projectdiscovery/utils v0.10.0 github.com/stretchr/testify v1.11.1 go.uber.org/ratelimit v0.3.1 ) -require ( - github.com/djherbis/times v1.6.0 // indirect - github.com/logrusorgru/aurora/v4 v4.0.0 // indirect - github.com/mikelolasagasti/xz v1.0.1 // indirect - github.com/minio/minlz v1.0.1 // indirect - github.com/spf13/afero v1.15.0 // indirect -) - require ( github.com/STARRY-S/zip v0.2.3 // indirect github.com/andybalholm/brotli v1.2.0 // indirect @@ -33,6 +25,7 @@ require ( github.com/chromedp/sysutil v1.1.0 // indirect github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/djherbis/times v1.6.0 // indirect github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707 // indirect github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2 // indirect github.com/gobwas/httphead v0.1.0 // indirect @@ -44,10 +37,13 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.18.2 // indirect github.com/klauspost/pgzip v1.2.6 // indirect + github.com/logrusorgru/aurora/v4 v4.0.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mholt/archives v0.1.5 // indirect github.com/microcosm-cc/bluemonday v1.0.27 // indirect github.com/miekg/dns v1.1.63 // indirect + github.com/mikelolasagasti/xz v1.0.1 // indirect + github.com/minio/minlz v1.0.1 // 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/v2 v2.2.2 // indirect @@ -57,6 +53,7 @@ require ( github.com/projectdiscovery/blackrock v0.0.1 // indirect github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect github.com/sorairolake/lzip-go v0.3.8 // indirect + github.com/spf13/afero v1.15.0 // indirect github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect diff --git a/go.sum b/go.sum index 0d96d3b..8239ee0 100644 --- a/go.sum +++ b/go.sum @@ -161,8 +161,8 @@ github.com/projectdiscovery/goflags v0.1.74 h1:n85uTRj5qMosm0PFBfsvOL24I7TdWRcWq github.com/projectdiscovery/goflags v0.1.74/go.mod h1:UMc9/7dFz2oln+10tv6cy+7WZKTHf9UGhaNkF95emh4= github.com/projectdiscovery/gologger v1.1.68 h1:KfdIO/3X7BtHssWZuqhxPZ+A946epCCx2cz+3NnRAnU= github.com/projectdiscovery/gologger v1.1.68/go.mod h1:Xae0t4SeqJVa0RQGK9iECx/+HfXhvq70nqOQp2BuW+o= -github.com/projectdiscovery/utils v0.9.0 h1:eu9vdbP0VYXI9nGSLfnOpUqBeW9/B/iSli7U8gPKZw8= -github.com/projectdiscovery/utils v0.9.0/go.mod h1:zcVu1QTlMi5763qCol/L3ROnbd/UPSBP8fI5PmcnF6s= +github.com/projectdiscovery/utils v0.10.0 h1:E3nMm0h3LWt2bbnpRd8Whyj/y0DrMJKYx2zV8gqFDF0= +github.com/projectdiscovery/utils v0.10.0/go.mod h1:FL0cQdg3oBMtJdmbBrfLd5i73syNxpkbKO9tivQ0+rI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= diff --git a/pkg/exploit/fingerprint.go b/pkg/exploit/fingerprint.go index 4285b2a..2544513 100644 --- a/pkg/exploit/fingerprint.go +++ b/pkg/exploit/fingerprint.go @@ -18,7 +18,7 @@ func GetProductInfo(name string) (Product, error) { // GetReferences returns the references for certain products. func GetReferences(fingerprint []string) []string { - result := []string{} + result := make([]string, 0, len(fingerprint)) for _, f := range fingerprint { result = append(result, exploits[f].Reference)