From 2a6bbc2b4dbb3cc0e53a4c36bdf2cac639fb9201 Mon Sep 17 00:00:00 2001 From: jm33-m0 Date: Mon, 29 Jan 2024 13:49:23 +0800 Subject: [PATCH] refactor --- core/cmd/cc/main.go | 2 +- core/lib/cc/buildAgent.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/cmd/cc/main.go b/core/cmd/cc/main.go index 0b9199aec..ff24e8f94 100644 --- a/core/cmd/cc/main.go +++ b/core/cmd/cc/main.go @@ -43,7 +43,7 @@ func init_magic_str() { } if strings.HasPrefix(f.Name(), "stub-") { err = util.ReplaceBytesInFile(fmt.Sprintf("%s/%s", cc.EmpWorkSpace, f.Name()), - []byte(default_magic_str), []byte(emp3r0r_data.OneTimeMagicBytes)) + default_magic_str, emp3r0r_data.OneTimeMagicBytes) if err != nil { cc.CliPrintError("init_magic_str %v", err) } diff --git a/core/lib/cc/buildAgent.go b/core/lib/cc/buildAgent.go index dd506d3f2..27ead58b5 100644 --- a/core/lib/cc/buildAgent.go +++ b/core/lib/cc/buildAgent.go @@ -134,7 +134,7 @@ func GenAgent() (agent_binary_path string) { // done CliPrintSuccess("Generated %s from %s and %s, you can run %s on arbitrary target", outfile, stubFile, EmpConfigFile, outfile) - CliPrintDebug("Magic string is %x", sep) + CliPrintDebug("OneTimeMagicBytes is %x", emp3r0r_data.OneTimeMagicBytes) agent_binary_path = outfile // pack it with upx