Skip to content

Commit 6877f39

Browse files
authored
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.
1 parent d75525e commit 6877f39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metasploit/peass.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def load_peass
270270
if datastore['CUSTOM_URL'] != ""
271271
url_peass = datastore['CUSTOM_URL']
272272
else
273-
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"
273+
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"
274274
end
275275
# If URL is set, check if it is a valid URL or local file
276276
if url_peass.include?("http://") || url_peass.include?("https://")

0 commit comments

Comments
 (0)