Beispiel #1
0
 def test_long_crack_password(self):
     m = mellt.Mellt()
     password = '******'  # https://xkcd.com/936/
     self.assertEquals(1000000000, m.check_password(password))
Beispiel #2
0
 def test_check_common_password(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEquals(-1, m.check_password(password))
Beispiel #3
0
 def test_two_day_password(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEquals(2, m.check_password(password))
Beispiel #4
0
 def test_max_brute_force_common(self):
     m = mellt.Mellt()
     password = '******'
     #value taken from the php version
     self.assertEquals(1000000000, m._Mellt__brute_force_days(password))
Beispiel #5
0
 def test_check_empty_password(self):
     m = mellt.Mellt()
     password = ''
     self.assertEquals(-1, m.check_password(password))
Beispiel #6
0
 def test_char_set_single_number(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual('0123456789', m._Mellt__get_char_set(password))
Beispiel #7
0
 def test_short_brute_force(self):
     m = mellt.Mellt()
     password = '******'
     #value taken from the php version
     self.assertEquals(2, m._Mellt__brute_force_days(password))
Beispiel #8
0
 def test_last_common(self):
     m = mellt.Mellt()
     password = '******'
     self.assertTrue(m._Mellt__check_common(password))
Beispiel #9
0
 def test_not_common(self):
     m = mellt.Mellt()
     password = '******'
     self.assertFalse(m._Mellt__check_common(password))
Beispiel #10
0
 def test_char_set_multiple_extra_funny_characters(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-=_+[]\"{}|;':,./<>?`~", m._Mellt__get_char_set(password))
Beispiel #11
0
 def test_first_common(self):
     m = mellt.Mellt()
     password = '******'
     self.assertTrue(m._Mellt__check_common(password))
Beispiel #12
0
 def test_char_set_multiple_funny_characters(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-=_+", m._Mellt__get_char_set(password))
Beispiel #13
0
 def test_char_set_alphanum_numbers(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual('abcdefghijklmnopqrstuvwxyz0123456789', m._Mellt__get_char_set(password))
Beispiel #14
0
 def test_char_set_multiple_numbers(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual('0123456789', m._Mellt__get_char_set(password))
Beispiel #15
0
 def test_char_set_single_extra_funny_character(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-=_+[]\"{}|;':,./<>?`~", m._Mellt__get_char_set(password))
Beispiel #16
0
 def test_char_set_single_letter(self):
     m = mellt.Mellt()
     password = '******'
     self.assertEqual('abcdefghijklmnopqrstuvwxyz', m._Mellt__get_char_set(password))