Created
June 13, 2016 05:21
-
-
Save TurBoss/9be666058b4a6c297df8dc790b4ac8ee to your computer and use it in GitHub Desktop.
run dll cffi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from cffi import FFI | |
| ffi = FFI() | |
| ffi.cdef( | |
| """ | |
| bool IsUserAnAdmin(void); | |
| """ | |
| ) | |
| C = ffi.dlopen('shell32.dll') | |
| def test(): | |
| is_admin = C.IsUserAnAdmin() | |
| print(is_admin) | |
| if __name__ == "__main__": | |
| test() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment