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

Function modulePath

sqlmap.py:103–114  ·  view source on GitHub ↗

This will get us the program's directory, even if we are frozen using py2exe

()

Source from the content-addressed store, hash-verified

101 sys.exit("\r[%s] [CRITICAL] %s" % (time.strftime("%X"), errMsg))
102
103def modulePath():
104 """
105 This will get us the program's directory, even if we are frozen
106 using py2exe
107 """
108
109 try:
110 _ = sys.executable if weAreFrozen() else __file__
111 except NameError:
112 _ = inspect.getsourcefile(modulePath)
113
114 return getUnicode(os.path.dirname(os.path.realpath(_)), encoding=sys.getfilesystemencoding() or UNICODE_ENCODING)
115
116def checkEnvironment():
117 try:

Callers 2

checkEnvironmentFunction · 0.70
mainFunction · 0.70

Calls 2

weAreFrozenFunction · 0.90
getUnicodeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…