yeungalan há 5 anos atrás
pai
commit
6ecf88fa4f
3 ficheiros alterados com 5 adições e 6 exclusões
  1. BIN
      __debug_bin
  2. 5 6
      main.go
  3. BIN
      vnet.exe

BIN
__debug_bin


+ 5 - 6
main.go

@@ -27,11 +27,10 @@ func main() {
 	time.Sleep(2 * time.Second)
 
 	// type IP
-	/*
-		IPAddress := net.ParseIP(os.Args[2])
-		SubNet := net.ParseIP(os.Args[3])
-		GateW := net.ParseIP(os.Args[4])
-	*/
+
+	IPAddress := net.ParseIP(os.Args[2])
+	SubNet := net.ParseIP(os.Args[3])
+	GateW := net.ParseIP(os.Args[4])
 
 	//create fucking DHCP IP
 	err := tun.SetDHCPMasq(IPAddress, SubNet, GateW, net.IP([]byte{0, 0, 0, 0}))
@@ -98,7 +97,7 @@ func rcv(w http.ResponseWriter, req *http.Request) {
 	}
 	data, err := hex.DecodeString(x[0])
 	if err != nil {
-		panic(err)
+		log.Println(err)
 	}
 	log.Println("RECV<<", dde(data))
 	tun.Write(dde(data))

BIN
vnet.exe