This file is indexed.

/usr/share/kannel/contrib/smstomail.cgi is in kannel-extras 1.4.3-2fakesync2build1.

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

MAIL_SENDER = "liw"
MAIL_RECEIVER = "liw"

import cgi, os, string

class Vars:
    def __init__(self):
    	self._dict = cgi.FieldStorage()

    def __getitem__(self, key):
    	return self._dict[key].value

def smstomail():
    print "Content-Type: text/plain"
    print ""
    
    v = Vars()
    
    f = os.popen("/usr/sbin/sendmail -oi %s" % MAIL_RECEIVER, "w")
    f.write("From: %s\nTo: %s\nSubject: SMS message from %s\n\n%s:\n%s\n" %
    	    (MAIL_SENDER, MAIL_RECEIVER, v["from"], v["to"], v["text"]))
    f.close()
    
    print "Sent via mail to receiver."

if __name__ == "__main__":
    smstomail()