demo stuff

git-svn-id: file:///home/svn/incoming/trunk@2414 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Miller 2005-04-18 02:41:13 +00:00
parent bb4b94a113
commit 9ea2b1f1c1
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/usr/bin/ruby -I../../lib
require 'Rex/Post'
class DemoClient
def initialize(host, port)
self.sock = TCPSocket.new(host, port)
self.client = Rex::Post::Meterpreter::Client.new(sock)
self.client.core.use('Module' => 'Stdapi')
end
attr_reader :client
protected
attr_accessor :sock
attr_writer :client
end

View File

@ -0,0 +1,5 @@
<html>
<center>
<h1>Metasploit Post-Exploitation Demo</h1>
</center>
</html>

13
dev/meterpreter/demo_site.rb Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/ruby -I. -I../../lib
require 'DemoClient'
HTML_FILE = "demo1.html"
host = ARGV[1] || '127.0.0.1'
port = ARGV[2] || '12345'
client = DemoClient.new(host, port).client
client.fs.file.upload('%TEMP%', HTML_FILE)
client.sys.process.execute('cmd /C "explorer %TEMP%\demo1.html"')