Beispiel #1
0
 def test_getTypesBinary(self):
     alphabet = list(map(chr, list(range(97, 123))))
     alpha = alphabet[random.randint(0, len(alphabet) - 1)]
     typeIdentifier = TypeIdentifier()
     hexOfNumber = str(hex(ord(alpha)))[2:]
     self.assertIn(Format.BINARY, typeIdentifier.getTypes(hexOfNumber))
Beispiel #2
0
 def test_getTypesAscii(self):
     alphabet = list(map(chr, list(range(97, 123))))
     alpha = alphabet[random.randint(0, len(alphabet) - 1)]
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.ASCII, typeIdentifier.getTypes(alpha))
Beispiel #3
0
 def test_getTypesBase64(self):
     string = "Vive Netzob !"
     base64String = base64.encodestring(string)
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.BASE64_ENC, typeIdentifier.getTypes(base64String))
 def test_getTypesBinary(self):
     alphabet = map(chr, range(97, 123))
     alpha = alphabet[random.randint(0, len(alphabet) - 1)]
     typeIdentifier = TypeIdentifier()
     hexOfNumber = str(hex(ord(alpha)))[2:]
     self.assertIn(Format.BINARY, typeIdentifier.getTypes(hexOfNumber))
Beispiel #5
0
 def test_getTypesNum(self):
     number = random.randint(0, 10000)
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.DECIMAL, typeIdentifier.getTypes(number))
 def test_getTypesBase64(self):
     string = "Vive Netzob !"
     base64String = base64.encodestring(string)
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.BASE64_ENC, typeIdentifier.getTypes(base64String))
 def test_getTypesAscii(self):
     alphabet = map(chr, range(97, 123))
     alpha = alphabet[random.randint(0, len(alphabet) - 1)]
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.ASCII, typeIdentifier.getTypes(alpha))
 def test_getTypesNum(self):
     number = random.randint(0, 10000)
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.DECIMAL, typeIdentifier.getTypes(number))
 def test_getTypesAlpha(self):
     alphabet = map(chr, range(97, 123))
     alpha = alphabet[random.randint(0, len(alphabet) - 1)]
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.ALPHA, typeIdentifier.getTypes(alpha))
Beispiel #10
0
 def test_getTypesAlpha(self):
     alphabet = list(map(chr, list(range(97, 123))))
     alpha = alphabet[random.randint(0, len(alphabet) - 1)]
     typeIdentifier = TypeIdentifier()
     self.assertIn(Format.ALPHA, typeIdentifier.getTypes(alpha))