This file is indexed.

/usr/lib/python2.7/dist-packages/kodi/ps3/sixwatch.py is in kodi-eventclients-common 15.2+dfsg1-3ubuntu1.

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
#!/usr/bin/python
# -*- coding: utf-8 -*-

import pyudev
import sixpair
import threading

vendor  = 0x054c
product = 0x0268


def main(mac):
    context = pyudev.Context()
    monitor = pyudev.Monitor.from_netlink(context)
    monitor.filter_by(subsystem="usb")
    for action, device in monitor:
        if 'ID_VENDOR_ID' in device and 'ID_MODEL_ID' in device:
            if device['ID_VENDOR_ID'] == '054c' and device['ID_MODEL_ID'] == '0268':
                if action == 'add':
                    print "Detected sixaxis connected by usb"
                    try:
                        sixpair.set_pair_filename(device.attributes['busnum'], device.attributes['devnum'], mac)
                    except Exception, e:
                        print "Failed to check pairing of sixaxis: " + str(e)
                        pass



if __name__=="__main__":
    main((0,0,0,0,0,0))