This file is indexed.

/usr/lib/python2.7/dist-packages/ccnet/message.py is in libccnet0 6.0.2-2.

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
#coding: UTF-8

'''Message is the carrier of a simple Pub/Sub system on top of ccnet'''

import datetime
import re
import uuid
import time

MESSAGE_PATTERN = re.compile(r'(?P<flags>[\d]+) (?P<from>[^ ]+) (?P<to>[^ ]+) (?P<id>[^ ]+) (?P<ctime>[^ ]+) (?P<rtime>[^ ]+) (?P<app>[^ ]+) (?P<body>.*)')

class Message(object):
    def __init__(self, d):
        self.flags = int(d['flags'])
        self.from_ = d['from']
        self.to = d['to']
        self.id = d['id']
        self.ctime = float(d['ctime'])
        self.rtime = float(d['rtime'])
        self.app = d['app']
        self.body = d['body']

def message_from_string(s):
    results = MESSAGE_PATTERN.match(s)
    if results is None:
        raise RuntimeError('Bad message: %s' % s)

    d = results.groupdict()
    return Message(d)


def gen_inner_message_string(self_id, app, content):
    result = "%d %s %s %s %d %d %s %s\000" % (0, self_id, self_id, str(uuid.uuid1()),
                                            int(time.time()), 0,
                                            app, content)
    return result

def message_to_string(msg):
    f = '%(flags)s %(from_)s %(to)s %(id)s %(ctime)s %(rtime)s %(app)s %(body)s'
    return f % dict(flags=msg.flags,
                    from_=msg.from_,
                    to=msg.to,
                    id=msg.id,
                    ctime=msg.ctime,
                    rtime=msg.rtime,
                    app=msg.app,
                    body=msg.body)