mirror of
https://github.com/peass-ng/PEASS-ng.git
synced 2025-12-05 20:40:08 -08:00
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.
This commit is contained in:
@@ -270,7 +270,7 @@ class MetasploitModule < Msf::Post
|
|||||||
if datastore['CUSTOM_URL'] != ""
|
if datastore['CUSTOM_URL'] != ""
|
||||||
url_peass = datastore['CUSTOM_URL']
|
url_peass = datastore['CUSTOM_URL']
|
||||||
else
|
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
|
end
|
||||||
# If URL is set, check if it is a valid URL or local file
|
# If URL is set, check if it is a valid URL or local file
|
||||||
if url_peass.include?("http://") || url_peass.include?("https://")
|
if url_peass.include?("http://") || url_peass.include?("https://")
|
||||||
|
|||||||
Reference in New Issue
Block a user