diff --git a/cli/defaults.go b/cli/defaults.go
@@ -19,7 +19,7 @@ func GetDefaultCLIOptions() Options {
PEFilePath: "payload.exe",
VersionFilePath: "goversion.json",
BuildType: "exe",
- Persistence: "",
+ Persistence: "",
}
return opts
diff --git a/cli/parser.go b/cli/parser.go
@@ -111,7 +111,7 @@ func GetParser(opts *Options) *cobra.Command {
out.Close()
os.Remove(opts.PEFilePath)
- os.Rename(tmpPath, opts.PEFilePath)
+ tools.MoveFile(tmpPath, opts.PEFilePath)
fmt.Printf("[+] Done !\n")
},
@@ -313,8 +313,8 @@ func GetParser(opts *Options) *cobra.Command {
rootCmd.Flags().VarP(&opts.Encryption, "encryption", "e", "encryption method. (allowed: AES, chacha20, XOR, blowfish)")
rootCmd.Flags().StringVarP(&opts.Key, "key", "k", "", "encryption key, auto-generated if empty. (if used by --encryption)")
rootCmd.Flags().UintVarP(&opts.SleepTime, "sleep-time", "", defaults.SleepTime, "sleep time in seconds before executing loader (default: 0)")
- rootCmd.PersistentFlags().StringVarP(&opts.Persistence, "peristence", "z", defaults.Persistence, "name of the binary being placed in '%APPDATA%' and in 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run' reg key (default: \"\")")
-
+ rootCmd.PersistentFlags().StringVarP(&opts.Persistence, "peristence", "z", defaults.Persistence, "name of the binary being placed in '%APPDATA%' and in 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run' reg key (default: \"\")")
+
spoofMetadata.Flags().StringVarP(&opts.PEFilePath, "pe", "p", defaults.PEFilePath, "PE file to spoof")
spoofMetadata.Flags().StringVarP(&opts.VersionFilePath, "file", "f", defaults.VersionFilePath, "manifest file path (as JSON)")
diff --git a/cli/types.go b/cli/types.go
@@ -94,8 +94,7 @@ type Options struct {
// Sleep time before running execution
SleepTime uint
-
- // Registry-Persistence handler
+ // Registry-Persistence handler
Persistence string
// Goversion filepath
| | |