This file is indexed.

/usr/share/cain/gui/TableBase.py is in cain 1.10+dfsg-1.

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
import wx.grid

class TableBase(wx.grid.Grid):
    """Base class for tables displaying data."""
    def __init__(self, parent):
        wx.grid.Grid.__init__(self, parent)
        self.CreateGrid(1, 1)
        self.EnableEditing(False)

    def resize(self, numberOfRows, numberOfCols):
        """Resize the table."""
        if self.GetNumberRows() < numberOfRows:
            self.AppendRows(numberOfRows - self.GetNumberRows())
        elif self.GetNumberRows() > numberOfRows:
            self.DeleteRows(0, self.GetNumberRows() - numberOfRows)
        if self.GetNumberCols() < numberOfCols:
            self.AppendCols(numberOfCols - self.GetNumberCols())
        elif self.GetNumberCols() > numberOfCols:
            self.DeleteCols(0, self.GetNumberCols() - numberOfCols)

    def setColumnLabels(self, labels):
        for col in range(len(labels)):
            self.SetColLabelValue(col, labels[col])