peass-ng/PEASS-ng · error · RuntimeError
Something failed downloading PEASS script from #{url_peass}
Error message
Something failed downloading PEASS script from #{url_peass} What it means
After parsing and fetching the PEASS URL, the module checks that the downloaded body is at least 500 characters and raises this error otherwise. A tiny body means the fetch did not return the real PEASS binary/script — typically an error page, redirect notice, or empty response.
Source
Thrown at metasploit/peass.rb:284
# Load the PEASS script from a local file or from Internet
peass_script = ""
url_peass = ""
# If no URL is set, use the default one
if datastore['CUSTOM_URL'] != ""
url_peass = datastore['CUSTOM_URL']
else
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://")
target = URI.parse url_peass
raise 'Invalid URL' unless target.scheme =~ /https?/
raise 'Invalid URL' if target.host.to_s.eql? ''
res = fetch(target)
peass_script = res.body
raise "Something failed downloading PEASS script from #{url_peass}" if peass_script.length < 500
else
raise "PEASS local file (#{url_peass}) does not exist!" unless ::File.exist?(url_peass)
peass_script = File.read(url_peass)
raise "Something falied reading PEASS script from #{url_peass}" if peass_script.length < 500
end
return peass_script
end
def aes_enc_peass(peass_script)
# Encrypt the PEASS script with AES (CBC Mode)
key = datastore["PASSWORD"]
iv = OpenSSL::Cipher::Cipher.new('aes-256-cbc').random_iv
c = OpenSSL::Cipher.new('aes-256-cbc').encrypt
c.iv = iv
c.key = keyView on GitHub (pinned to 53fb989abc)
Solutions
- Open the URL in a browser or 'curl -s <url> | wc -c' and verify it returns the actual PEASS file (>500 bytes)
- Fix the web server path/permissions so the real file is served instead of an error page
- Re-upload the correct linpeas.sh/winPEASany_ofs.exe to your hosting server
- Bypass or correctly configure the proxy that is returning an interception/block page
- Clear CUSTOM_URL to fall back to the official GitHub release download
Example fix
# before set CUSTOM_URL http://10.0.0.5/peass.sh # serves 404 page # after # copy the real file to the webroot, then set CUSTOM_URL http://10.0.0.5/linpeas.sh
Defensive patterns
Strategy: validation
Validate before calling
body = Net::HTTP.get_response(URI(url)).body raise 'URL does not serve the PEASS payload' if body.nil? || body.length < 500
Try / catch
begin
res = fetch(target)
raise 'empty response' if res.nil? || res.body.to_s.length < 500
rescue StandardError => e
print_error("PEASS download failed: #{e.message}; verify the URL serves the real file")
end Prevention
- Verify with 'curl -sI <url>' that the file is served with 200 and a plausible size
- Host the genuine release file, not a redirect or placeholder
- Bypass misconfigured proxies/TLS interceptors
- Prefer the default GitHub release URL over custom hosting
When it happens
Trigger: fetch(target) succeeds at HTTP level but returns a body < 500 bytes: a 404/403 HTML error page served with 200, an auth/captive-portal page, a truncated response, or an empty proxy response.
Common situations: Hosting linpeas.sh on a web server that returns a login redirect or 404 page with status 200; a proxy/firewall injecting a block page; GitHub rate limiting; uploading a placeholder file to a local web server; TLS-intercepting appliance returning a notice page.
Related errors
- Neither curl nor wget were found in victim, unset the SRVHOS
- Invalid URL, too many HTTP redirects
- openssl not found on victim, unset the password of the modul
- base64 not found on victim, set a 32B length password!
- Invalid URL
AI-assisted analysis of peass-ng/PEASS-ng@53fb989abc (2026-09-02).
Data as JSON: /api/errors/7933fa75c0ae1624.
Report an issue: GitHub.