Skip to content

Commit

Permalink
fix: gen_agent: build stub.exe first
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Mar 17, 2022
1 parent 08cfb6a commit ae01a32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/lib/cc/buildAgent.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package cc
import (
"fmt"
"io/ioutil"
"strconv"

emp3r0r_data "github.com/jm33-m0/emp3r0r/core/lib/data"
"github.com/jm33-m0/emp3r0r/core/lib/tun"
Expand All @@ -14,8 +13,13 @@ func GenAgent() {
buildJSONFile := EmpRoot + "/emp3r0r.json"
stubFile := EmpRoot + "/stub.exe"
outfile := EmpRoot + "/agent.exe"
CliPrintWarning("Make sure %s and %s exist, and %s must NOT be packed",
buildJSONFile, stubFile, strconv.Quote(stubFile))

CliPrintInfo("Please anwser a few questions in the new tmux window, come back here when you are done")
err := TmuxNewWindow("gen-agent", "./build.py --target agent")
if err != nil {
CliPrintError("Something went wrong, please check build.py's output")
return
}

// read file
jsonBytes, err := ioutil.ReadFile(buildJSONFile)
Expand Down

0 comments on commit ae01a32

Please sign in to comment.