tools v2.3
First appearance of DeDRM AppleScript application
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user