Skip to content

Commit

Permalink
very good
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyc-bsi committed Nov 26, 2024
1 parent 5d80c9b commit 6422474
Show file tree
Hide file tree
Showing 41 changed files with 921 additions and 22,687 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/go-builder.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ node_modules/
dist/
build/
bin/
ui
ui
electron-build/
nmb-electron/
package-lock.json
package.json.md5
44 changes: 19 additions & 25 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
#!/bin/bash
set -e

echo "cleaning out the bin directory"
echo "🚀 Starting optimized build process..."

rm -rf bin
# Clean up old builds
echo "🧹 Cleaning up old builds..."
rm -rf bin/*
rm -rf ui-core/build
rm -rf build

cd nmb-electron
# Optimize React build
echo "⚡ Optimizing React build..."
cd ui-core
GENERATE_SOURCEMAP=false REACT_APP_ENV=production npm run build
cd ..

# Build the Electron app
npm run build:all
# Build for Linux with optimizations
echo "🐧 Building for Linux..."
CGO_ENABLED=1 ~/go/bin/wails build -platform linux/amd64 -o ../bin/nmb -ldflags="-s -w"

cd dist
# Build for Windows with optimizations
echo "🪟 Building for Windows..."
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 ~/go/bin/wails build -platform windows/amd64 -o ../bin/nmb.exe -ldflags="-s -w"

mv NMB-Electron-1.0.0.AppImage ../../cmd/ui/linux/ui
mv "NMB-Electron 1.0.0.exe" ../../cmd/ui/windows/ui.exe

printf "Electron Build completed"

cd ../../

# Build the Go binary
echo ""
printf "Building the Go binary"
echo ""
# For Windows
GOOS=windows go build -o bin/nmb.exe ./cmd

# For Linux
GOOS=linux go build -o bin/nmb ./cmd

echo ""
printf "Go binary build completed"
echo "✅ Build complete!"
83 changes: 0 additions & 83 deletions cmd/main_common.go

This file was deleted.

13 changes: 0 additions & 13 deletions cmd/main_linux.go

This file was deleted.

13 changes: 0 additions & 13 deletions cmd/main_windows.go

This file was deleted.

4 changes: 3 additions & 1 deletion docs/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ Examples:
./nmb -n nessus-export.csv -p client_name -remote -user <username> -password <password>
./nmb -n nessus-export.csv -p client_name -remote 192.168.1.1 -user <username> -key ~/.id_rsa


Nessus Controller Mode:
./nmb -mode deploy -remote 192.168.1.10 -user admin -password secret -name TestScan -targets hosts.txt
./nmb -mode create -remote 192.168.1.10 -user admin -password secret -name TestScan -targets hosts.txt -discovery
./nmb -mode launch -remote 192.168.1.10 -user admin -password secret -name TestScan

UI Mode:
nmb serve

```
22 changes: 22 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,57 @@ require (
github.com/gin-contrib/cors v1.7.2
github.com/gin-gonic/gin v1.10.0
github.com/gorilla/websocket v1.5.3
github.com/wailsapp/wails/v2 v2.9.2
golang.org/x/crypto v0.29.0
)

require golang.org/x/sys v0.27.0 // indirect

require (
github.com/bep/debounce v1.2.1 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/labstack/echo/v4 v4.10.2 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/leaanthony/go-ansi-parser v1.6.0 // indirect
github.com/leaanthony/gosod v1.0.3 // indirect
github.com/leaanthony/slicer v1.6.0 // indirect
github.com/leaanthony/u v1.1.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/tkrajina/go-reflector v0.5.6 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/wailsapp/go-webview2 v1.0.16 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/text v0.20.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
Expand Down
Loading

0 comments on commit 6422474

Please sign in to comment.