Forked from xntrik/how beef gathers browser details on initialization
Created
March 26, 2017 15:19
-
-
Save Malayke/c5139126ab4600a9a869961618a8756d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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