Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AddisonG committed Dec 3, 2021
1 parent e79549f commit 74a1c74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion network_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from scapy.all import arping


def scan(ip_range: str):
try:
responses, _ = arping(ip_range, verbose=False)
Expand All @@ -21,7 +22,8 @@ def scan(ip_range: str):

return devices

def find_ip_by_mac(ip_range: str, mac: str):

def find_ip_by_mac(ip_range: str, mac: str) -> str:
for device in scan(ip_range):
if device["mac"].upper() == mac.upper():
return device["ip"]
Expand Down
2 changes: 1 addition & 1 deletion timtamcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def record_gif(self, duration, fps):
# Save a single image
# cv2.imwrite("/tmp/timtam-thief.jpg", frame)

if self.mask:
if self.mask is not None:
# Add overlay
frame = cv2.subtract(frame, self.mask)
frame = cv2.addWeighted(frame, 1, self.border, 1, 0)
Expand Down

0 comments on commit 74a1c74

Please sign in to comment.