Created
September 11, 2013 17:58
-
-
Save acidprime/6527333 to your computer and use it in GitHub Desktop.
Get a 10.6 style AD Password using the bridge
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
#!/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python | |
from Cocoa import NSDictionary | |
def getTGTpassword(): | |
path = '/Library/Preferences/DirectoryService/ActiveDirectory.plist' | |
plist = NSDictionary.dictionaryWithContentsOfFile_(path) | |
if 'AD Computer Password' in plist: | |
nsdata = plist['AD Computer Password'] | |
print nsdata | |
else: | |
print 'This machine does not appear to have a password' | |
getTGTpassword() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment