From 6877f39193c053ee1a867bb63560cc1a42dace61 Mon Sep 17 00:00:00 2001 From: "Max K." <40246850+sttlr@users.noreply.github.com> Date: Tue, 28 Oct 2025 13:19:03 +0200 Subject: [PATCH] Fix: LinPEASS doesn't run via metasploit module If you set "WINPEASS" to "false" - it's a string, and therefore "true". So it would run WinPEASS anyway. The fix converts value of the variable to string before comparing it. --- metasploit/peass.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metasploit/peass.rb b/metasploit/peass.rb index 30e8eac..f65f378 100644 --- a/metasploit/peass.rb +++ b/metasploit/peass.rb @@ -270,7 +270,7 @@ class MetasploitModule < Msf::Post if datastore['CUSTOM_URL'] != "" url_peass = datastore['CUSTOM_URL'] else - url_peass = datastore['WINPEASS'] ? "https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASany_ofs.exe" : "https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh" + url_peass = datastore['WINPEASS'].to_s.strip.downcase == 'true' ? "https://github.com/peass-ng/PEASS-ng/releases/latest/download/winPEASany_ofs.exe" : "https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh" end # If URL is set, check if it is a valid URL or local file if url_peass.include?("http://") || url_peass.include?("https://")