tools v2.3

First appearance of DeDRM AppleScript application
This commit is contained in:
Apprentice Alf
2010-12-02 18:10:46 +00:00
parent 506d97d5f0
commit 9162698f89
62 changed files with 5694 additions and 907 deletions

View File

@@ -31,6 +31,7 @@
# 5 - Clean up and improve 4.x changes;
# Clean up and merge OS X support by unknown
# 5.1 - add support for using OpenSSL on Windows in place of PyCrypto
# 5.2 - added support for output of key to a particular file
"""
Retrieve Adobe ADEPT user key.
@@ -415,6 +416,20 @@ class ExceptionDialog(Tkinter.Frame):
self.text.pack(fill=Tkconstants.BOTH, expand=1)
self.text.insert(Tkconstants.END, text)
def cli_main(argv=sys.argv):
keypath = argv[1]
try:
success = retrieve_key(keypath)
except ADEPTError, e:
print "Key generation Error: " + str(e)
return 1
except Exception, e:
print "General Error: " + str(e)
return 1
if not success:
return 1
return 0
def main(argv=sys.argv):
root = Tkinter.Tk()
root.withdraw()
@@ -438,4 +453,6 @@ def main(argv=sys.argv):
return 0
if __name__ == '__main__':
if len(sys.argv) > 1:
sys.exit(cli_main())
sys.exit(main())