/usr/share/pyshared/MoinMoin/xmlrpc/RemoteScript.py is in python-moinmoin 1.9.3-1ubuntu2.3.
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 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - Remote Script Execution Server part
@copyright: 2006 MoinMoin:ThomasWaldmann
@license: GNU GPL, see COPYING for details.
"""
from MoinMoin import log
logging = log.getLogger(__name__)
from MoinMoin.script import MoinScript
def execute(xmlrpcobj, their_secret, argv):
request = xmlrpcobj.request
their_secret = xmlrpcobj._instr(their_secret)
our_secret = request.cfg.secrets['xmlrpc/RemoteScript']
if our_secret != their_secret:
return u"Invalid password"
try:
logging.info("RemoteScript argv: %r" % argv)
MoinScript(argv).run(showtime=0)
except Exception, err:
logging.exception('An exception occurred.')
return xmlrpcobj._outstr(str(err))
return xmlrpcobj._outstr(u"OK")
|