Update structs to allow uploading files
This commit is contained in:
parent
65860664b6
commit
a16b7c1720
13
cmd/root.go
13
cmd/root.go
|
@ -16,20 +16,9 @@ var cfgFile string
|
||||||
// rootCmd represents the base command when called without any subcommands
|
// rootCmd represents the base command when called without any subcommands
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "tiamat",
|
Use: "tiamat",
|
||||||
Short: "A brief description of your application",
|
Short: "Command & Control server written in Go",
|
||||||
Long: `A longer description that spans multiple lines and likely contains
|
|
||||||
examples and usage of using your application. For example:
|
|
||||||
|
|
||||||
Cobra is a CLI library for Go that empowers applications.
|
|
||||||
This application is a tool to generate the needed files
|
|
||||||
to quickly create a Cobra application.`,
|
|
||||||
// Uncomment the following line if your bare application
|
|
||||||
// has an action associated with it:
|
|
||||||
// Run: func(cmd *cobra.Command, args []string) { },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute adds all child commands to the root command and sets flags appropriately.
|
|
||||||
// This is called by main.main(). It only needs to happen once to the rootCmd.
|
|
||||||
func Execute() {
|
func Execute() {
|
||||||
err := rootCmd.Execute()
|
err := rootCmd.Execute()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -34,10 +34,10 @@ type Instructions struct {
|
||||||
|
|
||||||
IsKillswitch bool
|
IsKillswitch bool
|
||||||
|
|
||||||
// IsDownload bool
|
IsDownload bool
|
||||||
// IsUpload bool
|
IsUpload bool
|
||||||
// FileName string
|
FileName string
|
||||||
// FileContents []byte
|
FileContents []byte
|
||||||
|
|
||||||
IsListFiles bool
|
IsListFiles bool
|
||||||
Path string
|
Path string
|
||||||
|
@ -49,9 +49,10 @@ type Response struct {
|
||||||
Successful bool
|
Successful bool
|
||||||
Message string
|
Message string
|
||||||
|
|
||||||
// IsUpload bool
|
IsDownload bool
|
||||||
// FileName string
|
IsUpload bool
|
||||||
// FileContents []byte
|
FileName string
|
||||||
|
FileContents []byte
|
||||||
|
|
||||||
IsListFiles bool
|
IsListFiles bool
|
||||||
FileList
|
FileList
|
||||||
|
|
Loading…
Reference in New Issue