Skip to content

Commit

Permalink
Dependencies: remove block on cryptography (ivre#1550)
Browse files Browse the repository at this point in the history
* Dependencies: remove block on cryptography

* Utils: fix mac2manuf for newest file format
  • Loading branch information
p-l- authored Jul 20, 2023
1 parent bb346c4 commit fac8730
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 12 deletions.
6 changes: 4 additions & 2 deletions ivre/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1530,6 +1530,8 @@ def _int2macmask(mask: int) -> int:
def _read_wireshark_manuf_db() -> None:
global _WIRESHARK_MANUF_DB_POPULATED

sep = re.compile("\t+")

if config.WIRESHARK_SHARE_PATH is None:
return

Expand All @@ -1542,10 +1544,10 @@ def parse_line(line: str) -> None:
return
comment: Optional[str]
try:
addr, manuf, comment = line.split("\t", 2)
addr, manuf, comment = sep.split(line, 2)
except ValueError:
try:
addr, manuf = line.split("\t", 1)
addr, manuf = sep.split(line, 1)
except ValueError:
LOGGER.warning(
"Cannot parse a line from Wireshark manufacturer database [%r].",
Expand Down
2 changes: 1 addition & 1 deletion requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bandit
black
bottle
codespell
cryptography<40.0.0
cryptography
docutils!=0.18
elasticsearch
elasticsearch-dsl
Expand Down
2 changes: 1 addition & 1 deletion requirements-elastic.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elasticsearch
elasticsearch-dsl
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements-maxmind.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymongo>=3.7
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements-mongo.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymongo>=3.7
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements-mongosrv.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymongo[srv]>=3.7
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements-postgres.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sqlalchemy<2
psycopg2
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements-sqlite.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sqlalchemy<2
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements-tinydb.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tinydb
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymongo>=3.7
cryptography<40.0.0
cryptography
pyOpenSSL>=16.1.0
bottle
2 changes: 1 addition & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4399,7 +4399,7 @@ def is_prime(n):
for mac, res in [
(
"00:00:00:00:00:00",
("00:00:00", "Officially Xerox, but 0:0:0:0:0:0 is more common"),
("Xerox", "Xerox Corporation"),
),
("00:00:01:00:00:00", ("Xerox", "Xerox Corporation")),
("00:01:01:00:00:00", ("Private", None)),
Expand Down

0 comments on commit fac8730

Please sign in to comment.