示例#1
0
文件: manhole.py 项目: 4rChon/gadget
def build_protocol():
    if have_required_settings("MANHOLE_BIND_ADDRESS", "MANHOLE_PASSWORD"):
        host, port = parse_hostname(get_setting("MANHOLE_BIND_ADDRESS"))
        manhole = manhole_factory()
        
        reactor.listenTCP(port, manhole, interface=host)
        
        return manhole
示例#2
0
文件: echoer.py 项目: 4rChon/gadget
def build_protocol():
    if have_required_settings("ECHOER_BIND_ADDRESS"):
        host, port = parse_hostname(get_setting("ECHOER_BIND_ADDRESS"))
        echoer = Echoer()
        
        reactor.listenUDP(port, echoer, interface=host)
        
        return echoer
示例#3
0
文件: IRC.py 项目: 4rChon/gadget
def build_protocol():
    if have_required_settings("NICKNAME", "IRC_CONNECTIONS"):
        irc = IRC(get_setting("NICKNAME"), get_setting("IRC_CONNECTIONS"))
        
        return irc