def flush_arp(self): """ Flush ARP cache """ arp_cmd = terminal('arp -d *') # Fix: Some systems has older versions of arp.exe # We use netsh instead if 'The parameter is incorrect' in arp_cmd: terminal('netsh interface ip delete arpcache')
def arping_cache(self): """ Showing system arp cache after pinging """ scan_result = terminal('arp -a') clean_result = findall(rf'({self.perfix}\.\d+)\s+([0-9a-f-]+)\s+dynamic', scan_result) self.devices_appender(clean_result)
def duplicate_elmocut(): """ Check if there is more than 1 instance of elmoCut.exe """ tasklist = terminal('tasklist') return tasklist.lower().count('elmocut.exe') > 1
def flush_arp(self): """ Flush ARP cache """ terminal('arp -d *', decode=False)
def ping_thread(self, ip): """ Sub function for pinging """ terminal(f'ping -n 1 {ip}', decode=False) self.__ping_done += 1