Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Also: Introduction of the tests in order to avoid such isssues in the future
  • Loading branch information
funilrys committed Mar 25, 2019
1 parent e15831d commit 57f308e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ultimate_hosts_blacklist/whitelist/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

from ultimate_hosts_blacklist.whitelist.core import Core

VERSION = "3.3.0"
VERSION = "3.5.0"


def clean_string_with_official_whitelist(
Expand Down
4 changes: 4 additions & 0 deletions ultimate_hosts_blacklist/whitelist/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def __get_whitelist_list_to_parse(self):
else:
result = []

result.append(
r"REG ((192)\.(168)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|((10)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|((172)\.(1[6-9]|2[0-9]|3[0-1])\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))" # pylint: disable=line-too-long
)

if self.secondary_whitelist_file and isinstance(
self.secondary_whitelist_file, list
): # pragma: no cover
Expand Down
1 change: 1 addition & 0 deletions ultimate_hosts_blacklist/whitelist/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def test_reg(self):
"github.com",
"google.com",
"test.org",
"192.168.178.1.1",
"www.google.com",
]
expected = ["example.com", "0.0.0.0 example.com", "0.0.0.0\t\t\texample.com"]
Expand Down

0 comments on commit 57f308e

Please sign in to comment.