github.com/n00py/Slackor@v0.0.0-20200610224921-d007fcea1740/pkg/common/kill.go (about)

     1  package common
     2  
     3  import (
     4  	"os"
     5  
     6  	"github.com/n00py/Slackor/pkg/command"
     7  )
     8  
     9  // Kill kills the implant process
    10  type Kill struct{}
    11  
    12  // Name is the name of the command
    13  func (k Kill) Name() string {
    14  	return "kill"
    15  }
    16  
    17  // Run kills the implant process
    18  func (k Kill) Run(clientID string, jobID string, args []string) (string, error) {
    19  	// TODO: Check if launched from a persistence method first and auto-run cleanup?
    20  	os.Exit(0)
    21  	return "", nil
    22  }
    23  
    24  func init() {
    25  	command.RegisterCommand(Kill{})
    26  }