__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.148: ~ $
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license

"""asyncio library query support"""

import socket
import asyncio
import sys

import dns._asyncbackend
import dns.exception


_is_win32 = sys.platform == "win32"


def _get_running_loop():
    try:
        return asyncio.get_running_loop()
    except AttributeError:  # pragma: no cover
        return asyncio.get_event_loop()


class _DatagramProtocol:
    def __init__(self):
        self.transport = None
        self.recvfrom = None

    def connection_made(self, transport):
        self.transport = transport

    def datagram_received(self, data, addr):
        if self.recvfrom and not self.recvfrom.done():
            self.recvfrom.set_result((data, addr))

    def error_received(self, exc):  # pragma: no cover
        if self.recvfrom and not self.recvfrom.done():
            self.recvfrom.set_exception(exc)

    def connection_lost(self, exc):
        if self.recvfrom and not self.recvfrom.done():
            self.recvfrom.set_exception(exc)

    def close(self):
        self.transport.close()


async def _maybe_wait_for(awaitable, timeout):
    if timeout:
        try:
            return await asyncio.wait_for(awaitable, timeout)
        except asyncio.TimeoutError:
            raise dns.exception.Timeout(timeout=timeout)
    else:
        return await awaitable


class DatagramSocket(dns._asyncbackend.DatagramSocket):
    def __init__(self, family, transport, protocol):
        super().__init__(family)
        self.transport = transport
        self.protocol = protocol

    async def sendto(self, what, destination, timeout):  # pragma: no cover
        # no timeout for asyncio sendto
        self.transport.sendto(what, destination)
        return len(what)

    async def recvfrom(self, size, timeout):
        # ignore size as there's no way I know to tell protocol about it
        done = _get_running_loop().create_future()
        try:
            assert self.protocol.recvfrom is None
            self.protocol.recvfrom = done
            await _maybe_wait_for(done, timeout)
            return done.result()
        finally:
            self.protocol.recvfrom = None

    async def close(self):
        self.protocol.close()

    async def getpeername(self):
        return self.transport.get_extra_info("peername")

    async def getsockname(self):
        return self.transport.get_extra_info("sockname")


class StreamSocket(dns._asyncbackend.StreamSocket):
    def __init__(self, af, reader, writer):
        self.family = af
        self.reader = reader
        self.writer = writer

    async def sendall(self, what, timeout):
        self.writer.write(what)
        return await _maybe_wait_for(self.writer.drain(), timeout)

    async def recv(self, size, timeout):
        return await _maybe_wait_for(self.reader.read(size), timeout)

    async def close(self):
        self.writer.close()
        try:
            await self.writer.wait_closed()
        except AttributeError:  # pragma: no cover
            pass

    async def getpeername(self):
        return self.writer.get_extra_info("peername")

    async def getsockname(self):
        return self.writer.get_extra_info("sockname")


class Backend(dns._asyncbackend.Backend):
    def name(self):
        return "asyncio"

    async def make_socket(
        self,
        af,
        socktype,
        proto=0,
        source=None,
        destination=None,
        timeout=None,
        ssl_context=None,
        server_hostname=None,
    ):
        if destination is None and socktype == socket.SOCK_DGRAM and _is_win32:
            raise NotImplementedError(
                "destinationless datagram sockets "
                "are not supported by asyncio "
                "on Windows"
            )
        loop = _get_running_loop()
        if socktype == socket.SOCK_DGRAM:
            transport, protocol = await loop.create_datagram_endpoint(
                _DatagramProtocol,
                source,
                family=af,
                proto=proto,
                remote_addr=destination,
            )
            return DatagramSocket(af, transport, protocol)
        elif socktype == socket.SOCK_STREAM:
            if destination is None:
                # This shouldn't happen, but we check to make code analysis software
                # happier.
                raise ValueError("destination required for stream sockets")
            (r, w) = await _maybe_wait_for(
                asyncio.open_connection(
                    destination[0],
                    destination[1],
                    ssl=ssl_context,
                    family=af,
                    proto=proto,
                    local_addr=source,
                    server_hostname=server_hostname,
                ),
                timeout,
            )
            return StreamSocket(af, r, w)
        raise NotImplementedError(
            "unsupported socket " + f"type {socktype}"
        )  # pragma: no cover

    async def sleep(self, interval):
        await asyncio.sleep(interval)

    def datagram_connection_required(self):
        return _is_win32

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
quic Folder 0755
rdtypes Folder 0755
__init__.py File 1.61 KB 0644
_asyncbackend.py File 1.96 KB 0644
_asyncio_backend.py File 5.03 KB 0644
_curio_backend.py File 3.48 KB 0644
_immutable_ctx.py File 2.4 KB 0644
_trio_backend.py File 3.83 KB 0644
asyncbackend.py File 2.88 KB 0644
asyncquery.py File 24.68 KB 0644
asyncresolver.py File 10.24 KB 0644
dnssec.py File 42.17 KB 0644
dnssectypes.py File 1.76 KB 0644
e164.py File 3.88 KB 0644
edns.py File 13.69 KB 0644
entropy.py File 4.14 KB 0644
enum.py File 3.17 KB 0644
exception.py File 5.45 KB 0644
flags.py File 2.69 KB 0644
grange.py File 2.1 KB 0644
immutable.py File 1.79 KB 0644
inet.py File 4.9 KB 0644
ipv4.py File 2.02 KB 0644
ipv6.py File 6.05 KB 0644
message.py File 60.38 KB 0644
name.py File 33.62 KB 0644
namedict.py File 3.91 KB 0644
node.py File 12.37 KB 0644
opcode.py File 2.67 KB 0644
py.typed File 0 B 0644
query.py File 48.02 KB 0644
rcode.py File 4.06 KB 0644
rdata.py File 29.07 KB 0644
rdataclass.py File 2.91 KB 0644
rdataset.py File 16.67 KB 0644
rdatatype.py File 7.17 KB 0644
renderer.py File 10.42 KB 0644
resolver.py File 61.92 KB 0644
reversename.py File 3.74 KB 0644
rrset.py File 8.97 KB 0644
serial.py File 3.52 KB 0644
set.py File 8.88 KB 0644
tokenizer.py File 23.03 KB 0644
transaction.py File 21.12 KB 0644
tsig.py File 11.19 KB 0644
tsigkeyring.py File 2.58 KB 0644
ttl.py File 2.91 KB 0644
update.py File 11.96 KB 0644
version.py File 1.88 KB 0644
versioned.py File 11.5 KB 0644
win32util.py File 8.84 KB 0644
wire.py File 2.76 KB 0644
xfr.py File 12.96 KB 0644
zone.py File 49.86 KB 0644
zonefile.py File 26.84 KB 0644
zonetypes.py File 690 B 0644
Filemanager