Fix the v2 tagging for go install (#639)

This commit is contained in:
Joona Hoikkala 2023-02-06 11:20:28 +02:00 committed by GitHub
parent 19e07c026b
commit e952deb061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 47 additions and 42 deletions

View file

@ -10,7 +10,7 @@ builds:
gcflags:
- all=-trimpath={{.Env.GOPATH}}
ldflags: |
-s -w -X github.com/ffuf/ffuf/pkg/ffuf.VERSION_APPENDIX= -extldflags '-static'
-s -w -X github.com/ffuf/ffuf/v2/pkg/ffuf.VERSION_APPENDIX= -extldflags '-static'
goos:
- linux
- windows

View file

@ -23,7 +23,7 @@ A fast web fuzzer written in Go.
- If you are on macOS with [homebrew](https://brew.sh), ffuf can be installed with: `brew install ffuf`
_or_
- If you have recent go compiler installed: `go install github.com/ffuf/ffuf@latest` (the same command works for updating)
- If you have recent go compiler installed: `go install github.com/ffuf/ffuf/v2@latest` (the same command works for updating)
_or_
- `git clone https://github.com/ffuf/ffuf ; cd ffuf ; go get ; go build`

11
go.mod
View file

@ -1,11 +1,16 @@
module github.com/ffuf/ffuf
module github.com/ffuf/ffuf/v2
go 1.17
require (
github.com/PuerkitoBio/goquery v1.8.0
github.com/adrg/xdg v0.4.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pelletier/go-toml v1.9.5
golang.org/x/net v0.5.0 // indirect
)
require (
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
)

1
go.sum
View file

@ -47,7 +47,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View file

@ -5,7 +5,7 @@ import (
"fmt"
"os"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type UsageSection struct {

14
main.go
View file

@ -10,13 +10,13 @@ import (
"strings"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/pkg/filter"
"github.com/ffuf/ffuf/pkg/input"
"github.com/ffuf/ffuf/pkg/interactive"
"github.com/ffuf/ffuf/pkg/output"
"github.com/ffuf/ffuf/pkg/runner"
"github.com/ffuf/ffuf/pkg/scraper"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/filter"
"github.com/ffuf/ffuf/v2/pkg/input"
"github.com/ffuf/ffuf/v2/pkg/interactive"
"github.com/ffuf/ffuf/v2/pkg/output"
"github.com/ffuf/ffuf/v2/pkg/runner"
"github.com/ffuf/ffuf/v2/pkg/scraper"
)
type multiStringFlag []string

View file

@ -2,8 +2,9 @@ package filter
import (
"fmt"
"github.com/ffuf/ffuf/pkg/ffuf"
"sync"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
// MatcherManager handles both filters and matchers.

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type LineFilter struct {

View file

@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestNewLineFilter(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type RegexpFilter struct {

View file

@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestNewRegexpFilter(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type SizeFilter struct {

View file

@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestNewSizeFilter(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
const AllStatuses = 0

View file

@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestNewStatusFilter(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type TimeFilter struct {

View file

@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestNewTimeFilter(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type WordFilter struct {

View file

@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestNewWordFilter(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"os/exec"
"strconv"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type CommandInput struct {

View file

@ -3,7 +3,7 @@ package input
import (
"fmt"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type MainInputProvider struct {

View file

@ -6,7 +6,7 @@ import (
"regexp"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type WordlistInput struct {

View file

@ -7,7 +7,7 @@ import (
"strings"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type interactive struct {

View file

@ -6,7 +6,7 @@ import (
"os"
"strconv"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
var staticheaders = []string{"url", "redirectlocation", "position", "status_code", "content_length", "content_words", "content_lines", "content_type", "duration", "resultfile"}

View file

@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func TestToCSV(t *testing.T) {

View file

@ -6,7 +6,7 @@ import (
"os"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type htmlResult struct {

View file

@ -5,7 +5,7 @@ import (
"os"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
type ejsonFileOutput struct {

View file

@ -5,7 +5,7 @@ import (
"os"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
const (

View file

@ -1,7 +1,7 @@
package output
import (
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func NewOutputProviderByName(name string, conf *ffuf.Config) ffuf.OutputProvider {

View file

@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
const (

View file

@ -1,7 +1,7 @@
package runner
import (
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
func NewRunnerByName(name string, conf *ffuf.Config, replay bool) ffuf.RunnerProvider {

View file

@ -16,7 +16,7 @@ import (
"strings"
"time"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
)
// Download results < 5MB

View file

@ -8,7 +8,7 @@ import (
"regexp"
"strings"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
"github.com/PuerkitoBio/goquery"
)

View file

@ -2,7 +2,7 @@ package scraper
import (
"fmt"
"github.com/ffuf/ffuf/pkg/ffuf"
"github.com/ffuf/ffuf/v2/pkg/ffuf"
"strings"
)