示例#1
0
    def main(self):
        gui.app.exit_key_handler = self.close_app
        gui.app.title = u"Remote Shell"
        gui.app.menu = [ ( u"About", self.about ), ( u"Exit", self.close_app )]
        self.load_cfg()
        self.config()

        sock = socket(AF_INET,SOCK_STREAM)
        sock.connect((self.cfg["ip"],1025))
        btconsole.run_with_redirected_io(sock,btconsole.interact, None, None, locals())
示例#2
0
文件: connect.py 项目: z4nshin/mycode
import btconsole
from socket import *
sock = socket(AF_INET, SOCK_STREAM)
sock.connect(("192.168.2.2", 1025))
btconsole.run_with_redirected_io(sock,btconsole.interact, None, None, locals())
sock.close()