minor update

This commit is contained in:
Miroslav Stampar 2012-05-24 22:07:50 +00:00
parent eed8d7eb5d
commit 86fdad2bfa
3 changed files with 13 additions and 2 deletions

View File

@ -993,6 +993,12 @@ def checkConnection(suppressOutput=False):
logger.info(infoMsg)
try:
if conf.ipv6:
warnMsg = "always check connection to provided "
warnMsg += "IPv6 address with a tool like ping6 "
warnMsg += "(e.g. 'ping6 fe80::20c:29ff:fea8:6bf1%vmnet8')"
singleTimeWarnMessage(warnMsg)
page, _ = Request.queryPage(content=True, noteResponseTime=False)
kb.originalPage = kb.pageTemplate = page

View File

@ -1086,7 +1086,11 @@ def parseTargetUrl():
conf.scheme = __urlSplit[0].strip().lower() if not conf.forceSSL else "https"
conf.path = __urlSplit[2].strip()
conf.hostname = __hostnamePort[0].strip().strip("[]")
conf.hostname = __hostnamePort[0].strip()
conf.ipv6 = conf.hostname != conf.hostname.strip("[]")
conf.hostname = conf.hostname.strip("[]")
try:
_ = conf.hostname.encode("idna")
@ -1111,7 +1115,7 @@ def parseTargetUrl():
if __urlSplit[3]:
conf.parameters[PLACE.GET] = urldecode(__urlSplit[3]) if __urlSplit[3] and urlencode(DEFAULT_GET_POST_DELIMITER, None) not in __urlSplit[3] else __urlSplit[3]
conf.url = "%s://%s:%d%s" % (conf.scheme, ("[%s]" % conf.hostname) if __hostnamePort[0].strip("[]") != __hostnamePort[0] else conf.hostname, conf.port, conf.path)
conf.url = "%s://%s:%d%s" % (conf.scheme, ("[%s]" % conf.hostname) if conf.ipv6 else conf.hostname, conf.port, conf.path)
conf.url = conf.url.replace(URI_QUESTION_MARKER, '?')
if not conf.referer and intersect(REFERER_ALIASES, conf.testParameter, True):

View File

@ -1388,6 +1388,7 @@ def __setConfAttributes():
conf.hashDBFile = None
conf.httpHeaders = []
conf.hostname = None
conf.ipv6 = False
conf.multipleTargets = False
conf.outputPath = None
conf.paramDict = {}