def __init__(self, openssl=None):
     Logger.__init__(self, "PA")
     self._content = None
     self._data = None
     if not openssl:
         self._openSSL = OpenSSL()
     else:
         self._openSSL = openssl
示例#2
0
 def __init__(self, openssl=None):
     Logger.__init__(self, "PA")
     self._content = None
     self._data = None
     if not openssl:
         self._openSSL = OpenSSL()
     else:
         self._openSSL = openssl
示例#3
0
 def __init__(self, reader, maxSize = 0xDF):
     """ 
     @param reader: A Reader
     @type Reader
     @param maxSize: The maximum buffer size accepted by the reader.
     @type maxSize: An integer (hexa)
     """
     Logger.__init__(self, "JCOP")
     self._maxSize = maxSize
     self._iso7816 = iso7816.Iso7816(reader)
    def __init__(self, iso7816):
        Logger.__init__(self, "AA TRACEABILITY")
        self._iso7816 = iso7816

        if type(self._iso7816) != type(Iso7816(None)):
            raise AATraceabilityException("The sublayer iso7816 is not available")

        self._iso7816.rstConnection()

        self._bac = None
示例#5
0
 def __init__(self, reader, maxSize = 0xDF):
     """
     @param reader: A Reader
     @type Reader
     @param maxSize: The maximum buffer size accepted by the reader.
     @type maxSize: An integer (hexa)
     """
     Logger.__init__(self, "JCOP")
     self._maxSize = maxSize
     self._iso7816 = iso7816.Iso7816(reader)
     self._iso7816.selectFile("04", "0C", "A0000002471001")
示例#6
0
    def __init__(self, iso7816, mrz=None):
        Logger.__init__(self, "MAC TRACEABILITY")
        self._iso7816 = iso7816
        self._mrz = mrz

        if type(self._iso7816) != type(Iso7816(None)):
            raise MacTraceabilityException("The sublayer iso7816 is not available")

        self._iso7816.rstConnection()

        self._bac = BAC(iso7816)
    def __init__(self, iso7816):
        Logger.__init__(self, "SIGN EVERYTHING ATTACK")
        self._iso7816 = iso7816

        if type(self._iso7816) != type(Iso7816(None)):
            raise SignEverythingException("The sublayer iso7816 is not available")

        self._iso7816.rstConnection()

        self._bac = bac.BAC(iso7816)
        self._openssl = OpenSSL()
    def __init__(self, iso7816):
        Logger.__init__(self, "AA TRACEABILITY")
        self._iso7816 = iso7816

        if type(self._iso7816) != type(Iso7816(None)):
            raise AATraceabilityException(
                "The sublayer iso7816 is not available")

        self._iso7816.rstConnection()

        self._bac = None
示例#9
0
 def __init__(self, iso7816):
     """  
     @param iso7816: A valid iso7816 object connected to a reader.
     @type iso7816: A iso7816 object
     """
     Logger.__init__(self, "BAC")
     self._iso7816 = iso7816
     self._ksenc = None
     self._ksmac = None
     self._kifd = None
     self._rnd_icc = None
     self._rnd_ifd = None
    def __init__(self, iso7816, mrz=None):
        Logger.__init__(self, "MAC TRACEABILITY")
        self._iso7816 = iso7816
        self._mrz = mrz

        if type(self._iso7816) != type(Iso7816(None)):
            raise MacTraceabilityException(
                "The sublayer iso7816 is not available")

        self._iso7816.rstConnection()

        self._bac = BAC(iso7816)
示例#11
0
 def __init__(self, iso7816):
     """
     @param iso7816: A valid iso7816 object connected to a reader.
     @type iso7816: A iso7816 object
     """
     Logger.__init__(self, "BAC")
     self._iso7816 = iso7816
     self._ksenc = None
     self._ksmac = None
     self._kifd = None
     self._rnd_icc = None
     self._rnd_ifd = None
示例#12
0
 def __init__(self, iso7816, maxSize = 0xE0):
     """ 
     @param iso7816: The layer sending iso7816 apdu to the reader.
     @type iso7816: A iso7816 object
     @param maxSize: The maximum buffer size accepted by the reader.
     @type maxSize: An integer (hexa)
     """
     Logger.__init__(self, "DataGroupReader")
     self._iso7816 = iso7816
     
     self._file = DataGroupFile()
     self._bodySize = 0
     self._bodyOffset = 0    #The beginning of the body data
     self._offset = 0
     self._maxSize = maxSize
     self.processed = Events()
示例#13
0
    def __init__(self, iso7816, maxSize = 0xDF):
        """
        @param iso7816: The layer sending iso7816 apdu to the reader.
        @type iso7816: A iso7816 object
        @param maxSize: The maximum buffer size accepted by the reader.
        @type maxSize: An integer (hexa)
        """
        Logger.__init__(self, "DataGroupReader")
        self._iso7816 = iso7816

        self._file = DataGroupFile()
        self._bodySize = 0
        self._bodyOffset = 0    #The beginning of the body data
        self._offset = 0
        self._maxSize = maxSize
        self.processed = Events()
