Cleaning up code + console output fix for PE files

This commit is contained in:
Michael Weber
2024-07-26 14:29:19 -04:00
parent a537f2dc97
commit e69e80d58b
2 changed files with 2 additions and 4 deletions
-2
View File
@@ -322,8 +322,6 @@ func LoadWithMethod(coffBytes []byte, argBytes []byte, method string) (string, e
bofOutput += msg.(string) + "\n"
}
return bofOutput, nil
return "", fmt.Errorf("could not find default start methods of main or go")
}
func invokeMethod(methodName string, argBytes []byte, parsedCoff *pecoff.File, sectionMap map[string]CoffSection, outChannel chan<- interface{}) {
+2 -2
View File
@@ -52,13 +52,13 @@ func RunExecutable(executableBytes []byte, args []string) (string, error) {
"z", // Invoke default entry point method
"i0", // not using unicode
"i0", // we don't want to disable output
"i0", // we don't want to allocate a console
"i1", // allocating a console so we can capture output
"i0", // don't need to worry about closing handles
"i0", // don't need to worry about freeing libraries
"i1", // don't need to worry about saving
"i0", // not listing PEs
"z", // not unloading any PEs
"z" + "chariot", // setting chariot as our nick() for now
"z", // no need for us to have anything as our nick() for now
"z" + "0", // timestamp doesn't matter
"i0", // linking to PEB
"i0", // unloading is fine