rescue TypeError, ArgumentError

This commit is contained in:
Brendan Coles
2015-06-22 09:35:31 +00:00
parent b646535be3
commit e17a48fae2

View File

@@ -32,7 +32,7 @@ module BeEF
'Content-Type' => 'text/javascript',
'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Methods' => 'POST, GET'
begin
PQ << {
:beefhook => params[:bh],
:stream_id => Integer(params[:sid]),
@@ -40,6 +40,9 @@ module BeEF
:packet_count => Integer(params[:pc]),
:data => params[:d]
}
rescue TypeError, ArgumentError => e
print_error "Hooked browser returned an invalid argument: #{e}"
end
Thread.new {
check_packets()