New alert user module
This commit is contained in:
27
modules/phonegap/phonegap_alert_user/command.js
Normal file
27
modules/phonegap/phonegap_alert_user/command.js
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
// Phonegap_alert_user
|
||||
//
|
||||
beef.execute(function() {
|
||||
var title = "<%== @title %>";
|
||||
var message = "<%== @message %>";
|
||||
var buttonName = "<%== @buttonName %>";
|
||||
|
||||
|
||||
function onAlert() {
|
||||
result = "Alert dismissed";
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
|
||||
}
|
||||
|
||||
navigator.notification.alert(
|
||||
message,
|
||||
onAlert,
|
||||
title,
|
||||
buttonName
|
||||
);
|
||||
|
||||
});
|
||||
17
modules/phonegap/phonegap_alert_user/config.yaml
Normal file
17
modules/phonegap/phonegap_alert_user/config.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
# Phonegap_prompt_user
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
phonegap_alert_user:
|
||||
enable: true
|
||||
category: "Phonegap"
|
||||
name: "Alert User"
|
||||
description: "Show user an alert"
|
||||
authors: ["staregate"]
|
||||
target:
|
||||
working: ["All"]
|
||||
39
modules/phonegap/phonegap_alert_user/module.rb
Normal file
39
modules/phonegap/phonegap_alert_user/module.rb
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
# Phonegap_prompt_user
|
||||
#
|
||||
|
||||
class Phonegap_alert_user < BeEF::Core::Command
|
||||
|
||||
def self.options
|
||||
return [{
|
||||
'name' => 'title',
|
||||
'description' => 'Alert title',
|
||||
'ui_label'=>'Title',
|
||||
'value' => 'Beef',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'message',
|
||||
'description' => 'Message',
|
||||
'ui_label'=>'Message',
|
||||
'value' => 'Game over!',
|
||||
'width' => '300px'
|
||||
},{
|
||||
'name' => 'buttonName',
|
||||
'description' => 'Default button name',
|
||||
'ui_label'=>'Button name',
|
||||
'value' => 'Done',
|
||||
'width' => '100px'
|
||||
}]
|
||||
end
|
||||
|
||||
def callback
|
||||
content = {}
|
||||
content['Result'] = @datastore['result']
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user