class ArpScan(object):
def __init__(self, host_state):
assert isinstance(host_state, HostState)
self._lock = threading.Lock()
self._active = True
self._thread = threading.Thread(target=self._arp_scan_thread)
self._thread.daemon = True
def start(self):
with self._lock:
self._active = True
utils.log('[ARP Scanning] Starting.')
self._thread.start()
def _arp_scan_thread(self):
utils.restart_upon_crash(self._arp_scan_thread_helper)
def _arp_scan_thread_helper(self):
while True:
for ip in utils.get_network_ip_range():
time.sleep(0.05)
arp_pkt = sc.Ether(dst="ff:ff:ff:ff:ff:ff") /
sc.ARP(pdst=ip, hwdst="ff:ff:ff:ff:ff:ff")
sc.sendp(arp_pkt, verbose=0)
with self._lock:
if not self._active:
return
def stop(self):
utils.log('[ARP Scanning] Stopping.')
with self._lock:
self._active = False
self._thread.join()
utils.log('[ARP Scanning] Stopped.')
Tom qab tshuaj xyuas lub network, IoT Inspector server tsim nrog cov chaw twg IoT gadgets pauv cov ntaub ntawv, lawv ua li no ntau npaum li cas, thiab nyob rau hauv cov ntim dab tsi lawv xa thiab tau txais pob ntawv. Raws li qhov tshwm sim, lub kaw lus pab txheeb xyuas cov peev txheej tsis txaus ntseeg uas PD tuaj yeem xa mus yam tsis muaj tus neeg siv paub.
Txog tam sim no, daim ntawv thov tsuas yog ua haujlwm ntawm macOS. Koj tuaj yeem rub tawm cov zip archive ntawm qhov project website. Txhawm rau nruab, koj yuav xav tau macOS High Sierra lossis Mojave, Firefox lossis Chrome browser. Lub app tsis ua haujlwm hauv Safari. Installation thiab Configuration Guide muaj nyob rau hauv YouTube.
Xyoo no, cov neeg tsim khoom tau cog lus tias yuav ntxiv ib qho version rau Linux, thiab hauv lub Tsib Hlis - daim ntawv thov rau Windows. Qhov project source code yog muaj ntawm GitHub.