Skip to content

Instantly share code, notes, and snippets.

@TurBoss
Created June 13, 2016 05:21
Show Gist options
  • Select an option

  • Save TurBoss/9be666058b4a6c297df8dc790b4ac8ee to your computer and use it in GitHub Desktop.

Select an option

Save TurBoss/9be666058b4a6c297df8dc790b4ac8ee to your computer and use it in GitHub Desktop.
run dll cffi
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