1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-11-26 17:41:08 +01:00

Return an error if channel id is not valid

This commit is contained in:
dwelch-r7 2021-08-23 13:39:17 +01:00
parent 28794127c9
commit 63eefdaa3f

View File

@ -2564,4 +2564,6 @@ def stdapi_set_term_size(request, response):
proc_h = meterpreter.channels[channel_id].proc_h
winsize = struct.pack("HHHH", rows, columns, 0, 0)
fcntl.ioctl(proc_h.stdin, termios.TIOCSWINSZ, winsize)
else:
return ERROR_FAILURE, response
return ERROR_SUCCESS, response