Improved prompt module to include default text supported by Phonegap 2.8

This commit is contained in:
Sergey Gorbaty
2014-08-21 11:22:19 -07:00
parent 9942edc118
commit 23eab81d2a
2 changed files with 11 additions and 2 deletions

View File

@@ -12,6 +12,8 @@ beef.execute(function() {
var ans_yes = "<%== @ans_yes %>";
var ans_no = "<%== @ans_no %>";
var result = '';
var def_text = "<%== @text %>";
function onPrompt(results) {
@@ -23,7 +25,8 @@ beef.execute(function() {
question,
onPrompt,
title,
[ans_yes,ans_no]
[ans_yes,ans_no],
def_text
);
});

View File

@@ -20,7 +20,7 @@ class Phonegap_prompt_user < BeEF::Core::Command
'name' => 'question',
'description' => 'Prompt question',
'ui_label'=>'Question',
'value' => 'Please enter your Apple ID',
'value' => 'Please enter your Apple ID password',
'width' => '300px'
},{
'name' => 'ans_yes',
@@ -34,6 +34,12 @@ class Phonegap_prompt_user < BeEF::Core::Command
'ui_label'=>'No',
'value' => 'Cancel',
'width' => '100px'
},{
'name' => 'text',
'description' => 'Default text to display',
'ui_label'=>'Default text',
'value' => 'Password',
'width' => '100px'
}]
end