mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
minor update
This commit is contained in:
parent
63af5444fd
commit
3aba0b1bec
|
@ -928,12 +928,18 @@ def getDelayQuery(andCond=False):
|
|||
return query
|
||||
|
||||
def getLocalIP():
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((conf.hostname, conf.port))
|
||||
ip, _ = s.getsockname()
|
||||
s.close()
|
||||
retVal = None
|
||||
try:
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((conf.hostname, conf.port))
|
||||
retVal, _ = s.getsockname()
|
||||
s.close()
|
||||
except:
|
||||
debugMsg = "there was an error in opening socket "
|
||||
debugMsg += "connection toward '%s'" % conf.hostname
|
||||
logger.debug(debugMsg)
|
||||
|
||||
return ip
|
||||
return retVal
|
||||
|
||||
def getRemoteIP():
|
||||
return socket.gethostbyname(conf.hostname)
|
||||
|
|
Loading…
Reference in New Issue
Block a user