From db82f74b42e054a600814d5ec39a1f2af55af796 Mon Sep 17 00:00:00 2001 From: Armada <73616858+Armada3334@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:48:46 -0400 Subject: [PATCH] Update nmapAutomator.sh Fix syntax for ldapsearch --- nmapAutomator.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nmapAutomator.sh b/nmapAutomator.sh index 9c55af3..bd9ca4a 100755 --- a/nmapAutomator.sh +++ b/nmapAutomator.sh @@ -676,8 +676,8 @@ reconRecommend() { printf "${NC}\n" printf "${YELLOW}ldap Recon:\n" printf "${NC}\n" - echo "ldapsearch -x -h \"${HOST}\" -s base | tee \"recon/ldapsearch_${HOST}.txt\"" - echo "ldapsearch -x -h \"${HOST}\" -b \"\$(grep rootDomainNamingContext \"recon/ldapsearch_${HOST}.txt\" | cut -d ' ' -f2)\" | tee \"recon/ldapsearch_DC_${HOST}.txt\"" + echo "ldapsearch -x -H \"ldap://${HOST}\" -s base | tee \"recon/ldapsearch_${HOST}.txt\"" + echo "ldapsearch -x -H \"ldap://${HOST}\" -b \"\$(grep rootDomainNamingContext \"recon/ldapsearch_${HOST}.txt\" | cut -d ' ' -f2)\" | tee \"recon/ldapsearch_DC_${HOST}.txt\"" echo "nmap -Pn -p 389 --script ldap-search --script-args 'ldap.username=\"\$(grep rootDomainNamingContext \"recon/ldapsearch_${HOST}.txt\" | cut -d \\" \\" -f2)\"' \"${HOST}\" -oN \"recon/nmap_ldap_${HOST}.txt\"" echo fi