File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def initialize(info={})
52
52
OptInt . new ( 'SYNCWAIT' ,
53
53
[ true , 'The time between transferring log chunks.' , 10 ]
54
54
) ,
55
- OptInt . new ( 'LOGPORT' ,
55
+ OptPort . new ( 'LOGPORT' ,
56
56
[ false , 'Local port opened for momentarily for log transfer' , 22899 ]
57
57
)
58
58
]
@@ -73,7 +73,7 @@ def run_ruby_code
73
73
print_status "Ruby process executing with pid #{ rpid . to_i } "
74
74
rpid . to_i
75
75
else
76
- raise "Ruby keylogger command failed with error #{ rpid } "
76
+ fail_with ( Exploit :: Failure :: Unknown , "Ruby keylogger command failed with error #{ rpid } " )
77
77
end
78
78
end
79
79
@@ -84,6 +84,11 @@ def run
84
84
return
85
85
end
86
86
87
+ if datastore [ 'DURATION' ] . to_i < 1
88
+ print_error 'Invalid DURATION value.'
89
+ return
90
+ end
91
+
87
92
print_status "Executing ruby command to start keylogger process."
88
93
89
94
@port = datastore [ 'LOGPORT' ] . to_i
You can’t perform that action at this time.
0 commit comments