Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 752 Bytes

interactive-shells.md

File metadata and controls

52 lines (41 loc) · 752 Bytes

Interactive Shells

{% code title="Interactive" %}

/bin/sh -i

{% endcode %}

{% code title="Perl" %}

perl —e 'exec "/bin/sh";'

perl: exec "/bin/sh";

{% endcode %}

{% code title="Ruby" %}

ruby: exec "/bin/sh"

{% endcode %}

{% code title="Lua" %}

lua: os.execute('/bin/sh')

{% endcode %}

{% code title="AWK" %}

awk 'BEGIN {system("/bin/sh")}'

{% endcode %}

{% code title="Using Find / Exec" %}

find / -name nameoffile -exec /bin/awk 'BEGIN {system("/bin/sh")}' \;

find . -exec /bin/sh \; -quit

{% endcode %}

{% code title="Vim" %}

vim -c ':!/bin/sh'

vim
:set shell=/bin/sh
:shell

{% endcode %}