Skip to content

Instantly share code, notes, and snippets.

@SleepyLctl
Created December 14, 2017 14:16
Show Gist options
  • Save SleepyLctl/7d0b6dcae06828f322837323d2c83706 to your computer and use it in GitHub Desktop.
Save SleepyLctl/7d0b6dcae06828f322837323d2c83706 to your computer and use it in GitHub Desktop.
Shell Spawning
Shell Spawning
python -c 'import pty; pty.spawn("/bin/sh")'
echo os.system('/bin/bash')
/bin/sh -i
perl —e 'exec "/bin/sh";'
perl: exec "/bin/sh";
ruby: exec "/bin/sh"
lua: os.execute('/bin/sh')
(From within IRB)
exec "/bin/sh"
(From within vi)
:!bash
(From within vi)
:set shell=/bin/bash:shell
(From within nmap)
!sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment