Truncate response data larger than 100K. Fixes issue 463

git-svn-id: https://beef.googlecode.com/svn/trunk@1297 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
A.M.Saafan@gmail.com
2011-09-17 13:04:50 +00:00
parent 68d967f1f4
commit 0362c536e5

View File

@@ -150,10 +150,17 @@ class Requester < BeEF::Extension::AdminUI::HttpController
http_db = H.first(:id => http_id) || nil
raise WEBrick::HTTPStatus::BadRequest, "http object could not be found in the database" if http_db.nil?
if http_db.response_data.length > (1024 * 100) #more thank 100K
response_data = http_db.response_data[0..(1024*100)]
response_data += "\n<---------- Response Data Truncated---------->"
else
response_data = http_db.response_data
end
res = {
'id' => http_db.id,
'request' => http_db.request,
'response' => http_db.response_data,
'response' => response_data,
'response_headers' => http_db.response_headers,
'domain' => http_db.domain,
'port' => http_db.port,