def rooter(ctx, socket, group, service, iptables, ip, sudo): """Instantiates the Cuckoo Rooter.""" init_console_logging(level=ctx.parent.level) if sudo: args = [ "sudo", sys.argv[0], "rooter", socket, "--group", group, "--service", service, "--iptables", iptables, "--ip", ip, ] if ctx.parent.level == logging.DEBUG: args.insert(2, "--debug") try: subprocess.call(args) except KeyboardInterrupt: pass else: try: cuckoo_rooter(socket, group, service, iptables, ip) except KeyboardInterrupt: print(red("Aborting the Cuckoo Rooter.."))
def rooter(ctx, socket, group, ifconfig, service, iptables, ip, sudo): """Instantiates the Cuckoo Rooter.""" init_console_logging(level=ctx.parent.level) if sudo: args = [ "sudo", sys.argv[0], "rooter", socket, "--group", group, "--ifconfig", ifconfig, "--service", service, "--iptables", iptables, "--ip", ip, ] if ctx.parent.level == logging.DEBUG: args.insert(2, "--debug") try: subprocess.call(args) except KeyboardInterrupt: pass else: try: cuckoo_rooter(socket, group, ifconfig, service, iptables, ip) except KeyboardInterrupt: print(red("Aborting the Cuckoo Rooter.."))