From 23eab81d2a7badfd0cea312c810a7e18c0d1de72 Mon Sep 17 00:00:00 2001 From: Sergey Gorbaty Date: Thu, 21 Aug 2014 11:22:19 -0700 Subject: [PATCH] Improved prompt module to include default text supported by Phonegap 2.8 --- modules/phonegap/phonegap_prompt_user/command.js | 5 ++++- modules/phonegap/phonegap_prompt_user/module.rb | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/phonegap/phonegap_prompt_user/command.js b/modules/phonegap/phonegap_prompt_user/command.js index db493d6d0..d75906fb8 100644 --- a/modules/phonegap/phonegap_prompt_user/command.js +++ b/modules/phonegap/phonegap_prompt_user/command.js @@ -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 ); }); diff --git a/modules/phonegap/phonegap_prompt_user/module.rb b/modules/phonegap/phonegap_prompt_user/module.rb index bb9fb7ff4..7fbf940a1 100644 --- a/modules/phonegap/phonegap_prompt_user/module.rb +++ b/modules/phonegap/phonegap_prompt_user/module.rb @@ -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