mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 15:39:59 -07:00
raise error on non nas message
This commit is contained in:
committed by
Will Greenberg
parent
4009e3d1ed
commit
e47d4dacc4
@@ -6,7 +6,7 @@ import nasparse
|
||||
class TestNasparse(unittest.TestCase):
|
||||
imsi_sent_msg = '07412208391185184409309005f0700000100030023ed031d127298080211001000010810600000000830600000000000d00000300ff0003130184000a000005000010005c0a009011034f18a6f15d0103c1000000000000'
|
||||
sec_imsi_sent_msg = '1727db4b7c0207412208391185184409309005f0700000100030023ed031d127298080211001000010810600000000830600000000000d00000300ff0003130184000a000005000010005c0a009011034f18a6f15d0103c1'
|
||||
non_nas_msg = '1312deadbeefcafe'
|
||||
non_nas_msg = 'deadbeefcafe'
|
||||
other_nas_msg = '074413780004023fd121'
|
||||
other_nas_mt_msg = "023fd12100000000000000000000000000000000000000000000000000000000"
|
||||
ciphered_nas_msg = "27ed6146bd0162a5d62d62e1ce501720dc8bd84f1167fd"
|
||||
@@ -22,7 +22,8 @@ class TestNasparse(unittest.TestCase):
|
||||
self.assertEqual(self.run_heur(self.imsi_sent_msg), True, "sec_imsi_sent_msg should trigger heuristic")
|
||||
|
||||
def test_non_nas_msg(self):
|
||||
self.assertEqual(self.run_heur(self.non_nas_msg), False, "non_nas_msg should not trigger heuristic")
|
||||
with self.assertRaises(TypeError):
|
||||
self.run_heur(self.non_nas_msg)
|
||||
|
||||
def test_other_nas(self):
|
||||
self.assertEqual(self.run_heur(self.other_nas_msg), False, "other_nas_msg should not trigger heuristic")
|
||||
|
||||
Reference in New Issue
Block a user