File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
modules/auxiliary/scanner/vnc Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def initialize(sock, opts = {})
24
24
@opts = opts
25
25
26
26
@banner = nil
27
- @majver = MajorVersion
27
+ @majver = MajorVersions
28
28
@minver = -1
29
29
@auth_types = [ ]
30
30
end
@@ -50,7 +50,7 @@ def handshake
50
50
51
51
if @banner =~ /RFB ([0-9]{3})\. ([0-9]{3})/
52
52
maj = $1. to_i
53
- if maj != MajorVersion
53
+ unless MajorVersions . include? ( maj )
54
54
@error = "Invalid major version number: #{ maj } "
55
55
return false
56
56
end
@@ -61,7 +61,12 @@ def handshake
61
61
62
62
@minver = $2. to_i
63
63
64
- our_ver = "RFB %03d.%03d\n " % [ MajorVersion , @minver ]
64
+ # Forces version 3 to be used. This adds support for version 4 servers.
65
+ # It may be necessary to hardcode minver as well.
66
+ # TODO: Add support for Version 4.
67
+ # Version 4 adds additional information to the packet regarding supported
68
+ # authentication types.
69
+ our_ver = "RFB %03d.%03d\n " % [ 3 , @minver ]
65
70
@sock . put ( our_ver )
66
71
67
72
true
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ module RFB
19
19
DefaultPort = 5900
20
20
21
21
# Version information
22
- MajorVersion = 3
22
+ MajorVersions = [ 3 , 4 ]
23
23
# NOTE: We will emulate whatever minor version the server reports.
24
24
25
25
# Security types
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def initialize
21
21
'Description' => %q{
22
22
This module will test a VNC server on a range of machines and
23
23
report successful logins. Currently it supports RFB protocol
24
- version 3.3, 3.7, and 3.8 using the VNC challenge response
24
+ version 3.3, 3.7, 3.8 and 4.001 using the VNC challenge response
25
25
authentication method.
26
26
} ,
27
27
'Author' =>
You can’t perform that action at this time.
0 commit comments