def get_remoting_vnc_object(): import time from model_extraction import configuration from virtualization import virtualbox config = configuration.get_default_config() ret = virtualbox.VirtualBoxMachine(name=config["image name"], snapshot=config["snapshot"], already_prepared=config["already prepared"]) ret.prepare_command = config["prepare command"] return ret
def get_remoting_vnc_object(): import time from model_extraction import configuration from virtualization import virtualbox config = configuration.get_default_config() ret = virtualbox.VirtualBoxMachine( name=config["image name"], snapshot=config["snapshot"], already_prepared=config["already prepared"]) ret.prepare_command = config["prepare command"] return ret
def get_remoting_vnc_object(config_name=None): import time from model_extraction import configuration from virtualization import virtualbox if config_name is None: config = configuration.get_default_config() else: config = configuration.get_config()['configurations'][config_name] ret = virtualbox.VirtualBoxMachine(name=config["image name"], snapshot=config["snapshot"], already_prepared=config["already prepared"]) ret.prepare_command = config["prepare command"] ret.remote_instrumentation_file = config.get("remote logs") return ret
def get_remoting_vnc_object(config_name=None): import time from model_extraction import configuration from virtualization import virtualbox if config_name is None: config = configuration.get_default_config() else: config = configuration.get_config()['configurations'][config_name] ret = virtualbox.VirtualBoxMachine( name=config["image name"], snapshot=config["snapshot"], already_prepared=config["already prepared"]) ret.prepare_command = config["prepare command"] ret.remote_instrumentation_file = config.get("remote logs") return ret
if edge.ui_type == 'text': ok_edge = edge # edge.custom['test value'] = [{'name': 'valid', 'value': '{+ctrl}a{-ctrl}demo'}] break """ ok_edge = [edge for edge in node.edges if edge.ui_type == "text"][0] valid_edge = extractor.inject_edge( node, ok_edge.location, "Valid serial", "normal" ) # ok_edge.location or None, to get the text... valid_edge.method = enter_valid_serial valid_edge.method_source_code = ("press_ok", INSTALL_APP_TEMPLATE) demo_edge = extractor.inject_edge(node, ok_edge.location, "Demo serial", "normal") demo_edge.method = enter_demo_serial demo_edge.method_source_code = ("press_ok", INSTALL_APP_TEMPLATE) if __name__ == "__main__": test_files = configuration.get_default_config()["test files"] extractor = base_extractor.BaseExtractor("serial_2", "\\utils\\runurl.py " + test_files + "installwserial.exe") extractor.scrap_method = lambda node, world, scraper_hints, node_hints: window_scrap.custom_scraper(node, world) extractor.graph.add_post_create_node_hook( "Please Type In Your Installation Key And Click Ok", lambda node, world: add_input_values(node, world, extractor), ) extractor.crawl_application()
# edge.custom['test value'] = [{'name': 'valid', 'value': '{+ctrl}a{-ctrl}demo'}] break ''' ok_edge = [edge for edge in node.edges if edge.ui_type == 'text'][0] valid_edge = extractor.inject_edge( node, ok_edge.location, 'Valid serial', 'normal') # ok_edge.location or None, to get the text... valid_edge.method = enter_valid_serial valid_edge.method_source_code = ('press_ok', INSTALL_APP_TEMPLATE) demo_edge = extractor.inject_edge(node, ok_edge.location, 'Demo serial', 'normal') demo_edge.method = enter_demo_serial demo_edge.method_source_code = ('press_ok', INSTALL_APP_TEMPLATE) if __name__ == '__main__': test_files = configuration.get_default_config()["test files"] extractor = base_extractor.BaseExtractor( 'serial_2', '\\utils\\runurl.py ' + test_files + 'installwserial.exe') extractor.scrap_method = lambda node, world, scraper_hints, node_hints: window_scrap.custom_scraper( node, world) extractor.graph.add_post_create_node_hook( 'Please Type In Your Installation Key And Click Ok', lambda node, world: add_input_values(node, world, extractor)) extractor.crawl_application()
'''