mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Patch for an Issue #454
This commit is contained in:
parent
60df3e9d1e
commit
dfd6ee20bb
|
@ -1072,7 +1072,7 @@ def parseTargetDirect():
|
||||||
|
|
||||||
if details.group('remote'):
|
if details.group('remote'):
|
||||||
remote = True
|
remote = True
|
||||||
conf.hostname = details.group('hostname')
|
conf.hostname = details.group('hostname').strip()
|
||||||
conf.port = int(details.group('port'))
|
conf.port = int(details.group('port'))
|
||||||
else:
|
else:
|
||||||
conf.hostname = "localhost"
|
conf.hostname = "localhost"
|
||||||
|
@ -1348,7 +1348,14 @@ def getLocalIP():
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def getRemoteIP():
|
def getRemoteIP():
|
||||||
return socket.gethostbyname(conf.hostname)
|
retVal = None
|
||||||
|
try:
|
||||||
|
retVal = socket.gethostbyname(conf.hostname)
|
||||||
|
except socket.gaierror:
|
||||||
|
errMsg = "address resolution problem "
|
||||||
|
errMsg += "occurred for hostname '%s'" % conf.hostname
|
||||||
|
singleTimeLogMessage(errMsg, logging.ERROR)
|
||||||
|
return retVal
|
||||||
|
|
||||||
def getFileType(filePath):
|
def getFileType(filePath):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user