From 4126a5530e62b82e33c7e62521832aa8abb6eb83 Mon Sep 17 00:00:00 2001 From: antisnatchor Date: Sat, 21 Mar 2015 12:20:07 +0100 Subject: [PATCH] Fixed bug in forge_request that was not adding the POST body to forged requests. --- core/main/client/net.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/main/client/net.js b/core/main/client/net.js index 15b6268f4..49413d200 100644 --- a/core/main/client/net.js +++ b/core/main/client/net.js @@ -287,6 +287,10 @@ beef.net = { * - allowCrossDomain: set cross-domain requests as allowed or blocked * * forge_request is used mainly by the Requester and Tunneling Proxy Extensions. + * Example usage: + * beef.net.forge_request("http", "POST", "172.20.40.50", 8080, "/lulz", + * true, null, { foo: "bar" }, 5, 'html', false, null, function(response) { + * alert(response.response_body)}) */ forge_request: function (scheme, method, domain, port, path, anchor, headers, data, timeout, dataType, allowCrossDomain, requestid, callback) { @@ -362,6 +366,8 @@ beef.net = { } }, + data: data, + // http server responded successfully success: function (data, textStatus, xhr) { var end_time = new Date().getTime();