From bc489fef910855894a441fee576cf8d1c190527c Mon Sep 17 00:00:00 2001 From: sjanusz Date: Wed, 4 May 2022 15:03:34 +0100 Subject: [PATCH] Update PiHole module to not wait for sudo input --- modules/exploits/linux/local/pihole_remove_commands_lpe.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/exploits/linux/local/pihole_remove_commands_lpe.rb b/modules/exploits/linux/local/pihole_remove_commands_lpe.rb index c23182e2ce..5b77132273 100644 --- a/modules/exploits/linux/local/pihole_remove_commands_lpe.rb +++ b/modules/exploits/linux/local/pihole_remove_commands_lpe.rb @@ -63,11 +63,11 @@ class MetasploitModule < Msf::Exploit::Local end def sudo_pihole - 'sudo /usr/local/bin/pihole -a' + 'sudo -n /usr/local/bin/pihole -a' end def pihole_version - version = cmd_exec('sudo /usr/local/bin/pihole -v') + version = cmd_exec('sudo -n /usr/local/bin/pihole -v') /Pi-hole version is v([^ ]+)/ =~ version Rex::Version.new(Regexp.last_match(1)) end