Sha256: e7142f523370159746f45fdb75af5e45693145d365835776474c5f31f5294030

Contents?: true

Size: 678 Bytes

Versions: 14

Compression:

Stored size: 678 Bytes

Contents

#!/usr/bin/env ruby

##
# $Id: $
##

##
#
# RFB protocol support
#
# by Joshua J. Drake <jduck>
#
# Based on:
# vnc_auth_none contributed by Matteo Cantoni <goony[at]nothink.org>
# vnc_auth_login contributed by carstein <carstein.sec[at]gmail.com>
#
##

require 'rex/socket'
require 'rex/proto/rfb'

sd = Rex::Socket::Tcp.create('PeerHost' => ENV["VNCHOST"], 'PeerPort' => Rex::Proto::RFB::DefaultPort)

v = Rex::Proto::RFB::Client.new(sd)
if not v.connect('password')
	$stderr.puts v.error
	exit(1)
end

loop {
	sret = select([sd],nil,nil,10)
	puts sret.inspect
	if sret and sret[0].include? sd
		buf = sd.sysread(8192)
		puts "read #{buf.length} bytes: #{buf.inspect}"
	end
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
librex-0.0.30 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.29 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.28 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.27 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.26 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.25 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.23 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.21 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.19 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.17 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.13 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.12 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.7 lib/rex/proto/rfb.rb.ut.rb
librex-0.0.6 lib/rex/proto/rfb.rb.ut.rb