mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
update for that invalid target url Otavio Augusto reported
This commit is contained in:
parent
203cfd114f
commit
cef248a5ea
|
@ -47,6 +47,7 @@ from lib.core.data import temp
|
|||
from lib.core.convert import urlencode
|
||||
from lib.core.exception import sqlmapFilePathException
|
||||
from lib.core.exception import sqlmapNoneDataException
|
||||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.settings import IS_WIN
|
||||
from lib.core.settings import SQL_STATEMENTS
|
||||
from lib.core.settings import VERSION_STRING
|
||||
|
@ -595,7 +596,11 @@ def parseTargetUrl():
|
|||
conf.hostname = __hostnamePort[0]
|
||||
|
||||
if len(__hostnamePort) == 2:
|
||||
conf.port = int(__hostnamePort[1])
|
||||
try:
|
||||
conf.port = int(__hostnamePort[1])
|
||||
except:
|
||||
errMsg = "invalid target url"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
elif conf.scheme == "https":
|
||||
conf.port = 443
|
||||
else:
|
||||
|
|
|
@ -609,7 +609,10 @@ def __setHTTPProxy():
|
|||
__port = None
|
||||
|
||||
if len(__hostnamePort) == 2:
|
||||
__port = int(__hostnamePort[1])
|
||||
try:
|
||||
__port = int(__hostnamePort[1])
|
||||
except:
|
||||
pass #drops into the next check block
|
||||
|
||||
if not __scheme or not __hostname or not __port:
|
||||
errMsg = "proxy value must be in format 'http://url:port'"
|
||||
|
|
Loading…
Reference in New Issue
Block a user