diff --git a/v2/cmd/integration-test/interactsh.go b/v2/cmd/integration-test/interactsh.go index 5d0e82dfb..709954f65 100644 --- a/v2/cmd/integration-test/interactsh.go +++ b/v2/cmd/integration-test/interactsh.go @@ -6,6 +6,6 @@ import osutils "github.com/projectdiscovery/utils/os" var interactshTestCases = []TestCaseInfo{ {Path: "http/interactsh.yaml", TestCase: &httpInteractshRequest{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }}, {Path: "http/interactsh-stop-at-first-match.yaml", TestCase: &httpInteractshStopAtFirstMatchRequest{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }}, - {Path: "http/default-matcher-condition.yaml", TestCase: &httpDefaultMatcherCondition{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }}, + {Path: "http/default-matcher-condition.yaml", TestCase: &httpDefaultMatcherCondition{}, DisableOn: func() bool { return true }}, // disable this test for now {Path: "http/interactsh-requests-mc-and.yaml", TestCase: &httpInteractshRequestsWithMCAnd{}}, } diff --git a/v2/internal/installer/util.go b/v2/internal/installer/util.go index 024202a34..57ae05bb2 100644 --- a/v2/internal/installer/util.go +++ b/v2/internal/installer/util.go @@ -103,3 +103,29 @@ func isEmptyDir(dir string) bool { }) return !hasFiles } + +// getUtmSource returns utm_source from environment variable +func getUtmSource() string { + value := "" + switch { + case os.Getenv("GH_ACTION") != "": + value = "ghci" + case os.Getenv("TRAVIS") != "": + value = "travis" + case os.Getenv("CIRCLECI") != "": + value = "circleci" + case os.Getenv("CI") != "": + value = "gitlabci" // this also includes bitbucket + case os.Getenv("GITHUB_ACTIONS") != "": + value = "ghci" + case os.Getenv("AWS_EXECUTION_ENV") != "": + value = os.Getenv("AWS_EXECUTION_ENV") + case os.Getenv("JENKINS_URL") != "": + value = "jenkins" + case os.Getenv("FUNCTION_TARGET") != "": + value = "gcf" + default: + value = "unknown" + } + return value +} diff --git a/v2/internal/installer/versioncheck.go b/v2/internal/installer/versioncheck.go index 12dd2aed5..47a791055 100644 --- a/v2/internal/installer/versioncheck.go +++ b/v2/internal/installer/versioncheck.go @@ -71,6 +71,7 @@ func getpdtmParams() string { params.Add("arch", runtime.GOARCH) params.Add("go_version", runtime.Version()) params.Add("v", config.Version) + params.Add("utm_source", getUtmSource()) return params.Encode() }