-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Command Module API
Jess Williams edited this page Jan 1, 2020
·
6 revisions
This page details the Command Module API
The framework allows command modules to set and get details about the hooked browser. Details set from the results of one module may be used to better target another. The base class BeEF::Command
has the two more methods: set_browser_details()
and get_browser_detail()
.
For example, a module might use get_browser_detail('UA')
which returns the user agent. Then the code may vary to better target the browser.
Adding the following code to the alert module will demonstrate the usage of the Command Module API.
def pre_send
browser_name = get_browser_detail('BrowserName')
@datastore['text'] = 'your browser is (' + browser_name + '): ' + @datastore['text']
end
def callback
content = {}
content['User Response'] = "The user clicked the 'OK' button when presented with an alert box saying: '"
content['User Response'] += @datastore['text'] + "'"
set_browser_detail("OKDialog", "User Clicks OK")
save content
end
- Configuration
- Interface
- Information Gathering
- Social Engineering
- Network Discovery
- Metasploit
- Tunneling
- XSS Rays
- Persistence
- Creating a Module
- Geolocation
- Using-BeEF-With-NGROK