File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2077,18 +2077,16 @@ def runningAsAdmin():
20772077 Returns True if the current process is run under admin privileges
20782078 """
20792079
2080- isAdmin = False
2080+ isAdmin = None
20812081
20822082 if PLATFORM in ("posix" , "mac" ):
2083- isAdmin = os .geteuid ()
2083+ _ = os .geteuid ()
20842084
2085- if isinstance (isAdmin , (int , float , long )) and isAdmin == 0 :
2086- isAdmin = True
2085+ isAdmin = isinstance (_ , (int , float , long )) and _ == 0
20872086 elif IS_WIN :
2088- isAdmin = ctypes .windll .shell32 .IsUserAnAdmin ()
2087+ _ = ctypes .windll .shell32 .IsUserAnAdmin ()
20892088
2090- if isinstance (isAdmin , (int , float , long )) and isAdmin == 1 :
2091- isAdmin = True
2089+ isAdmin = isinstance (_ , (int , float , long )) and _ == 1
20922090 else :
20932091 errMsg = "sqlmap is not able to check if you are running it "
20942092 errMsg += "as an administrator account on this platform. "
You can’t perform that action at this time.
0 commit comments