예제 #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