From 5352a651d4665118bdea84f03339bdeef33af3c9 Mon Sep 17 00:00:00 2001 From: Idar Lund Date: Fri, 15 Jan 2021 23:07:15 +0100 Subject: [PATCH] install curl if it's missing if /usr/bin/curl is not present. install it and log the installation and errors to a file for debugging purposes --- .../library/recon/Telegram-Nmap-to-Telegram/payload.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/payloads/library/recon/Telegram-Nmap-to-Telegram/payload.sh b/payloads/library/recon/Telegram-Nmap-to-Telegram/payload.sh index dd377a0..1ad8908 100644 --- a/payloads/library/recon/Telegram-Nmap-to-Telegram/payload.sh +++ b/payloads/library/recon/Telegram-Nmap-to-Telegram/payload.sh @@ -62,6 +62,13 @@ function setup() { # Create tmp scan directory mkdir -p $SCAN_DIR &> /dev/null + # Install curl if it does not exist + if [ ! -f /usr/bin/curl ]; then + opkg update >> /root/opkgupdate.log 2>&1 + opkg list >> /root/opkglist.log 2>&1 + opkg install curl >> /root/opkginstall.log 2>&1 + fi + # Create tmp scan file if it doesn't exist SCAN_FILE=$SCAN_DIR/scan-count if [ ! -f $SCAN_FILE ]; then