Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def elevated?
- whoami = `whoami /groups` rescue nil
- if whoami =~ /S-1-16-12288/
- true
- else
- admin = `net localgroup administrators | find "%USERNAME%"` rescue ""
- admin.empty? ? false : true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement