Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xntrik/6331a443a762779c64eb927f71112c4c to your computer and use it in GitHub Desktop.
Save xntrik/6331a443a762779c64eb927f71112c4c to your computer and use it in GitHub Desktop.
Most of the logic resides in https://github.com/beefproject/beef/tree/master/core/main/client
https://github.com/beefproject/beef/blob/master/core/main/client/beef.js establishes the beef object in the browser's DOM
window.onload then runs beef_init() https://github.com/beefproject/beef/blob/master/core/main/client/init.js#L24
Within beef_init() we run beef.net.browser_details() https://github.com/beefproject/beef/blob/master/core/main/client/init.js#L67
Within beef.net.browser_details() we gather response from beef.browser.getDetails() https://github.com/beefproject/beef/blob/master/core/main/client/net.js#L503
getDetails() is where all the passively available information is gathered https://github.com/beefproject/beef/blob/master/core/main/client/browser.js#L2564
You can see there's a LOT of wrapping to other JS functions in here, such as:
var browser_plugins = beef.browser.getPlugins(); https://github.com/beefproject/beef/blob/master/core/main/client/browser.js#L2586
if (has_web_socket) details['HasWebSocket'] = has_web_socket; https://github.com/beefproject/beef/blob/master/core/main/client/browser.js#L2650
After this is returned back into beef.net.browser_details(), it is packaged up, and sent to the beef server at /init endpoint.
Most of the logic for checking individual components is within the https://github.com/beefproject/beef/blob/master/core/main/client/browser.js file
It's presented in the admin ui, which is mostly codified as ExtJS in .. that particular tab is in https://github.com/beefproject/beef/blob/master/extensions/admin_ui/media/javascript/ui/panel/tabs/ZombieTabDetails.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment