def do_label_implant(user, command, randomuri): label = command.replace('label-implant', '').strip() implant_type = get_implanttype(randomuri) if "PB" in implant_type: print("Cannot re-label a PBind implant at this time") else: update_label(label, randomuri)
def run_implant_command(command, randomuri, implant_id, user): # Common Implant Commands if command.startswith("creds ") or command.strip() == "creds": do_creds(user, command) return elif command.startswith('label-implant'): do_label_implant(user, command, randomuri) return elif command.startswith('remove-label'): do_remove_label(user, command, randomuri) return if command.startswith("beacon"): do_beacon(user, command, randomuri) return elif command == "quit": do_quit(user, command) return elif command.startswith("unhide-implant"): do_unhide_implant(user, command, randomuri) return elif command.startswith("hide-implant"): do_hide_implant(user, command, randomuri) return elif command == "back" or command == "clear": do_back(user, command) return elif command.startswith("searchhistory"): do_searchhistory(user, command, randomuri) return implant_type = get_implanttype(randomuri) if implant_type.startswith("Python"): handle_py_command(command, user, randomuri, implant_id) return elif implant_type.startswith("C# PBind Pivot"): handle_pbind_pivot_command(command, user, randomuri, implant_id) return elif implant_type.startswith("C# PBind"): handle_pbind_command(command, user, randomuri, implant_id) return elif implant_type.startswith("C# FComm"): handle_fcomm_command(command, user, randomuri, implant_id) return elif implant_type.startswith("C#"): handle_sharp_command(command, user, randomuri, implant_id) return else: handle_ps_command(command, user, randomuri, implant_id) return