Skip to content

Commit

Permalink
fix port parsing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Dec 20, 2023
1 parent 71f60e8 commit a8577ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bbot/core/helpers/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2479,7 +2479,7 @@ def parse_port_string(port_string):
>>> parse_port_string("invalid")
ValueError: Invalid port or port range: invalid
"""
elements = port_string.split(",")
elements = str(port_string).split(",")
ports = []

for element in elements:
Expand Down
1 change: 1 addition & 0 deletions bbot/test/test_step_1/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ async def do_stuff(r):

def test_portparse_singleports(helpers):
assert helpers.parse_port_string("80,443,22") == [80, 443, 22]
assert helpers.parse_port_string(80) == [80]


def test_portparse_range_valid(helpers):
Expand Down

0 comments on commit a8577ad

Please sign in to comment.