Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8426d48

Browse files
committed
minor refactoring
1 parent 930262f commit 8426d48

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

lib/core/option.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,6 @@ def __parseBurpLog(content):
260260
if len(splitValue) > 1:
261261
port = filterStringValue(splitValue[1], '[0-9]')
262262

263-
if not scheme and port == "443":
264-
scheme = "https"
265-
266263
# Avoid to add a static content length header to
267264
# conf.httpHeaders and consider the following lines as
268265
# POSTed data
@@ -277,8 +274,10 @@ def __parseBurpLog(content):
277274
getPostReq &= re.search(conf.scope, host) is not None
278275

279276
if getPostReq and (params or cookie):
280-
if not port and scheme == "https":
277+
if not port and isinstance(scheme, basestring) and scheme.lower() == "https":
281278
port = "443"
279+
elif not scheme and port == "443":
280+
scheme = "https"
282281

283282
if not url.startswith("http"):
284283
url = "%s://%s:%s%s" % (scheme or "http", host, port or "80", url)

0 commit comments

Comments
 (0)