This file is indexed.

/usr/bin/window-mocker is in python-windowmocker 1.4+14.04.20140220.1-0ubuntu1.

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
#!/usr/bin/python
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# Copyright 2012-2014 Canonical, Ltd.
# Author: Thomi Richards
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.

from __future__ import print_function
import argparse
import sys

from windowmocker import (
    create_application_from_path, create_application_from_data)
from windowmocker.plugins import (
    get_default_plugin_name, get_registered_plugin_names)


def main():
    argument_parser = get_argument_parser()
    args = argument_parser.parse_args()
    try:
        if args.spec_file:
            application = create_application_from_path(args.spec_file, app_type_name=args.type)
        else:
            application = create_application_from_data(app_type_name=args.type)
    except IOError as e:
        print("Error: Unable to open file: %s" % e.strerror, file=sys.stderr)
        exit(1)
    except RuntimeError as e:
        print("Error: Unable to process request: %s" % e, file=sys.stderr)
        exit(3)


def get_argument_parser():
    parser = argparse.ArgumentParser(description="""A simple tool to create
        application windows to a given specification. This application is
        designed to aid in the development of functional test suites.""")
    parser.add_argument('spec_file', type=str, action="store", nargs="?",
        help="""The path to a JSON file that contains the specification of the
        window(s) you want to create. If this argument is missing, a single
        window with default parameters will be created.""")
    parser.add_argument('-t', '--type', type=str, action="store",
        choices=get_registered_plugin_names(), default=get_default_plugin_name(),
        help="""Select the application type."""
        )
    parser.add_argument('-testability', action='store_true',
        help="""Enable autopilot introspection. Only applies when the Qt plugin
        is used."""
        )
    return parser


if __name__ == '__main__':
    main()