예제 #1
0
    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")
예제 #2
0
    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")
예제 #3
0
    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")
예제 #4
0
    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)
예제 #5
0
    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")
예제 #6
0
    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)
예제 #7
0
    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)
예제 #8
0
    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")
예제 #9
0
    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)
예제 #10
0
    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()
예제 #11
0
    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()
예제 #12
0
    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()
예제 #13
0
    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()
예제 #14
0
 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())
예제 #15
0
 def __init__(self, argv):
     Command.__init__(self, argv, "po", "v")
     self.password = self.getPassword()
     self.outputFile, self.outputFileName = self.getOutputFile()
예제 #16
0
 def __init__(self, argv):
     Command.__init__(self, argv, "ota", "vx")
     self.outputFile, self.outputFileName = self.getOutputFile()
     self.tacks = self.getTacks()
     self.activationFlags = self._getActivationFlags()
예제 #17
0
 def __init__(self, argv):
     Command.__init__(self, argv, "o", "vx", 1)
     self.outputFile, self.outputFileName = self.getOutputFile()
     self.tackExtension = self.getTackExtension(extenderFormat=True)
예제 #18
0
 def __init__(self, argv):
     Command.__init__(self, argv, "o", "vx", 1)
     self.outputFile, self.outputFileName = self.getOutputFile()
     self.tackExtension = self.getTackExtension(extenderFormat=True)
예제 #19
0
 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")
예제 #20
0
 def __init__(self, argv):
     Command.__init__(self, argv, "oE", "vx")
     self.outputFile, self.outputFileName = self.getOutputFile()
     self.tackExtension = self.getTackExtension(mandatory=True)
예제 #21
0
 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()
예제 #22
0
    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()
예제 #23
0
 def __init__(self, argv):
     Command.__init__(self, argv, "oE", "vx")
     self.outputFile, self.outputFileName = self.getOutputFile()
     self.tackExtension = self.getTackExtension(mandatory=True)