This file is indexed.

/usr/share/pyshared/twms/overview.py is in twms 0.05t-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
# -*- coding: utf-8 -*-
#    This file is part of twms.

# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://www.wtfpl.net/ for more details.

from config import *
import projections

def html(ref):
    """
    Gives overall information about twms server and its layers in HTML format.
    """
    resp = "<!doctype html>"
    resp += "<html><head><title>"
    resp += wms_name
    resp += "</title></head><body><h2>"
    resp += wms_name
    resp += "</h2><table>"
    for i in layers:
      bbox =  layers[i].get("data_bounding_box", projections.projs[layers[i]["proj"]]["bounds"] )
      resp += "<tr><td><img src=\""
      resp += ref + "?layers=" + i+ "&amp;bbox=%s,%s,%s,%s" % bbox + "&amp;width=200&amp;format=image/png\" width=\"200\" /></td><td><h3>"
      resp += layers[i]["name"]
      resp += "</h3><b>Bounding box:</b> "+ str(bbox) +" (show on <a href=\"http://openstreetmap.org/?minlon=%s&amp;minlat=%s&amp;maxlon=%s&amp;maxlat=%s&amp;box=yes\">OSM</a>" % bbox  +")<br />"
      resp += "<b>Projection:</b> "+ layers[i]["proj"]  +"<br />"
      resp += "<b>WMS half-link:</b> "+ ref + "?layers=" + i + "&amp;<br />"
      resp += "<b>Tiles URL:</b> "+ ref + "" + i + "/!/!/!." + layers[i].get("ext", "jpg") + "<br />"
      resp += "</td></tr>"
    resp += "</table></body></html>"
    return resp