Remove randomized_compile_c
parent
38b2a21e90
commit
856b7e3d0c
|
@ -1,26 +0,0 @@
|
|||
msfbase = __FILE__
|
||||
while File.symlink?(msfbase)
|
||||
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))
|
||||
end
|
||||
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), '..', '..', 'lib')))
|
||||
|
||||
require 'msf/core'
|
||||
require 'metasploit/framework/compiler/windows'
|
||||
|
||||
template = %Q|
|
||||
#define CONTENT "HELLO WORLD"
|
||||
#define TITLE "HI"
|
||||
#include <Windows.h>
|
||||
|
||||
void TryHelloWorld() {
|
||||
MessageBox(NULL, CONTENT, TITLE, MB_OK);
|
||||
}
|
||||
|
||||
int main() {
|
||||
TryHelloWorld();
|
||||
return 0;
|
||||
}|
|
||||
|
||||
out_file = '/tmp/helloworld.exe'
|
||||
Metasploit::Framework::Compiler::Windows.compile_random_c_to_file(out_file, template)
|
||||
puts "saved as #{out_file}"
|
Loading…
Reference in New Issue