Skip to content

Commit

Permalink
chore: fix max-rtt-timeout of ping
Browse files Browse the repository at this point in the history
  • Loading branch information
RyosukeDTomita committed Sep 1, 2024
1 parent 9658614 commit 986c8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/my_portscanner/scan_tools/Scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _get_latency(self) -> None:
"""
packet = IP(dst=self.target_ip) / ICMP()
start_time = time.time()
response = sr1(packet, timeout=self.max_rtt_timeout, verbose=0)
response = sr1(packet, timeout=self.max_rtt_timeout / 1000, verbose=0)
if response:
latency = time.time() - start_time
print(f"Host is up ({latency}s latency).")
Expand Down

0 comments on commit 986c8f6

Please sign in to comment.