Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bpftools/p0f.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def parse_ittl(self):
if self.ittl.endswith("-"):
self.ttl_rand = True
else:
if "+" in self.ittl:
self.ittl, _ = self.ittl.split("+")
self.ttl_rand = False

def parse_win_size(self):
Expand All @@ -78,7 +80,7 @@ def parse_sig(self):
if self.ver != '4' and self.ver != '6':
raise ValueError("IP version must be either 4 or 6")

if not re.match("^(\d+)-?$", self.ittl):
if not re.match("^(\d+)(-|\+\d+|\+\?)?$", self.ittl):
raise ValueError("Invalid ttl field")
self.parse_ittl()

Expand Down