Updated the code to be compatible with Rack3
This commit is contained in:
@@ -70,7 +70,11 @@ module BeEF
|
||||
res = JSON.parse(b64).first
|
||||
res['beefhook'] = packet[:beefhook]
|
||||
res['request'] = request
|
||||
res['beefsession'] = request[BeEF::Core::Configuration.instance.get('beef.http.hook_session_name')]
|
||||
session_key = BeEF::Core::Configuration.instance.get('beef.http.hook_session_name')
|
||||
res['beefsession'] = request.cookies[session_key] ||
|
||||
request.params[session_key] ||
|
||||
request.env[session_key]
|
||||
|
||||
execute(res)
|
||||
rescue JSON::ParserError => e
|
||||
print_debug 'Network stack could not decode packet stream.'
|
||||
|
||||
Reference in New Issue
Block a user