Exemplo n.º 1
0
def install():
    "install the builtin resolver into the coro socket layer"
    coro.set_resolver (resolver())
Exemplo n.º 2
0
def t2():
    import coro.dns.stub_resolver
    r = coro.dns.stub_resolver.stub_resolver(['192.168.200.1'])
    coro.set_resolver(r)
Exemplo n.º 3
0
def t2():
    import coro.dns.stub_resolver
    r = coro.dns.stub_resolver.stub_resolver (['192.168.200.1'])
    coro.set_resolver (r)
Exemplo n.º 4
0
def install (nameserver_ips):
    "install a stub resolver into the coro socket layer"
    coro.set_resolver (
        stub_resolver (nameserver_ips)
        )
Exemplo n.º 5
0
def install():
    "install the builtin resolver into the coro socket layer"
    coro.set_resolver(resolver())
Exemplo n.º 6
0
def install(nameserver_ips):
    "install a stub resolver into the coro socket layer"
    coro.set_resolver(stub_resolver(nameserver_ips))
Exemplo n.º 7
0
def install (debug=False):
    "install the builtin resolver into the coro socket layer"
    coro.set_resolver (resolver (debug))
Exemplo n.º 8
0
# -*- Mode: Python; insert-tabs-mode: nil -*-

from coro.ssh.transport.client import SSH_Client_Transport
from coro.ssh.l4_transport.coro_socket_transport import coro_socket_transport
from coro.ssh.auth.userauth import Userauth
from coro.ssh.connection.interactive_session import Interactive_Session_Client
from coro.ssh.connection.connect import Connection_Service

import sys
import coro
# avoid full-blown dns resolver
coro.set_resolver (coro.dummy_resolver())

class client:

    # this is to avoid a PTR lookup, its value is not important
    hostname = 'host'

    def __init__ (self, ip, username, port=22):
        self.ip = ip
        self.port = port
        self.username = username

    def open (self):
        client = SSH_Client_Transport()
        transport = coro_socket_transport (self.ip, port=self.port, hostname=self.hostname)
        client.connect (transport)
        auth_method = Userauth (client, self.username)
        service = Connection_Service (client)
        client.authenticate (auth_method, service.name)
        channel = Interactive_Session_Client (service)
Exemplo n.º 9
0
# -*- Mode: Python; insert-tabs-mode: nil -*-

from coro.ssh.transport.client import SSH_Client_Transport
from coro.ssh.l4_transport.coro_socket_transport import coro_socket_transport
from coro.ssh.auth.userauth import Userauth
from coro.ssh.connection.interactive_session import Interactive_Session_Client
from coro.ssh.connection.connect import Connection_Service

import sys
import coro
# avoid full-blown dns resolver
coro.set_resolver(coro.dummy_resolver())


class client:

    # this is to avoid a PTR lookup, its value is not important
    hostname = 'host'

    def __init__(self, ip, username, port=22):
        self.ip = ip
        self.port = port
        self.username = username

    def open(self):
        client = SSH_Client_Transport()
        transport = coro_socket_transport(self.ip,
                                          port=self.port,
                                          hostname=self.hostname)
        client.connect(transport)
        auth_method = Userauth(client, self.username)