From f11ffe337f3e303a17e921f4fd6ef5933dfae7de Mon Sep 17 00:00:00 2001 From: d3vyce Date: Wed, 15 Feb 2023 15:50:51 -0500 Subject: [PATCH] Simplify if statement --- pentools.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pentools.sh b/pentools.sh index a057160..bd5d278 100755 --- a/pentools.sh +++ b/pentools.sh @@ -88,20 +88,17 @@ software() { printf ${GREEN}"[+] nuclei\n" sudo apt install nuclei -y >/dev/null 2>&1 - if ! command -v go &> /dev/null - then + if ! command -v go &> /dev/null; then printf ${RED}"[x] Missing Go, skipping install of Fuff, Chisel and Nuclei...\n" else - if ! command -v ffuf &> /dev/null - then + if ! command -v ffuf &> /dev/null; then printf ${GREEN}"[+] ffuf\n" go install github.com/ffuf/ffuf@latest >/dev/null 2>&1 else printf ${ITALIC_LIGHT_CYAN}"[~] ffuf is already installed, skipping...\n" fi - if ! command -v chisel &> /dev/null - then + if ! command -v chisel &> /dev/null; then printf ${GREEN}"[+] chisel\n" go install github.com/jpillora/chisel@latest >/dev/null 2>&1 else @@ -109,12 +106,10 @@ software() { fi fi - if ! command -v pip &> /dev/null - then + if ! command -v pip &> /dev/null; then printf ${RED}"[x] Missing Pip, skipping install of PwnCat...\n" else - if ! command -v pwncat-cs &> /dev/null - then + if ! command -v pwncat-cs &> /dev/null; then printf ${GREEN}"[+] pwncat-cs\n" sudo pip install pwncat-cs >/dev/null 2>&1 else