Updated proxy for AR

This commit is contained in:
Ben Passmore
2019-11-30 15:20:03 +10:00
parent 97ab3625f5
commit 7c2a56945c
2 changed files with 5 additions and 5 deletions

View File

@@ -137,10 +137,10 @@ module BeEF
# Wait for the HTTP response to be stored in the db.
# TODO: re-implement this with EventMachine or with the Observer pattern.
while H.first(:id => http.id).has_ran != "complete"
while H.find(http.id).has_ran != "complete"
sleep 0.5
end
@response = H.first(:id => http.id)
@response = H.find(http.id)
print_debug "[PROXY] <-- Response for request ##{@response.id} to [#{@response.path}] on domain [#{@response.domain}:#{@response.port}] correctly processed"
response_body = @response['response_data']
@@ -191,7 +191,7 @@ module BeEF
end
def get_tunneling_proxy
proxy_browser = HB.first(:is_proxy => true)
proxy_browser = HB.where(:is_proxy => true).first
unless proxy_browser.nil?
return proxy_browser.session.to_s
end

View File

@@ -35,8 +35,8 @@ module BeEF
result['success'] = false
return result.to_json if hb_id.nil?
hooked_browser = @hb.first(:session => hb_id)
previous_proxy_hb = @hb.first(:is_proxy => true)
hooked_browser = @hb.where(:session => hb_id).first
previous_proxy_hb = @hb.where(:is_proxy => true).first
# if another HB is currently set as tunneling proxy, unset it
unless previous_proxy_hb.nil?