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