summaryrefslogtreecommitdiff
path: root/back/main.go
diff options
context:
space:
mode:
authorPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-07-19 20:13:23 +0500
committerPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-07-19 20:13:23 +0500
commitb3ea7a0ffcc24a3363d6fb507812438fe0d1ff16 (patch)
tree75cd964efc9a68338b0d5ab65f8bcadaf0730dea /back/main.go
init
Diffstat (limited to 'back/main.go')
-rw-r--r--back/main.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/back/main.go b/back/main.go
new file mode 100644
index 0000000..e70888d
--- /dev/null
+++ b/back/main.go
@@ -0,0 +1,27 @@
+package main
+
+import (
+ socket "botnet/Socket"
+ "fmt"
+ "net/http"
+ "os"
+)
+
+func main() {
+ if (len(os.Args) <= 1) {
+ fmt.Printf("Please, provide an argument!\n")
+ return
+ }
+ fmt.Printf("arg: %s\n", os.Args[1])
+
+ socket.Init()
+ if err := socket.ReadMod(); err != nil {
+ fmt.Printf("Failed to load WASM module: %s\n", err.Error())
+ return
+ }
+ socket.RegisterEndpoints()
+
+ if err := http.ListenAndServe(":6969", nil); err != nil {
+ fmt.Printf("Server has crashed: %s", err.Error())
+ }
+}