This file is indexed.

/usr/bin/winpdb is in winpdb 1.4.8-3.

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

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
#! /usr/bin/python

"""
    winpdb

    A wrapper for winpdb.py

    Copyright (C) 2005-2009 Nir Aides

    This program is free software; you can redistribute it and/or modify it 
    under the terms of the GNU General Public License as published by the 
    Free Software Foundation; either version 2 of the License, or any later 
    version.

    This program 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 General Public License for more details.

    You should have received a copy of the GNU General Public License along 
    with this program; if not, write to the Free Software Foundation, Inc., 
    59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    
"""



import sys
import os



STR_VERSIONS_ERROR_TITLE = 'Warning'
STR_VERSIONS_ERROR_MSG = """Winpdb is being run with the wrong version of Python.
Winpdb path: %s
Python path: %s""" % (os.path.abspath(__file__), os.path.abspath(sys.executable))



def expandPath(p):
    if not '~' in p:
        return p

    d, b = os.path.split(p)

    if '~' in d:
        d = expandPath(d)

    if not '~' in b:
        return os.path.join(d, b)

    _prefix, _index = b.split('~', 1)
    prefix = _prefix.lower()
    index = int(_index)

    for f in os.listdir(d):
        if not f.replace(' ', '').lower().startswith(prefix):
            continue

        index -= 1
        if index == 0:
            return os.path.join(d, f)
            


if os.name == 'nt':
    path1 = expandPath(os.path.abspath(os.path.dirname(sys.executable))).lower()
    path2 = expandPath(os.path.abspath(os.path.dirname(__file__))).lower()

    if not path2.startswith(path1):
        sys.__stderr__.write(STR_VERSIONS_ERROR_MSG)
        
        try:
            import Tkinter
            import tkMessageBox

            Tkinter.Tk().wm_withdraw()
            tkMessageBox.showwarning(STR_VERSIONS_ERROR_TITLE, STR_VERSIONS_ERROR_MSG)

        except:
            pass



import winpdb



winpdb.main()