Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b280d8 commit 840af1fCopy full SHA for 840af1f
1 file changed
sqlmap.py
@@ -6,6 +6,7 @@
6
"""
7
8
import bdb
9
+import inspect
10
import logging
11
import os
12
import sys
@@ -50,7 +51,12 @@ def modulePath():
50
51
using py2exe
52
53
- return os.path.dirname(os.path.realpath(getUnicode(sys.executable if weAreFrozen() else __file__, sys.getfilesystemencoding())))
54
+ try:
55
+ _ = sys.executable if weAreFrozen() else __file__
56
+ except NameError:
57
+ _ = inspect.getsourcefile(modulePath)
58
+
59
+ return os.path.dirname(os.path.realpath(getUnicode(_, sys.getfilesystemencoding())))
60
61
def main():
62
0 commit comments