/* Copyright © 2023 NAME HERE */ package cmd import ( _ "embed" "fmt" "github.com/spf13/cobra" ) //go:embed jscript.gojs var jscriptTmpl string // jscriptCmd represents the jscript command var jscriptCmd = &cobra.Command{ Use: "jscript [flags] payload", Short: "Wraps your payload into a JScript file with optional Decoy", Long: `JScript is a native Scripting language to Windows without the security features of Powershell, but much more powerful than CMD, being essentially a funky version of Javascript Example: trojantool jscript --output Invoice.pdf.js --decoy Invoice.pdf meterpreter.exe `, Run: func(cmd *cobra.Command, args []string) { fmt.Println("jscript called") }, } func init() { rootCmd.AddCommand(jscriptCmd) // Here you will define your flags and configuration settings. jscriptCmd.Flags().String("output", "Document.pdf.js", "This is the Name of the Output file") jscriptCmd.Flags().String("decoy", "", "Name of the Decoy file, e.g. Invoice.pdf") }