Remove randomized_compile_c

This commit is contained in:
Wei Chen 2018-06-29 00:09:28 -05:00
parent 38b2a21e90
commit 856b7e3d0c
1 changed files with 0 additions and 26 deletions

View File

@ -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}"