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_pages -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Utility implementations of L{IResource}. """ __all__ = ( "errorPage", "notFound", "forbidden", ) from typing import cast from twisted.web import http from twisted.web.iweb import IRenderable, IRequest from twisted.web.resource import IResource, Resource from twisted.web.template import renderElement, tags class _ErrorPage(Resource): """ L{_ErrorPage} is a resource that responds to all requests with a particular (parameterized) HTTP status code and an HTML body containing some descriptive text. This is useful for rendering simple error pages. @see: L{twisted.web.pages.errorPage} @ivar _code: An integer HTTP status code which will be used for the response. @ivar _brief: A short string which will be included in the response body as the page title. @ivar _detail: A longer string which will be included in the response body. """ def __init__(self, code: int, brief: str, detail: str) -> None: super().__init__() self._code: int = code self._brief: str = brief self._detail: str = detail def render(self, request: IRequest) -> object: """ Respond to all requests with the given HTTP status code and an HTML document containing the explanatory strings. """ request.setResponseCode(self._code) request.setHeader(b"content-type", b"text/html; charset=utf-8") return renderElement( request, # cast because the type annotations here seem off; Tag isn't an # IRenderable but also probably should be? See # https://github.com/twisted/twisted/issues/4982 cast( IRenderable, tags.html( tags.head(tags.title(f"{self._code} - {self._brief}")), tags.body(tags.h1(self._brief), tags.p(self._detail)), ), ), ) def getChild(self, path: bytes, request: IRequest) -> Resource: """ Handle all requests for which L{_ErrorPage} lacks a child by returning this error page. @param path: A path segment. @param request: HTTP request """ return self def errorPage(code: int, brief: str, detail: str) -> _ErrorPage: """ Build a resource that responds to all requests with a particular HTTP status code and an HTML body containing some descriptive text. This is useful for rendering simple error pages. The resource dynamically handles all paths below it. Use L{IResource.putChild()} to override a specific path. @param code: An integer HTTP status code which will be used for the response. @param brief: A short string which will be included in the response body as the page title. @param detail: A longer string which will be included in the response body. @returns: An L{IResource} """ return _ErrorPage(code, brief, detail) def notFound( brief: str = "No Such Resource", message: str = "Sorry. No luck finding that resource.", ) -> IResource: """ Generate an L{IResource} with a 404 Not Found status code. @see: L{twisted.web.pages.errorPage} @param brief: A short string displayed as the page title. @param brief: A longer string displayed in the page body. @returns: An L{IResource} """ return _ErrorPage(http.NOT_FOUND, brief, message) def forbidden( brief: str = "Forbidden Resource", message: str = "Sorry, resource is forbidden." ) -> IResource: """ Generate an L{IResource} with a 403 Forbidden status code. @see: L{twisted.web.pages.errorPage} @param brief: A short string displayed as the page title. @param brief: A longer string displayed in the page body. @returns: An L{IResource} """ return _ErrorPage(http.FORBIDDEN, brief, message)