示例#14
0
    def __init__(self, iso7816, activateReader=True):
        Logger.__init__(self, "BRUTE FORCE")

        if activateReader:
            self._iso7816 = iso7816
            if type(self._iso7816) != type(Iso7816(None)):
                raise MacTraceabilityException("The sublayer iso7816 is not available")
            self._iso7816.rstConnection()
            #self._bac = BAC(iso7816)

        self._id_low = None
        self._id_high = None
        self._dob_low = None
        self._dob_high = None
        self._exp_date_low = None
        self._exp_date_high = None

        self._weighting = [7,3,1]
        self._id_values = {'<':0, '0':0, '1':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, 'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15, 'G':16, 'H':17, 'I':18, 'J':19, 'K':20, 'L':21, 'M':22, 'N':23, 'O':24, 'P':25, 'Q':26, 'R':27, 'S':28, 'T':29, 'U':30, 'V':31, 'W':32, 'X':33, 'Y':34, 'Z':35}
        self._inv_id_values = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
示例#15
0
    def __init__(self, iso7816, path="error.dat"):
        Logger.__init__(self, "ERROR FINGERPRINTING")
        self._iso7816 = iso7816

        if type(self._iso7816) != type(Iso7816(None)):
            raise MacTraceabilityException("The sublayer iso7816 is not available")

        self._iso7816.rstConnection()

        self._path = path

        if os.path.exists(path):
            with open(path, 'rb') as file_errors:
                my_unpickler = pickle.Unpickler(file_errors)
                self.errors = my_unpickler.load()
        else:
            self.errors = { "0000000000": { "0x6d 0x0": {   "BEL": ["2009", "2011"],
                                                            "FRA": ["2010"]
                                                        }
                                          }
                          }
    def __init__(self, iso7816, openssl=None):
        """
        @param iso7816: a valid iso7816 object
        @type iso7816: doc9303
        """
        Logger.__init__(self, "AA")
        self._iso7816 = iso7816
        if not openssl:
            self._openssl = OpenSSL()
        else:
            self._openssl = openssl

        self.RND_IFD = None
        self.F = None
        self.T = None
        self.decryptedSignature = None
        self.D = None
        self.D_ = None
        self.M1 = None
        self.M_ = None

        self._dg15 = None
    def __init__(self, iso7816, openssl=None):
        """
        @param iso7816: a valid iso7816 object
        @type iso7816: doc9303  
        """
        Logger.__init__(self, "AA")
        self._iso7816 = iso7816
        if not openssl:
            self._openssl = OpenSSL()
        else:
            self._openssl = openssl
        self._openssl.register(self.log)
        self.RND_IFD = None
        self.F = None
        self.T = None
        self.decryptedSignature = None
        self.D = None
        self.D_ = None
        self.M1 = None
        self.M_ = None

        self._dg15 = None
示例#18
0
 def __init__(self):
     Logger.__init__(self, "READER")
示例#19
0
    def __init__(self, iso7816, activateReader=True):
        Logger.__init__(self, "BRUTE FORCE")

        if activateReader:
            self._iso7816 = iso7816
            if type(self._iso7816) != type(Iso7816(None)):
                raise MacTraceabilityException("The sublayer iso7816 is not available")
            self._iso7816.rstConnection()
            # self._bac = BAC(iso7816)

        self._id_low = None
        self._id_high = None
        self._dob_low = None
        self._dob_high = None
        self._exp_date_low = None
        self._exp_date_high = None

        self._weighting = [7, 3, 1]
        self._id_values = {
            "<": 0,
            "0": 0,
            "1": 1,
            "2": 2,
            "3": 3,
            "4": 4,
            "5": 5,
            "6": 6,
            "7": 7,
            "8": 8,
            "9": 9,
            "A": 10,
            "B": 11,
            "C": 12,
            "D": 13,
            "E": 14,
            "F": 15,
            "G": 16,
            "H": 17,
            "I": 18,
            "J": 19,
            "K": 20,
            "L": 21,
            "M": 22,
            "N": 23,
            "O": 24,
            "P": 25,
            "Q": 26,
            "R": 27,
            "S": 28,
            "T": 29,
            "U": 30,
            "V": 31,
            "W": 32,
            "X": 33,
            "Y": 34,
            "Z": 35,
        }
        self._inv_id_values = [
            "0",
            "1",
            "2",
            "3",
            "4",
            "5",
            "6",
            "7",
            "8",
            "9",
            "A",
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "J",
            "K",
            "L",
            "M",
            "N",
            "O",
            "P",
            "Q",
            "R",
            "S",
            "T",
            "U",
            "V",
            "W",
            "X",
            "Y",
            "Z",
        ]
示例#20
0
 def __init__(self):
     Logger.__init__(self, "DataGroup")
示例#21
0
 def __init__(self):
     Logger.__init__(self, "SM")
示例#22
0
 def __init__(self):
     Logger.__init__(self, "SM")
示例#23
0
 def __init__(self):
     Logger.__init__(self, "READER")
示例#24
0
 def __init__(self):
     Logger.__init__(self, "DataGroup")
 def __init__(self):
     Logger.__init__("Creation")
示例#26
0
 def __init__(self):
     Logger.__init__("Creation")
示例#27
0
 def __init__(self, geojasperLocation="geojasper"):
     Logger.__init__(self)
     self._geojasperLocation = geojasperLocation
示例#28
0
 def __init__(self, reader):
     Logger.__init__(self, "ISO7816")
     self._reader = reader
     self._ciphering = False
示例#29
0
 def __init__(self, reader):
     Logger.__init__(self, "ISO7816")
     self._reader = reader
     self._ciphering = False
示例#30
0
 def __init__(self, config="", opensslLocation="openssl"):
     Logger.__init__(self, "OPENSSL")
     self._opensslLocation = opensslLocation
     self._config = config
示例#31
0
 def __init__(self, config="", opensslLocation="openssl"):
     Logger.__init__(self, "OPENSSL")
     self._opensslLocation = opensslLocation
     self._config = config