コード例 #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')
コード例 #2
0
ファイル: scanner.py プロジェクト: panzerhong/elmocut
 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)
コード例 #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
コード例 #4
0
ファイル: scanner.py プロジェクト: panzerhong/elmocut
 def flush_arp(self):
     """
     Flush ARP cache
     """
     terminal('arp -d *', decode=False)
コード例 #5
0
ファイル: scanner.py プロジェクト: panzerhong/elmocut
 def ping_thread(self, ip):
     """
     Sub function for pinging
     """
     terminal(f'ping -n 1 {ip}', decode=False)
     self.__ping_done += 1