Linux jobworks 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:53:05 UTC 2026 x86_64
Apache/2.4.58 (Ubuntu)
Server IP : 10.0.1.5 & Your IP : 216.73.217.52
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
twisted /
web /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-06-04 06:40
_auth
[ DIR ]
drwxr-xr-x
2026-06-04 06:40
newsfragments
[ DIR ]
drwxr-xr-x
2026-06-04 06:40
test
[ DIR ]
drwxr-xr-x
2026-06-04 06:40
__init__.py
384
B
-rw-r--r--
2026-05-22 14:58
_element.py
5.89
KB
-rw-r--r--
2026-05-22 14:58
_flatten.py
17.72
KB
-rw-r--r--
2026-05-22 14:58
_http2.py
47.48
KB
-rw-r--r--
2026-05-22 14:58
_newclient.py
62.33
KB
-rw-r--r--
2026-05-22 14:58
_responses.py
2.93
KB
-rw-r--r--
2026-05-22 14:58
_stan.py
10.69
KB
-rw-r--r--
2026-05-22 14:58
_template_util.py
30.77
KB
-rw-r--r--
2026-05-22 14:58
client.py
57.52
KB
-rw-r--r--
2026-05-22 14:58
demo.py
516
B
-rw-r--r--
2026-05-22 14:58
distrib.py
11.8
KB
-rw-r--r--
2026-05-22 14:58
domhelpers.py
8.88
KB
-rw-r--r--
2026-05-22 14:58
error.py
13.33
KB
-rw-r--r--
2026-05-22 14:58
guard.py
587
B
-rw-r--r--
2026-05-22 14:58
html.py
1.51
KB
-rw-r--r--
2026-05-22 14:58
http.py
110.22
KB
-rw-r--r--
2026-05-22 14:58
http_headers.py
8.86
KB
-rw-r--r--
2026-05-22 14:58
iweb.py
27.07
KB
-rw-r--r--
2026-05-22 14:58
microdom.py
36.41
KB
-rw-r--r--
2026-05-22 14:58
pages.py
3.94
KB
-rw-r--r--
2026-05-22 14:58
proxy.py
9.64
KB
-rw-r--r--
2026-05-22 14:58
resource.py
15.04
KB
-rw-r--r--
2026-05-22 14:58
rewrite.py
1.82
KB
-rw-r--r--
2026-05-22 14:58
script.py
5.64
KB
-rw-r--r--
2026-05-22 14:58
server.py
28.97
KB
-rw-r--r--
2026-05-22 14:58
soap.py
5.08
KB
-rw-r--r--
2026-05-22 14:58
static.py
36.61
KB
-rw-r--r--
2026-05-22 14:58
sux.py
20.39
KB
-rw-r--r--
2026-05-22 14:58
tap.py
10.02
KB
-rw-r--r--
2026-05-22 14:58
template.py
1.27
KB
-rw-r--r--
2026-05-22 14:58
twcgi.py
11.71
KB
-rw-r--r--
2026-05-22 14:58
util.py
749
B
-rw-r--r--
2026-05-22 14:58
vhost.py
4.32
KB
-rw-r--r--
2026-05-22 14:58
wsgi.py
21.45
KB
-rw-r--r--
2026-05-22 14:58
xmlrpc.py
20.65
KB
-rw-r--r--
2026-05-22 14:58
Save
Rename
# -*- test-case-name: twisted.web.test.test_soap -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ SOAP support for twisted.web. Requires SOAPpy 0.10.1 or later. Maintainer: Itamar Shtull-Trauring Future plans: SOAPContext support of some kind. Pluggable method lookup policies. """ # SOAPpy import SOAPpy from twisted.internet import defer # twisted imports from twisted.web import client, resource, server class SOAPPublisher(resource.Resource): """Publish SOAP methods. By default, publish methods beginning with 'soap_'. If the method has an attribute 'useKeywords', it well get the arguments passed as keyword args. """ isLeaf = 1 # override to change the encoding used for responses encoding = "UTF-8" def lookupFunction(self, functionName): """Lookup published SOAP function. Override in subclasses. Default behaviour - publish methods starting with soap_. @return: callable or None if not found. """ return getattr(self, "soap_%s" % functionName, None) def render(self, request): """Handle a SOAP command.""" data = request.content.read() p, header, body, attrs = SOAPpy.parseSOAPRPC(data, 1, 1, 1) methodName, args, kwargs = p._name, p._aslist, p._asdict # deal with changes in SOAPpy 0.11 if callable(args): args = args() if callable(kwargs): kwargs = kwargs() function = self.lookupFunction(methodName) if not function: self._methodNotFound(request, methodName) return server.NOT_DONE_YET else: if hasattr(function, "useKeywords"): keywords = {} for k, v in kwargs.items(): keywords[str(k)] = v d = defer.maybeDeferred(function, **keywords) else: d = defer.maybeDeferred(function, *args) d.addCallback(self._gotResult, request, methodName) d.addErrback(self._gotError, request, methodName) return server.NOT_DONE_YET def _methodNotFound(self, request, methodName): response = SOAPpy.buildSOAP( SOAPpy.faultType( "%s:Client" % SOAPpy.NS.ENV_T, "Method %s not found" % methodName ), encoding=self.encoding, ) self._sendResponse(request, response, status=500) def _gotResult(self, result, request, methodName): if not isinstance(result, SOAPpy.voidType): result = {"Result": result} response = SOAPpy.buildSOAP( kw={"%sResponse" % methodName: result}, encoding=self.encoding ) self._sendResponse(request, response) def _gotError(self, failure, request, methodName): e = failure.value if isinstance(e, SOAPpy.faultType): fault = e else: fault = SOAPpy.faultType( "%s:Server" % SOAPpy.NS.ENV_T, "Method %s failed." % methodName ) response = SOAPpy.buildSOAP(fault, encoding=self.encoding) self._sendResponse(request, response, status=500) def _sendResponse(self, request, response, status=200): request.setResponseCode(status) if self.encoding is not None: mimeType = 'text/xml; charset="%s"' % self.encoding else: mimeType = "text/xml" request.setHeader("Content-type", mimeType) request.setHeader("Content-length", str(len(response))) request.write(response) request.finish() class Proxy: """A Proxy for making remote SOAP calls. Pass the URL of the remote SOAP server to the constructor. Use proxy.callRemote('foobar', 1, 2) to call remote method 'foobar' with args 1 and 2, proxy.callRemote('foobar', x=1) will call foobar with named argument 'x'. """ # at some point this should have encoding etc. kwargs def __init__(self, url, namespace=None, header=None): self.url = url self.namespace = namespace self.header = header def _cbGotResult(self, result): result = SOAPpy.parseSOAPRPC(result) if hasattr(result, "Result"): return result.Result elif len(result) == 1: ## SOAPpy 0.11.6 wraps the return results in a containing structure. ## This check added to make Proxy behaviour emulate SOAPProxy, which ## flattens the structure by default. ## This behaviour is OK because even singleton lists are wrapped in ## another singleton structType, which is almost always useless. return result[0] else: return result def callRemote(self, method, *args, **kwargs): payload = SOAPpy.buildSOAP( args=args, kw=kwargs, method=method, header=self.header, namespace=self.namespace, ) return client.getPage( self.url, postdata=payload, method="POST", headers={"content-type": "text/xml", "SOAPAction": method}, ).addCallback(self._cbGotResult)