Code Factoring

This commit is contained in:
erwanlr
2013-04-18 11:22:19 +02:00
parent 662d94e958
commit 5a097d429d
7 changed files with 73 additions and 11 deletions

View File

@@ -49,13 +49,9 @@ class WpItem
# however can also be found in their specific plugin dir.
# http://www.exploit-db.com/ghdb/3714/
#
# Only the first 700 bytes are checked to avoid the download
# of the whole file which can be very huge (like 2 Go)
#
# @return [ Boolean ]
def has_error_log?
response_body = Browser.get(error_log_url, headers: {'range' => 'bytes=0-700'}).body
response_body[%r{PHP Fatal error}i] ? true : false
WebSite.has_log?(error_log_url, %r{PHP Fatal error}i)
end
# @return [ String ] The url to the error_log file