mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Code refactoring (moving import ctypes to be used only when needed)
This commit is contained in:
parent
3e0f747fad
commit
c1592e8508
3 changed files with 10 additions and 6 deletions
|
|
@ -9,7 +9,6 @@ import codecs
|
|||
import contextlib
|
||||
import cookielib
|
||||
import copy
|
||||
import ctypes
|
||||
import httplib
|
||||
import inspect
|
||||
import logging
|
||||
|
|
@ -2209,6 +2208,8 @@ def runningAsAdmin():
|
|||
|
||||
isAdmin = isinstance(_, (int, float, long)) and _ == 0
|
||||
elif IS_WIN:
|
||||
import ctypes
|
||||
|
||||
_ = ctypes.windll.shell32.IsUserAnAdmin()
|
||||
|
||||
isAdmin = isinstance(_, (int, float, long)) and _ == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue