diff --git a/.gitignore b/.gitignore index 86c2c7bb..674a934c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ bin/* dist/* teler.yaml -.scannerwork/ \ No newline at end of file +.scannerwork/ +/teler.app \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index bed28cf0..61645944 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN go mod download COPY . . RUN CGO_ENABLED=0 go build -ldflags \ - "-s -w -X teler.app/common.Version=${VERSION}" \ + "-s -w -X github.com/kitabisa/teler/common.Version=${VERSION}" \ -o ./bin/teler . FROM alpine:latest diff --git a/Makefile b/Makefile index c40b0213..67d915fa 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ help: build: @echo "--- Building ${APP_NAME} ${VERSION}" @echo "GOPATH=${GOPATH}" - go build -ldflags "-s -w -X teler.app/common.Version=${VERSION}" -buildvcs=false -o ./bin/${APP_NAME} . + go build -ldflags "-s -w -X github.com/kitabisa/teler/common.Version=${VERSION}" -buildvcs=false -o ./bin/${APP_NAME} . build-all: @echo "--- Cross-platform build ${APP_NAME} ${VERSION}" diff --git a/common/options.go b/common/options.go index 01931831..374368cb 100644 --- a/common/options.go +++ b/common/options.go @@ -3,7 +3,7 @@ package common import ( "os" - "teler.app/pkg/parsers" + "github.com/kitabisa/teler/pkg/parsers" ) // Options contains the configuration options diff --git a/go.mod b/go.mod index c3b74037..a47d6b9e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module teler.app +module github.com/kitabisa/teler go 1.18 diff --git a/internal/alert/alert.go b/internal/alert/alert.go index c385f98f..437e5944 100644 --- a/internal/alert/alert.go +++ b/internal/alert/alert.go @@ -3,9 +3,9 @@ package alert import ( "reflect" - "teler.app/common" - "teler.app/pkg/matchers" - "teler.app/pkg/utils" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/matchers" + "github.com/kitabisa/teler/pkg/utils" ) // New will initialize notification provider & send threat alerts diff --git a/internal/alert/discord.go b/internal/alert/discord.go index 48d116dc..3603df52 100644 --- a/internal/alert/discord.go +++ b/internal/alert/discord.go @@ -8,7 +8,7 @@ import ( "strings" "github.com/bwmarrin/discordgo" - "teler.app/pkg/errors" + "github.com/kitabisa/teler/pkg/errors" ) // token can be webhook URL if webhooked is true diff --git a/internal/alert/telegram.go b/internal/alert/telegram.go index f2717e21..196cbab2 100644 --- a/internal/alert/telegram.go +++ b/internal/alert/telegram.go @@ -7,7 +7,7 @@ import ( "strconv" tg "github.com/go-telegram-bot-api/telegram-bot-api" - "teler.app/pkg/errors" + "github.com/kitabisa/teler/pkg/errors" ) //go:embed template/*.tmpl diff --git a/internal/event/event.go b/internal/event/event.go index 44e48953..e1ae5fff 100644 --- a/internal/event/event.go +++ b/internal/event/event.go @@ -10,12 +10,12 @@ import ( "strconv" "github.com/goji/httpauth" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/errors" "github.com/projectdiscovery/gologger" "github.com/r3labs/sse/v2" "goji.io" "goji.io/pat" - "teler.app/common" - "teler.app/pkg/errors" ) // Run SSE diff --git a/internal/event/server.go b/internal/event/server.go index f7e3d8ff..aee50ec4 100644 --- a/internal/event/server.go +++ b/internal/event/server.go @@ -1,8 +1,8 @@ package event import ( + "github.com/kitabisa/teler/common" "github.com/r3labs/sse/v2" - "teler.app/common" ) type server struct { diff --git a/internal/runner/banner.go b/internal/runner/banner.go index 2f9f679f..a3953c4a 100644 --- a/internal/runner/banner.go +++ b/internal/runner/banner.go @@ -1,8 +1,8 @@ package runner import ( + "github.com/kitabisa/teler/common" "github.com/projectdiscovery/gologger" - "teler.app/common" ) // showBanner is used to show the banner to the user diff --git a/internal/runner/cache.go b/internal/runner/cache.go index 7205f183..54e3c34d 100644 --- a/internal/runner/cache.go +++ b/internal/runner/cache.go @@ -1,9 +1,9 @@ package runner import ( + "github.com/kitabisa/teler/pkg/cache" + "github.com/kitabisa/teler/pkg/errors" "github.com/projectdiscovery/gologger" - "teler.app/pkg/cache" - "teler.app/pkg/errors" ) func rmCache() { diff --git a/internal/runner/logs.go b/internal/runner/logs.go index f66cad75..115a6b98 100644 --- a/internal/runner/logs.go +++ b/internal/runner/logs.go @@ -4,9 +4,9 @@ import ( "fmt" "reflect" - "teler.app/common" - "teler.app/pkg/errors" - "teler.app/pkg/logs" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/errors" + "github.com/kitabisa/teler/pkg/logs" ) func log(options *common.Options, data map[string]string) { diff --git a/internal/runner/metrics.go b/internal/runner/metrics.go index 86285266..7e30d54f 100644 --- a/internal/runner/metrics.go +++ b/internal/runner/metrics.go @@ -6,11 +6,11 @@ import ( "reflect" "strconv" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/errors" + "github.com/kitabisa/teler/pkg/metrics" "github.com/projectdiscovery/gologger" "github.com/prometheus/client_golang/prometheus/promhttp" - "teler.app/common" - "teler.app/pkg/errors" - "teler.app/pkg/metrics" ) func metric(options *common.Options) { diff --git a/internal/runner/options.go b/internal/runner/options.go index fde2241d..8a582aa0 100644 --- a/internal/runner/options.go +++ b/internal/runner/options.go @@ -6,10 +6,10 @@ import ( "os" "strings" - "teler.app/common" - "teler.app/pkg/cache" - "teler.app/pkg/errors" - "teler.app/pkg/requests" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/cache" + "github.com/kitabisa/teler/pkg/errors" + "github.com/kitabisa/teler/pkg/requests" ) // ParseOptions will parse args/opts diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 8b86480f..f599c5df 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -7,17 +7,17 @@ import ( "os/signal" "github.com/kitabisa/tailpipe" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/internal/alert" + "github.com/kitabisa/teler/internal/event" + "github.com/kitabisa/teler/pkg/errors" + "github.com/kitabisa/teler/pkg/metrics" + "github.com/kitabisa/teler/pkg/teler" "github.com/logrusorgru/aurora" "github.com/panjf2000/ants/v2" "github.com/projectdiscovery/gologger" "github.com/remeh/sizedwaitgroup" "github.com/satyrius/gonx" - "teler.app/common" - "teler.app/internal/alert" - "teler.app/internal/event" - "teler.app/pkg/errors" - "teler.app/pkg/metrics" - "teler.app/pkg/teler" ) // New read & pass stdin log diff --git a/internal/runner/validator.go b/internal/runner/validator.go index 34820831..7f04083a 100644 --- a/internal/runner/validator.go +++ b/internal/runner/validator.go @@ -11,12 +11,12 @@ import ( "reflect" "strings" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/errors" + "github.com/kitabisa/teler/pkg/matchers" + "github.com/kitabisa/teler/pkg/parsers" + "github.com/kitabisa/teler/pkg/utils" "gopkg.in/validator.v2" - "teler.app/common" - "teler.app/pkg/errors" - "teler.app/pkg/matchers" - "teler.app/pkg/parsers" - "teler.app/pkg/utils" ) func validate(options *common.Options) { diff --git a/internal/runner/version.go b/internal/runner/version.go index a89581ae..adca3de7 100644 --- a/internal/runner/version.go +++ b/internal/runner/version.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "teler.app/common" + "github.com/kitabisa/teler/common" ) func showVersion() { diff --git a/main.go b/main.go index b7e3db79..9924690b 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,10 @@ package main import ( + "github.com/kitabisa/teler/internal/runner" "github.com/projectdiscovery/gologger" "github.com/projectdiscovery/gologger/levels" "go.uber.org/automaxprocs/maxprocs" - "teler.app/internal/runner" ) func init() { diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go index 6e404b7d..9cb20ad4 100644 --- a/pkg/cache/cache.go +++ b/pkg/cache/cache.go @@ -7,7 +7,7 @@ import ( "time" "github.com/kirsle/configdir" - "teler.app/pkg/errors" + "github.com/kitabisa/teler/pkg/errors" ) // Cache defines resources cache file informations diff --git a/pkg/errors/abort.go b/pkg/errors/abort.go index 97220efd..f97671ed 100644 --- a/pkg/errors/abort.go +++ b/pkg/errors/abort.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package errors diff --git a/pkg/errors/abort_windows.go b/pkg/errors/abort_windows.go index 9c1249b7..30f03e4d 100644 --- a/pkg/errors/abort_windows.go +++ b/pkg/errors/abort_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package errors diff --git a/pkg/logs/file.go b/pkg/logs/file.go index a6ce0d62..044a3629 100644 --- a/pkg/logs/file.go +++ b/pkg/logs/file.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "teler.app/common" + "github.com/kitabisa/teler/common" ) // File write detected threats into it diff --git a/pkg/logs/zinc.go b/pkg/logs/zinc.go index 8915c7a9..01b05ea5 100644 --- a/pkg/logs/zinc.go +++ b/pkg/logs/zinc.go @@ -8,7 +8,7 @@ import ( "io" "net/http" - e "teler.app/pkg/errors" + e "github.com/kitabisa/teler/pkg/errors" ) // Zinc logs insertion diff --git a/pkg/matchers/config.go b/pkg/matchers/config.go index 7c1e8cd1..faec2223 100644 --- a/pkg/matchers/config.go +++ b/pkg/matchers/config.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "teler.app/pkg/errors" + "github.com/kitabisa/teler/pkg/errors" ) func errValidate(key string) { diff --git a/pkg/matchers/config_test.go b/pkg/matchers/config_test.go index ee0e0189..29f4be84 100644 --- a/pkg/matchers/config_test.go +++ b/pkg/matchers/config_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "teler.app/pkg/errors" + "github.com/kitabisa/teler/pkg/errors" ) func TestIsLogformat(t *testing.T) { diff --git a/pkg/metrics/prometheus.go b/pkg/metrics/prometheus.go index 0ba7291e..a90cf45c 100644 --- a/pkg/metrics/prometheus.go +++ b/pkg/metrics/prometheus.go @@ -3,8 +3,8 @@ package metrics import ( "strings" + "github.com/kitabisa/teler/common" "github.com/prometheus/client_golang/prometheus" - "teler.app/common" ) // PrometheusInsert logs into metrics diff --git a/pkg/requests/resources.go b/pkg/requests/resources.go index 43a2abbd..eba9060c 100644 --- a/pkg/requests/resources.go +++ b/pkg/requests/resources.go @@ -9,10 +9,10 @@ import ( "time" "github.com/briandowns/spinner" - "teler.app/common" - "teler.app/pkg/cache" - "teler.app/pkg/errors" - "teler.app/resource" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/cache" + "github.com/kitabisa/teler/pkg/errors" + "github.com/kitabisa/teler/resource" ) var ( diff --git a/pkg/teler/teler.go b/pkg/teler/teler.go index 3a332ed9..0af1ae7c 100644 --- a/pkg/teler/teler.go +++ b/pkg/teler/teler.go @@ -10,10 +10,10 @@ import ( "net/http" "net/url" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/matchers" "github.com/satyrius/gonx" "github.com/valyala/fastjson" - "teler.app/common" - "teler.app/pkg/matchers" ) // Analyze logs from threat resources diff --git a/pkg/teler/utils.go b/pkg/teler/utils.go index e05ac406..983ba8b2 100644 --- a/pkg/teler/utils.go +++ b/pkg/teler/utils.go @@ -4,9 +4,9 @@ import ( "reflect" "unicode/utf8" - "teler.app/common" - "teler.app/pkg/matchers" - "teler.app/resource" + "github.com/kitabisa/teler/common" + "github.com/kitabisa/teler/pkg/matchers" + "github.com/kitabisa/teler/resource" ) func getDatasets() { diff --git a/teler.example.yaml b/teler.example.yaml index da4b5bc9..fcdfb309 100644 --- a/teler.example.yaml +++ b/teler.example.yaml @@ -1,4 +1,4 @@ -# To write log format, see https://teler.app/configuration/log-format +# To write log format, see https://github.com/kitabisa/teler/configuration/log-format log_format: | $remote_addr $remote_user - [$time_local] "$request_method $request_uri $request_protocol" $status $body_bytes_sent "$http_referer" "$http_user_agent"