mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
demo stuff
git-svn-id: file:///home/svn/incoming/trunk@2414 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
bb4b94a113
commit
9ea2b1f1c1
19
dev/meterpreter/DemoClient.rb
Normal file
19
dev/meterpreter/DemoClient.rb
Normal 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
|
5
dev/meterpreter/demo1.html
Normal file
5
dev/meterpreter/demo1.html
Normal file
@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<center>
|
||||
<h1>Metasploit Post-Exploitation Demo</h1>
|
||||
</center>
|
||||
</html>
|
13
dev/meterpreter/demo_site.rb
Executable file
13
dev/meterpreter/demo_site.rb
Executable 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"')
|
Loading…
Reference in New Issue
Block a user