This file is indexed.

/usr/lib/python2.7/dist-packages/hivex.py is in python-hivex 1.3.9-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# hivex generated file
# WARNING: THIS FILE IS GENERATED FROM:
#   generator/generator.ml
# ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
#
# Copyright (C) 2009-2014 Red Hat Inc.
# Derived from code by Petter Nordahl-Hagen under a compatible license:
#   Copyright (c) 1997-2007 Petter Nordahl-Hagen.
# Derived from code by Markus Stephany under a compatible license:
#   Copyright (c)2000-2004, Markus Stephany.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

"""Python bindings for hivex

import hivex
h = hivex.Hivex (filename)

The hivex module provides Python bindings to the hivex API for
examining and modifying Windows Registry 'hive' files.

Read the hivex(3) man page to find out how to use the API.
"""

import libhivexmod

class Hivex(object):
    """Instances of this class are hivex API handles."""

    def __init__ (self, filename, verbose = False, debug = False, write = False):
        """Create a new hivex handle."""
        flags = 0
        # Verbose messages
        if verbose: flags += 1
        # Debug messages
        if debug: flags += 2
        # Enable writes to the hive
        if write: flags += 4
        self._o = libhivexmod.open (filename, flags)

    def __del__ (self):
        libhivexmod.close (self._o)

    def root (self):
        """return the root node of the hive"""
        return libhivexmod.root (self._o)

    def last_modified (self):
        """return the modification time from the header of the hive"""
        return libhivexmod.last_modified (self._o)

    def node_name (self, node):
        """return the name of the node"""
        return libhivexmod.node_name (self._o, node)

    def node_name_len (self, node):
        """return the length of a node's name"""
        return libhivexmod.node_name_len (self._o, node)

    def node_timestamp (self, node):
        """return the modification time of the node"""
        return libhivexmod.node_timestamp (self._o, node)

    def node_children (self, node):
        """return children of node"""
        return libhivexmod.node_children (self._o, node)

    def node_get_child (self, node, name):
        """return named child of node"""
        return libhivexmod.node_get_child (self._o, node, name)

    def node_parent (self, node):
        """return the parent of node"""
        return libhivexmod.node_parent (self._o, node)

    def node_values (self, node):
        """return (key, value) pairs attached to a node"""
        return libhivexmod.node_values (self._o, node)

    def node_get_value (self, node, key):
        """return named key at node"""
        return libhivexmod.node_get_value (self._o, node, key)

    def value_key_len (self, val):
        """return the length of a value's key"""
        return libhivexmod.value_key_len (self._o, val)

    def value_key (self, val):
        """return the key of a (key, value) pair"""
        return libhivexmod.value_key (self._o, val)

    def value_type (self, val):
        """return data length and data type of a value"""
        return libhivexmod.value_type (self._o, val)

    def node_struct_length (self, node):
        """return the length of a node"""
        return libhivexmod.node_struct_length (self._o, node)

    def value_struct_length (self, val):
        """return the length of a value data structure"""
        return libhivexmod.value_struct_length (self._o, val)

    def value_data_cell_offset (self, val):
        """return the offset and length of a value data cell"""
        return libhivexmod.value_data_cell_offset (self._o, val)

    def value_value (self, val):
        """return data length, data type and data of a value"""
        return libhivexmod.value_value (self._o, val)

    def value_string (self, val):
        """return value as a string"""
        return libhivexmod.value_string (self._o, val)

    def value_multiple_strings (self, val):
        """return value as multiple strings"""
        return libhivexmod.value_multiple_strings (self._o, val)

    def value_dword (self, val):
        """return value as a DWORD"""
        return libhivexmod.value_dword (self._o, val)

    def value_qword (self, val):
        """return value as a QWORD"""
        return libhivexmod.value_qword (self._o, val)

    def commit (self, filename):
        """commit (write) changes to file"""
        return libhivexmod.commit (self._o, filename)

    def node_add_child (self, parent, name):
        """add child node"""
        return libhivexmod.node_add_child (self._o, parent, name)

    def node_delete_child (self, node):
        """delete child node"""
        return libhivexmod.node_delete_child (self._o, node)

    def node_set_values (self, node, values):
        """set (key, value) pairs at a node"""
        return libhivexmod.node_set_values (self._o, node, values)

    def node_set_value (self, node, val):
        """set a single (key, value) pair at a given node"""
        return libhivexmod.node_set_value (self._o, node, val)