def __init__(self, argv): Command.__init__(self, argv, "", "x", allowArgRemainder=True) if len(self.argRemainder) < 1: self.printError("Missing argument: file to view") if len(self.argRemainder) > 1: self.printError("Can only view one file")
def __init__(self, argv): Command.__init__(self, argv, "", "") if len(argv) < 1: self.printError("Missing argument: file to view") if len(argv) > 1: self.printError("Can only view one file")
def __init__(self, argv): Command.__init__(self, argv, "oib", "v") self.outputFile, self.outputFileName = self.getOutputFile() self.inputTack = self._getInputTack() self.inputCertificate = self._getInputCertificate() self.breakSignatures = self._getBreakSignatures() if self.inputTack is None and self.inputCertificate is None: self.printError("-i missing")
def __init__(self, argv): Command.__init__(self, argv, "", "") if len(argv) < 1: HelpCommand.printGeneralUsage() self.command = argv[0] if not self.command in HelpCommand.COMMANDS: self.printError("%s not a valid command." % self.command)
def __init__(self, argv): Command.__init__(self, argv, "", "", allowArgRemainder=True) if len(self.argRemainder) < 1 or len(self.argRemainder)>1: HelpCommand.printGeneralUsage() self.command = self.argRemainder[0] if not self.command in HelpCommand.COMMANDS: self.printError("%s not a valid command." % self.command)
def __init__(self, argv): Command.__init__(self, argv, "", "", allowArgRemainder=-1) if len(self.argRemainder) < 1 or len(self.argRemainder) > 1: HelpCommand.printGeneralUsage() self.command = self.argRemainder[0] if not self.command in HelpCommand.COMMANDS: self.printError("%s not a valid command." % self.command)
def __init__(self, argv): Command.__init__(self, argv, "kcopmgen", "v") self.password = self.getPassword() self.outputFile, self.outputFileName = self.getOutputFile() self.key = self.getKey(self.password) self.certificate = self._getCertificate() self.generation = self._getGeneration() self.min_generation = self._getMinGeneration() self.expiration = self._getExpiration() self.numArg = self._getTackCount()
def __init__(self, argv): Command.__init__(self, argv, "kcopmgen", "vx") self.password = self.getPassword() self.keyfile = self.getKeyFile(self.password, mandatory=True) self.certificate = self.getCertificate(mandatory=True) self.generation = self._getGeneration() self.min_generation = self._getMinGeneration() self.expiration = self._getExpiration(self.certificate) self.numArg = self._getNumArg() # If -n, then -o is a filename prefix only, so is not opened if self.numArg: self.outputFileName = self.getOutputFileName() return self.outputFile, self.outputFileName = self.getOutputFile()
def printGeneralUsage(message=None): if message: print("Error: %s\n" % message) sys.stdout.write("""tack.py version %s (%s) Commands (use "help <command>" to see optional args): genkey sign -k KEY -c CERT view FILE help COMMAND ("pack" and "unpack" are advanced commands for debugging) """ % (__version__, Command.getCryptoVersion())) sys.exit(-1)
def printGeneralUsage(message=None): if message: print ("Error: %s\n" % message) sys.stdout.write( """tack.py version %s (%s) Commands (use "help <command>" to see optional args): genkey sign -k KEY -c CERT view FILE help COMMAND ("pack" and "unpack" are advanced commands for debugging) """ % (__version__, Command.getCryptoVersion())) sys.exit(-1)
def __init__(self, argv): Command.__init__(self, argv, "o", "vx", 1) self.outputFile, self.outputFileName = self.getOutputFile() self.tackExtension = self.getTackExtension(extenderFormat=True)
def __init__(self, argv): Command.__init__(self, argv, "oE", "vx") self.outputFile, self.outputFileName = self.getOutputFile() self.tackExtension = self.getTackExtension(mandatory=True)
def __init__(self, argv): Command.__init__(self, argv, "pok", "v") self.password = self.getPassword() self.outputFile, self.outputFileName = self.getOutputFile() self.key = self.getKey(self.getPassword())
def __init__(self, argv): Command.__init__(self, argv, "po", "v") self.password = self.getPassword() self.outputFile, self.outputFileName = self.getOutputFile()
def __init__(self, argv): Command.__init__(self, argv, "ota", "vx") self.outputFile, self.outputFileName = self.getOutputFile() self.tacks = self.getTacks() self.activationFlags = self._getActivationFlags()
def __init__(self, argv): Command.__init__(self, argv, "oa", "vx", 1) self.outputFile, self.outputFileName = self.getOutputFile() self.tacks = self.getTacks() self.activationFlags = self._getActivationFlags()
def __init__(self, argv): Command.__init__(self, argv, "oib", "v") self.outputFile, self.outputFileName = self.getOutputFile() (self.inputTack, self.inputCertificate) = self._getInputFile() self.breakSignatures = self._getBreakSignatures()