Exemplo n.º 1
0
 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')
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
def duplicate_elmocut():
    """
    Check if there is more than 1 instance of elmoCut.exe
    """
    tasklist = terminal('tasklist')
    return tasklist.lower().count('elmocut.exe') > 1
Exemplo n.º 4
0
 def flush_arp(self):
     """
     Flush ARP cache
     """
     terminal('arp -d *', decode=False)
Exemplo n.º 5
0
 def ping_thread(self, ip):
     """
     Sub function for pinging
     """
     terminal(f'ping -n 1 {ip}', decode=False)
     self.__ping_done += 1