def threads(command): print(" ") try: var.threads = int(tools.arg("Threads: ", "threads ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def channel(command): print(" ") try: var.channel = int(tools.arg("Channel: ", "channel ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def size(command): print("") try: var.size = int(tools.arg("Size: ", "size ", command)) except Exception as e: print("There was an error while executing.", e) print("")
def load(command): print("") try: from_file = tools.arg("Load from file: ", "load ", command) if not path.isfile(from_file): raise Exception("File does not exist.") else: new_list = [] command_list = [] for item in open(from_file, "r").read().split("\n"): if item != "": new_list.append(item) if item in ["e", "q", "exit", "quit"]: command_list.append(new_list) new_list = [] elif item in [ "l4", "l3", "l7", "ble", "arp", "scanner", "server" ]: command_list.append(new_list) new_list = [] else: pass command_list.append(new_list) var.session[1][1] = command_list var.session[1][0] = True print("Repeating actions...") except Exception as ex: print("An error occured.", ex) print("")
def port(command): print("") try: var.port = [int(tools.arg("Port: ", "port ", command))] except Exception as e: print("There was an error while executing.", e) print("")
def targets(command): print("") var.target = tools.arg("Targets (Seperated by ', '): ", "targets ", command).split(", ") for ip in var.target: if "." not in ip: print("This IP does not exist.") print("")
def port(command): print("") try: var.port = int(tools.arg("Port: ", "port ", command)) except Exception as ex: print("An error occured.", ex) print("")
def auto_start(command): print(" ") try: var.autostart = int(tools.arg("Delay for attack to start (in Seconds): ", "auto start ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def auto_stop(command): print(" ") try: var.autostop = int(tools.arg("Stop the attack after x seconds: ", "auto stop ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def sleep(command): print(" ") try: var.sleep = float(tools.arg("Delay between each thread: ", "sleep ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def auto_step(command): print(" ") try: var.autostep = int(tools.arg("Delay for next thread to activate (in Seconds): ", "auto step ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def interval(command): print(" ") try: var.interval = float(tools.arg("Delay between each packet: ", "interval ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def st_wait(command): print("") try: var.timeforstress = int(tools.arg("Delay in seconds: ", "st wait ", command)) except Exception as e: print("There was an error while executing.", e) print("")
def auto_stop(command): print(" ") try: var.auto_stop = int(tools.arg("Time until auto stop: ", "auto stop ", command)) except Exception as e: print("There was an error while executing.", e) print(" ")
def sleep(command): print("") try: var.sleep = int(tools.arg("Delay in seconds: ", "sleep ", command)) except Exception as e: print("There was an error while executing.", e) print("")
def targets(command): print("") var.target = tools.arg("URLS (Seperated by ', '): ", "targets ", command).split(", ") for url in var.target: if "http" not in url: print("%s is a invalid URL." % url) print("")
def ports_ip(command): print("") try: psi = tools.arg("IP: ", "ports ip ", command) self.portscan(psi) except Exception as e: print("There was an error while executing.", e) print("")
def domain_ip(command): print("") try: zw = (tools.arg("Domain: ", "domain ip ", command).replace("https://", "").replace("http://", "")) print(self.hbi(zw)) except Exception as e: print("There was an error while executing.", e) print("")
def target(command): print("") var.target = [ tools.arg("URL (GET Parameters possible): ", "target ", command) ] if "http" not in var.target[0]: print("This URL is invalid.") print("")
def ports_web(command): print("") try: psw = tools.arg("Website: ", "ports web ", command) psww = socket.gethostbyname(psw.replace("https://", "").replace("http://", "")) self.portscan(psww) except Exception as e: print("There was an error while executing.", e) print("")
def ports(command): print("") try: var.port = tools.arg("Ports (Seperated by ', '): ", "ports ", command).split(", ") for port in var.port: if isinstance(port, int): print("Entered ports cannot be used.") except Exception as e: print("There was an error while executing.", e) print("")
def web(command): print(" ") try: webtoip = tools.arg("Website: ", "web ", command) webtoip = webtoip.replace("http://", "") webtoip = webtoip.replace("https://", "") webtoiptxt = str(socket.gethostbyname(webtoip)) var.ip = [webtoiptxt] except Exception as e: print("There was an error while executing.", e) print(" ")
def mb(command): print(" ") try: setmb = int(tools.arg("Size of Packet in MB: ", "mb ", command)) setmb = int(setmb / 0.000001) var.message = ("r" * setmb) var.rtxt = setmb var.messagezw = "r" except Exception as e: print("There was an error while executing.", e) print(" ")
def webs(command): print(" ") try: webtoip = tools.arg("Websites (Seperated by ', '): ", "webs ", command).split(", ") for pos, web in enumerate(webtoip): webtoip[pos] = web.replace("http://", "") webtoip[pos] = webtoip[pos].replace("https://", "") webtoip[pos] = str(socket.gethostbyname(webtoip[pos])) var.ip = webtoip except Exception as e: print("There was an error while executing.", e) print(" ")
def size(command): print(" ") try: sizezw = int(tools.arg("Size in kb: ", "size ", command)) if sizezw < 5: print("Size needs to be more than 4kb.") elif sizezw > 65500: print("Size needs to be less than 65500kb.") else: var.size = sizezw except Exception as e: print("There was an error while executing.", e) print(" ")
def repeat(command): print(" ") try: rtxtzw = var.rtxt var.rtxt = int(tools.arg("Repeat message x times: ", "repeat ", command)) if var.rtxt < 1: print("There was an error while executing.") else: if rtxtzw < var.rtxt: var.messagezw = var.message var.message = (str(var.message) * int(var.rtxt)) else: var.message = (str(var.messagezw) * int(var.rtxt)) except Exception as e: print("There was an error while executing.", e) print(" ")
def record(command): print("") try: to_file = tools.arg("Save to file: ", "record ", command) if path.isfile(to_file): raise Exception("File already exists.") else: new_file = open(to_file, "w") # new_file.write("# -- Session File") new_file.close() var.session[0][1] = open(to_file, "a") var.session[0][0] = True print("") print("Recording...") except Exception as ex: print("An error occured.", ex) print("")
def run_shell(self, command): print("") system(tools.arg("Enter shell command: \033[1;32;0m", ". ", command)) print("")
def debug(self, command): print("") eval(tools.arg("Enter debug command: \033[1;32;0m", "$ ", command)) print("")
def target(command): print("") var.target = tools.arg("Target: ", "target ", command) if "." not in var.target: print("This IP does not exist.") print("")