diff --git a/.deepsource.toml b/.deepsource.toml index 5308029..b4522e4 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -10,4 +10,6 @@ enabled = true [[analyzers]] name = "javascript" enabled = true -environment = ["jquery"] \ No newline at end of file + + [analyzers.meta] + environment = ["jquery"] \ No newline at end of file diff --git a/README.md b/README.md index b0cca50..5b5be5a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Documentation Go Report Card Tests - v2.0.1
+ v2.1.0
DeepSource
Centralize and expedite OSINT investigations
View the roadmap
@@ -40,18 +40,21 @@ It is the end user's responsibility to obey all applicable local, state, and fed ### Changelog -Bitcrook v2.0.0 has been released as of October 11, 2023, only one day after v1.0.0 due to some significant changes to project structure. +Bitcrook v2.0.0 has been released as of October 11, 2023, only one day after v1.0.0 due to some significant changes to project structure. Here are some highlights of the recent changes in the v1.0.0 and v2.0.0 releases: + - Switch web framework from Fiber to Go (enabled Bitcrook to be more lightweight) + - Completely revamped the CLI output scheme + - Proper docker implementation + - Binary release to support `go install` + - Switched secret configuration from .json to .env, see [Authentication](#authentication) + - Enabled API key support in web app + - Fixed CORS error when accessing web app over LAN - Username lookup command now only displays valid results - - Packages now grouped based on field type rather than authentication type - Added HaveIBeenPwned breach check to email and domain lookup commands - - Altered .env support, see [Authentication](#authentication) + - Removed Caselaw package due to instability, will replace + - Packages now grouped based on field type rather than authentication type - Fixed tests and some documentation - Bug fixes and general optimizations - - Removed Caselaw package due to instability, will replace - -Although this release hasn't changed much of the foundations of Bitcrook, it does illuminate -a path of where it will be taken next. ### Preview @@ -92,7 +95,7 @@ You can also host the Bitcrook webapp via docker: 1. Navigate to the root directory of Bitcrook via `cd` 2. Build the Docker image: `docker build -t bitcrook .` -3. Run Bitcrook via Docker: `docker run --env-file .env -d -p 6174:6174 bitcrook` +3. Run Bitcrook via Docker: `docker run --env-file .env --name bitcrook -d -p 6174:6174 bitcrook` 4. Access the interface via `http://127.0.0.1:6174` ### Authentication diff --git a/api/api.go b/api/api.go index d0787c7..9923a66 100644 --- a/api/api.go +++ b/api/api.go @@ -18,6 +18,7 @@ limitations under the License. package api import ( + "embed" "fmt" "net/http" "os" @@ -33,13 +34,20 @@ import ( "github.com/labstack/echo/v4/middleware" ) +//go:embed static +var sFiles embed.FS + func StartServer() { e := echo.New() e.HideBanner = true e.HidePort = true - e.Use(middleware.Static("./api/static")) + e.Use(middleware.StaticWithConfig(middleware.StaticConfig{ + Root: "static", + Browse: true, + Filesystem: http.FS(sFiles), + })) e.GET("/ip/:ip", func(c echo.Context) error { ipInfo, err := ip.IPAPILookup(c.Param("ip")) diff --git a/go.mod b/go.mod index 0bc4e9e..f00ae26 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/spf13/cobra v1.7.0 github.com/spf13/viper v1.17.0 - golang.org/x/net v0.16.0 + golang.org/x/net v0.17.0 ) require ( diff --git a/go.sum b/go.sum index 89bbf46..96f2ee4 100644 --- a/go.sum +++ b/go.sum @@ -298,8 +298,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= diff --git a/main.go b/main.go index 59883e5..5fb6c1b 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,7 @@ func main() { fmt.Println(" ___ __________________ ____ ____ __ __") fmt.Println(" / _ )/ _/_ __/ ___/ _ \\/ __ \\/ __ \\/ //_/") fmt.Println(" / _ |/ / / / / /__/ , _/ /_/ / /_/ / ,< ") - fmt.Println("/____/___/ /_/ \\___/_/|_|\\____/\\____/_/|_| " + color.Colorize(color.Green, "v2.0.1")) + fmt.Println("/____/___/ /_/ \\___/_/|_|\\____/\\____/_/|_| " + color.Colorize(color.Green, "v2.1.0")) fmt.Println() fmt.Println("Bitcrook Copyright (C) 2021 Axiom\nThis program comes with ABSOLUTELY NO WARRANTY") fmt.Println()