def single_vnc_rdp(cli_parsed, engine): url = cli_parsed.single if engine == 'vnc': capture_host = vnc_module.capture_host if ':' in url: ip, port = url.split(':') port = int(port) else: ip, port = url, 5900 obj = objects.VNCRDPTableObject('vnc') else: capture_host = rdp_module.capture_host if ':' in url: ip, port = url.split(':') port = int(port) else: ip, port = url, 3389 obj = objects.VNCRDPTableObject('rdp') obj.remote_system = ip obj.port = port obj.set_paths(cli_parsed.d) capture_host(cli_parsed, obj) html = obj.create_table_html() with open(os.path.join(cli_parsed.d, engine + '_report.html'), 'w') as f: f.write(vnc_rdp_header(cli_parsed.date, cli_parsed.time)) f.write(vnc_rdp_table_head()) f.write(html) f.write("</table><br>")
def single_vnc_rdp(cli_parsed, engine): url = cli_parsed.single if engine == 'vnc': capture_host = vnc_module.capture_host if ':' in url: ip, port = url.split(':') port = int(port) else: ip, port = url, 5900 obj = objects.VNCRDPTableObject('vnc') else: capture_host = rdp_module.capture_host if ':' in url: ip, port = url.split(':') port = int(port) else: ip, port = url, 3389 obj = objects.VNCRDPTableObject('rdp') obj.remote_system = ip obj.port = port obj.set_paths(cli_parsed.d) capture_host(cli_parsed, obj) html = obj.create_table_html() with open(os.path.join(cli_parsed.d, engine + '_report.html'), 'w') as f: f.write(vnc_rdp_header(cli_parsed.date, cli_parsed.time)) f.write(vnc_rdp_table_head()) f.write(html) f.write("</table><br>")