How can I use subprocess or other methods to call a lrzsz command? I do this because of there is only-serial-port support. Any help will be appreciated.
def main():
conn = connect("172.31.10.8")
cmd = "sz -Xbe 1.pcap"
stdin, stdout,stderr = conn.exec_command(cmd)
subproc = subprocess.Popen("rz.exe -Xbe",stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
subproc.communicate(stdout.read())