From cb47aef7e4d81cab037909ac0b223d4a5df65aed Mon Sep 17 00:00:00 2001 From: Brendan Le Glaunec Date: Mon, 11 Nov 2019 20:17:39 +0100 Subject: [PATCH] Fix capitalization issues in import path (#244) --- .golangci.yml | 2 +- Dockerfile | 8 ++++---- README.md | 10 +++++----- attack.go | 2 +- attack_test.go | 4 ++-- cameradar.go | 2 +- cmd/cameradar/cameradar.go | 10 +++++----- curl.go | 2 +- curl_test.go | 2 +- go.mod | 8 ++++---- go.sum | 13 +++++++------ loaders_test.go | 2 +- scan.go | 2 +- scan_test.go | 4 ++-- scanner.go | 10 +++++----- scanner_test.go | 2 +- summary.go | 4 ++-- summary_test.go | 2 +- tools/dictionary_updater/main.go | 4 ++-- 19 files changed, 47 insertions(+), 46 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index fba69a8..6d92d3e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,7 @@ # https://github.com/golangci/golangci/wiki/Configuration service: - project-path: github.com/ullaakut/cameradar + project-path: github.com/Ullaakut/cameradar prepare: - apt-get update && apt-get install -y libcurl4-gnutls-dev - dep ensure diff --git a/Dockerfile b/Dockerfile index e80a8b3..abbe5f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # Build stage FROM golang:alpine AS build-env -COPY . /go/src/github.com/ullaakut/cameradar -WORKDIR /go/src/github.com/ullaakut/cameradar/cmd/cameradar +COPY . /go/src/github.com/Ullaakut/cameradar +WORKDIR /go/src/github.com/Ullaakut/cameradar/cmd/cameradar RUN apk update && \ apk upgrade && \ @@ -25,8 +25,8 @@ RUN apk --update add --no-cache nmap \ curl-dev WORKDIR /app/cameradar -COPY --from=build-env /go/src/github.com/ullaakut/cameradar/dictionaries/ /app/dictionaries/ -COPY --from=build-env /go/src/github.com/ullaakut/cameradar/cmd/cameradar/ /app/cameradar/ +COPY --from=build-env /go/src/github.com/Ullaakut/cameradar/dictionaries/ /app/dictionaries/ +COPY --from=build-env /go/src/github.com/Ullaakut/cameradar/cmd/cameradar/ /app/cameradar/ ENV CAMERADAR_CUSTOM_ROUTES="/app/dictionaries/routes" ENV CAMERADAR_CUSTOM_CREDENTIALS="/app/dictionaries/credentials.json" diff --git a/README.md b/README.md index 347ac6a..bd68cdc 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,8 @@ Only use this solution if for some reason using docker is not an option for you Make sure you installed the [dependencies](#dependencies), **and that you have Go modules enabled (`GO111MODULE=on`)**. 1. `export GO111MODULE=on` (unless it's already on) -2. `go get github.com/ullaakut/cameradar` -3. `cd $GOPATH/src/github.com/ullaakut/cameradar` +2. `go get github.com/Ullaakut/cameradar` +3. `cd $GOPATH/src/github.com/Ullaakut/cameradar` 4. `cd cmd/cameradar` 5. `go install` @@ -210,8 +210,8 @@ Your image will be called `cameradar` and NOT `ullaakut/cameradar`. Make sure you installed the [dependencies](#dependencies), **and that you have Go modules enabled (`GO111MODULE=on`)**. 1. `export GO111MODULE=on` (unless it's already on) -2. `go get github.com/ullaakut/cameradar` -3. `cd $GOPATH/src/github.com/ullaakut/cameradar` +2. `go get github.com/Ullaakut/cameradar` +3. `cd $GOPATH/src/github.com/Ullaakut/cameradar` 4. `cd cmd/cameradar` 5. `go install` @@ -235,7 +235,7 @@ You can still find it under the 1.1.4 tag on this repo, however it was less perf > How to use the Cameradar library for my own project? -See the example in `/cmd/cameradar`. You just need to run `go get github.com/ullaakut/cameradar` and to use the `cameradar` package in your code. You can find the documentation on [godoc](https://godoc.org/github.com/ullaakut/cameradar). +See the example in `/cmd/cameradar`. You just need to run `go get github.com/Ullaakut/cameradar` and to use the `cameradar` package in your code. You can find the documentation on [godoc](https://godoc.org/github.com/ullaakut/cameradar). > I want to scan my own localhost for some reason and it does not work! What's going on? diff --git a/attack.go b/attack.go index 7e5a383..b94f776 100644 --- a/attack.go +++ b/attack.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - curl "github.com/ullaakut/go-curl" + curl "github.com/Ullaakut/go-curl" ) // HTTP responses. diff --git a/attack_test.go b/attack_test.go index fbb271e..afa665b 100644 --- a/attack_test.go +++ b/attack_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" + "github.com/Ullaakut/disgo" + curl "github.com/Ullaakut/go-curl" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/ullaakut/disgo" - curl "github.com/ullaakut/go-curl" ) type CurlerMock struct { diff --git a/cameradar.go b/cameradar.go index 491b795..9199a03 100644 --- a/cameradar.go +++ b/cameradar.go @@ -3,7 +3,7 @@ // IP Cameras, often for surveillance. // // A simple example usage of the library can be found in -// https://github.com/ullaakut/cameradar/tree/master/cameradar +// https://github.com/Ullaakut/cameradar/tree/master/cameradar // // The example usage is complete enough for most users to // ignore the library, but for users with specific needs diff --git a/cmd/cameradar/cameradar.go b/cmd/cameradar/cameradar.go index a0eb4f4..ec1a4bd 100644 --- a/cmd/cameradar/cameradar.go +++ b/cmd/cameradar/cameradar.go @@ -7,11 +7,11 @@ import ( "strings" "time" + "github.com/Ullaakut/cameradar" + "github.com/Ullaakut/disgo" + "github.com/Ullaakut/disgo/style" "github.com/spf13/pflag" "github.com/spf13/viper" - "github.com/ullaakut/cameradar" - "github.com/ullaakut/disgo" - "github.com/ullaakut/disgo/style" ) func parseArguments() error { @@ -20,10 +20,10 @@ func parseArguments() error { pflag.StringSliceP("targets", "t", []string{}, "The targets on which to scan for open RTSP streams - required (ex: 172.16.100.0/24)") pflag.StringSliceP("ports", "p", []string{"554", "5554", "8554"}, "The ports on which to search for RTSP streams") - pflag.StringP("custom-routes", "r", "${GOPATH}/src/github.com/ullaakut/cameradar/dictionaries/routes", "The path on which to load a custom routes dictionary") - pflag.StringP("custom-credentials", "c", "${GOPATH}/src/github.com/ullaakut/cameradar/dictionaries/credentials.json", "The path on which to load a custom credentials JSON dictionary") pflag.IntP("speed", "s", 4, "The nmap speed preset to use for discovery") pflag.DurationP("timeout", "T", 2*time.Second, "The timeout in miliseconds to use for attack attempts") + pflag.StringP("custom-routes", "r", "${GOPATH}/src/github.com/Ullaakut/cameradar/dictionaries/routes", "The path on which to load a custom routes dictionary") + pflag.StringP("custom-credentials", "c", "${GOPATH}/src/github.com/Ullaakut/cameradar/dictionaries/credentials.json", "The path on which to load a custom credentials JSON dictionary") pflag.BoolP("debug", "d", true, "Enable the debug logs") pflag.BoolP("verbose", "v", false, "Enable the verbose logs") pflag.BoolP("help", "h", false, "displays this help message") diff --git a/curl.go b/curl.go index 7341a5a..f2e7b28 100644 --- a/curl.go +++ b/curl.go @@ -1,7 +1,7 @@ package cameradar import ( - curl "github.com/ullaakut/go-curl" + curl "github.com/Ullaakut/go-curl" ) // Curler is an interface that implements the CURL interface of the go-curl library diff --git a/curl_test.go b/curl_test.go index fc4074a..37b0fc2 100644 --- a/curl_test.go +++ b/curl_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - curl "github.com/ullaakut/go-curl" + curl "github.com/Ullaakut/go-curl" ) func TestCurl(t *testing.T) { diff --git a/go.mod b/go.mod index 2956d2a..a5ee63d 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,17 @@ -module github.com/ullaakut/cameradar +module github.com/Ullaakut/cameradar go 1.12 require ( github.com/PuerkitoBio/goquery v1.5.0 + github.com/Ullaakut/disgo v0.3.1 + github.com/Ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd + github.com/Ullaakut/nmap v0.0.0-20191020025340-830f10551944 github.com/VividCortex/ewma v1.1.1 // indirect github.com/fatih/color v1.7.0 // indirect github.com/mattn/go-colorable v0.1.2 // indirect github.com/spf13/pflag v1.0.3 github.com/spf13/viper v1.4.0 github.com/stretchr/testify v1.2.2 - github.com/ullaakut/disgo v0.3.0 - github.com/ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd - github.com/ullaakut/nmap v0.0.0-20190623040344-bb4f2791e14a github.com/vbauerster/mpb v3.4.0+incompatible ) diff --git a/go.sum b/go.sum index 139f72a..e0ed82f 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,12 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/goquery v1.5.0 h1:uGvmFXOA73IKluu/F84Xd1tt/z07GYm8X49XKHP7EJk= github.com/PuerkitoBio/goquery v1.5.0/go.mod h1:qD2PgZ9lccMbQlc7eEOjaeRlFQON7xY8kdmcsrnKqMg= +github.com/Ullaakut/disgo v0.3.1 h1:BGGVHynji41KGuGI02ztTCnILRvyzlvmiCRl5bBpjKk= +github.com/Ullaakut/disgo v0.3.1/go.mod h1:/CSvpnYVSKOeh2dvUvx9cXshzz2t7T1/lRO/MrFj3fI= +github.com/Ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd h1:CMe+dX1CL4pCXNytxIB2U1qp0xZObGMZosJhaQdUlUo= +github.com/Ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd/go.mod h1:u8mVgpDT88IPIt1B+Tu8vkrcFfBKGcfGwS9I7wmvMh0= +github.com/Ullaakut/nmap v0.0.0-20191020025340-830f10551944 h1:DNJrYrcmJHFhjxXuxDqYIlnH3jK1ohjSzEHlI/mk+tc= +github.com/Ullaakut/nmap v0.0.0-20191020025340-830f10551944/go.mod h1:fkC066hwfcoKwlI7DS2ARTggSVtBTZYCjVH1TzuTMaQ= github.com/VividCortex/ewma v1.1.1 h1:MnEK4VOv6n0RSY4vtRe3h11qjxL3+t0B8yOL8iMXdcM= github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -72,6 +78,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -104,12 +111,6 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ullaakut/disgo v0.3.0 h1:2zrEyNBfPRgDVDgzM/qLXZ4Yqt3Lxz7ERvZUSmqSY2M= -github.com/ullaakut/disgo v0.3.0/go.mod h1:UOgLVyqihzJ7yihrHjYZikivT+AHb9NhT3r1OyPCJqg= -github.com/ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd h1:IzJ7V8S7/NXc4aLOj0QavbQZ5Z/Q2RpCifshHoJ5ytA= -github.com/ullaakut/go-curl v0.0.0-20190525093431-597e157bbffd/go.mod h1:FTfXm4jC9Ff1yqc3/HMXCyr+SGO03vJyijJCQlNyF10= -github.com/ullaakut/nmap v0.0.0-20190623040344-bb4f2791e14a h1:Q49G/c/ubeAPvrGGMPM0vt13gFDT5RwC6D0yOYsSjBs= -github.com/ullaakut/nmap v0.0.0-20190623040344-bb4f2791e14a/go.mod h1:4CQy4PqZA4Snk3+MS26+1oAkJ8dCY8kGH6+kF42yajw= github.com/vbauerster/mpb v3.4.0+incompatible h1:mfiiYw87ARaeRW6x5gWwYRUawxaW1tLAD8IceomUCNw= github.com/vbauerster/mpb v3.4.0+incompatible/go.mod h1:zAHG26FUhVKETRu+MWqYXcI70POlC6N8up9p1dID7SU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= diff --git a/loaders_test.go b/loaders_test.go index ff8f354..7d907cb 100644 --- a/loaders_test.go +++ b/loaders_test.go @@ -8,7 +8,7 @@ import ( "os" "testing" - "github.com/ullaakut/disgo" + "github.com/Ullaakut/disgo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/scan.go b/scan.go index a41bae7..1148468 100644 --- a/scan.go +++ b/scan.go @@ -3,7 +3,7 @@ package cameradar import ( "strings" - "github.com/ullaakut/nmap" + "github.com/Ullaakut/nmap" ) // Scan scans the target networks and tries to find RTSP streams within them. diff --git a/scan_test.go b/scan_test.go index e7eacec..1c008d9 100644 --- a/scan_test.go +++ b/scan_test.go @@ -6,11 +6,11 @@ import ( "os" "testing" - "github.com/ullaakut/disgo" + "github.com/Ullaakut/disgo" + "github.com/Ullaakut/nmap" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/ullaakut/nmap" ) type nmapMock struct { diff --git a/scanner.go b/scanner.go index 9a89a2a..8ec8ad4 100644 --- a/scanner.go +++ b/scanner.go @@ -5,14 +5,14 @@ import ( "os" "time" - "github.com/ullaakut/disgo" - "github.com/ullaakut/disgo/style" - curl "github.com/ullaakut/go-curl" + "github.com/Ullaakut/disgo" + "github.com/Ullaakut/disgo/style" + curl "github.com/Ullaakut/go-curl" ) const ( - defaultCredentialDictionaryPath = "${GOPATH}/src/github.com/ullaakut/cameradar/dictionaries/credentials.json" - defaultRouteDictionaryPath = "${GOPATH}/src/github.com/ullaakut/cameradar/dictionaries/routes" + defaultCredentialDictionaryPath = "${GOPATH}/src/github.com/Ullaakut/cameradar/dictionaries/credentials.json" + defaultRouteDictionaryPath = "${GOPATH}/src/github.com/Ullaakut/cameradar/dictionaries/routes" ) // Scanner represents a cameradar scanner. It scans a network and diff --git a/scanner_test.go b/scanner_test.go index 88bd829..838b468 100644 --- a/scanner_test.go +++ b/scanner_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" + curl "github.com/Ullaakut/go-curl" "github.com/stretchr/testify/assert" - curl "github.com/ullaakut/go-curl" ) func TestNew(t *testing.T) { diff --git a/summary.go b/summary.go index 7785e1c..fd797ee 100644 --- a/summary.go +++ b/summary.go @@ -1,8 +1,8 @@ package cameradar import ( - "github.com/ullaakut/disgo/style" - curl "github.com/ullaakut/go-curl" + "github.com/Ullaakut/disgo/style" + curl "github.com/Ullaakut/go-curl" ) // PrintStreams prints information on each stream. diff --git a/summary_test.go b/summary_test.go index 9cb0fbe..84e2422 100644 --- a/summary_test.go +++ b/summary_test.go @@ -4,8 +4,8 @@ import ( "bytes" "testing" + "github.com/Ullaakut/disgo" "github.com/stretchr/testify/assert" - "github.com/ullaakut/disgo" ) var ( diff --git a/tools/dictionary_updater/main.go b/tools/dictionary_updater/main.go index 0799d69..4b34a0f 100644 --- a/tools/dictionary_updater/main.go +++ b/tools/dictionary_updater/main.go @@ -10,10 +10,10 @@ import ( "strings" "sync" - "github.com/ullaakut/disgo/style" + "github.com/Ullaakut/disgo/style" "github.com/PuerkitoBio/goquery" - "github.com/ullaakut/disgo" + "github.com/Ullaakut/disgo" "github.com/vbauerster/mpb" "github.com/vbauerster/mpb/decor" )