Skip to content

Instantly share code, notes, and snippets.

@davidlares
Created February 5, 2020 21:44
Show Gist options
  • Save davidlares/04365b1ee98b45ff2366c237a708684d to your computer and use it in GitHub Desktop.
Save davidlares/04365b1ee98b45ff2366c237a708684d to your computer and use it in GitHub Desktop.
Admin role-type profile checker script for Windows-based OS (built-in modules from Python)
#!/usr/bin/python
import ctypes
if ctypes.wind11.shell32.IsUserAnAdmin() == 0:
print("[-] We do not have admin privileges")
else:
print('[+] We have admin privileges')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment