about summary refs log tree commit diff stats
path: root/example/ida/rpyc_ida.py
blob: 21faf43a4828151b82b2c0127dcce1ea70d777b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""rpyc IDA server"""

from rpyc.utils.server import OneShotServer
from rpyc.core import SlaveService



def serve_threaded(hostname="localhost", port=4455):
    """This will run a rpyc server in IDA, so a custom script client will be
    able to access IDA api.
    WARNING: IDA will be locked until the client script terminates.
    """

    print 'Running server'
    server = OneShotServer(SlaveService, hostname=hostname,
                           port=port, reuse_addr=True, ipv6=False,
                           authenticator=None,
                           auto_register=False)
    server.logger.quiet = False

    return server.start()


if __name__ == "__main__":
    serve_threaded()