コード例 #1
0
 def test_point_struct(self):
     ret = get_grammar().parseString(FIXTURE_POINT)
     expected = [
         'A', 'a', '=',
         ['B', 'a.b.c.d', '=', '24', 'C', 'e.f.g.h', '=', '42']
     ]
     self.assertTrue(str(ret) == str(expected))
コード例 #2
0
    def test_grammar(self):
        expr = get_grammar()
        ret = expr.parseString(FIXTURE_RECURSIVE)

        expected = [
            'PIO_STATUS_BLOCK', 'IoStatusBlock', '=',
            [
                'PVOID', 'Pointer', '=', '0x00000103', 'ULONG', 'Status', '=',
                '12855664', 'ULONG', 'Information', '=', '12855664',
                'PIO_STATUS_BLOCK', 'IoStatusBlock', '=',
                [
                    'PVOID', 'Pointer', '=', '0x00000103', 'ULONG', 'Status',
                    '=', '12855664', 'ULONG', 'Information', '=', '12855664',
                    'PIO_STATUS_BLOCK', 'IoStatusBlock', '=',
                    [
                        'PVOID', 'Pointer', '=', '0x00000103', 'ULONG',
                        'Status', '=', '12855664', 'ULONG', 'Information', '=',
                        '12855664', 'PUNICODE_STRING', 'ObjectName', '=',
                        '\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Srp\\GP\\DLL'
                    ]
                ]
            ]
        ]

        # Kinda lame but at least we have it
        self.assertTrue(str(ret) == str(expected))
コード例 #3
0
ファイル: parsing.py プロジェクト: nopper/maltrace
    def test_grammar(self):
        expr = get_grammar()
        ret = expr.parseString(FIXTURE_RECURSIVE)

        expected = ['PIO_STATUS_BLOCK', 'IoStatusBlock', '=', [
            'PVOID', 'Pointer', '=', '0x00000103',
            'ULONG', 'Status', '=', '12855664',
            'ULONG', 'Information', '=', '12855664',
            'PIO_STATUS_BLOCK', 'IoStatusBlock', '=', [
                'PVOID', 'Pointer', '=', '0x00000103',
                'ULONG', 'Status', '=', '12855664',
                'ULONG', 'Information', '=', '12855664',
                'PIO_STATUS_BLOCK', 'IoStatusBlock', '=', [
                'PVOID', 'Pointer', '=', '0x00000103',
                'ULONG', 'Status', '=', '12855664',
                'ULONG', 'Information', '=', '12855664',
                'PUNICODE_STRING', 'ObjectName', '=', '\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Srp\\GP\\DLL']]]]

            # Kinda lame but at least we have it
        self.assertTrue(str(ret) == str(expected))
コード例 #4
0
ファイル: parsing.py プロジェクト: nopper/maltrace
 def test_point_struct(self):
     ret = get_grammar().parseString(FIXTURE_POINT)
     expected = ['A', 'a', '=', ['B', 'a.b.c.d', '=', '24', 'C', 'e.f.g.h', '=', '42']]
     self.assertTrue(str(ret) == str(expected))