MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / getLocalIP

Function getLocalIP

lib/core/common.py:1977–1994  ·  view source on GitHub ↗

Get local IP address (exposed to the remote/target)

()

Source from the content-addressed store, hash-verified

1975 kb.absFilePaths.add(absFilePath)
1976
1977def getLocalIP():
1978 """
1979 Get local IP address (exposed to the remote/target)
1980 """
1981
1982 retVal = None
1983
1984 try:
1985 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1986 s.connect((conf.hostname, conf.port))
1987 retVal, _ = s.getsockname()
1988 s.close()
1989 except:
1990 debugMsg = "there was an error in opening socket "
1991 debugMsg += "connection toward '%s'" % conf.hostname
1992 logger.debug(debugMsg)
1993
1994 return retVal
1995
1996def getRemoteIP():
1997 """

Callers 2

_initVarsMethod · 0.90
_initVarsMethod · 0.90

Calls 3

debugMethod · 0.80
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…