pwndbg: Ida Pro xmlrpc error when starting pwndbg without IDA

I am running pwndbg on WSL and don’t have IDA Pro installed. The latter causes an error on every startup when pwndbg checks for IDA Pro. This results in an error message ([!] Ida Pro xmlrpc error) followed by the stack trace of the causing error, which when looking at the code seems to be the intended behaviour. I feel this isn’t what should be happening in this case. If I don’t have IDA running it’s obvious that the connection fails and I therefore wouldn’t expect a stack trace.

I guess these are the two best solutions to this:

  1. Don’t show a stack trace on error. Looking at the code it seems that pwndbg always prints a stack trace if an error occurred when trying to connect to IDA Pro. Instead, it might just print a message (e.g. “Could not connect to IDA Pro xmlrpc”) and maybe print the error to some log file? (Not sure if there is one already or if that is even necessary)
  2. Add some kind of option to disable IDA before the startup. At the moment the integration can only be disabled with set ida-enabled off which can never be run before pwndbg was initialized and tries to connect to IDA for the first time. If for example there was a config file that pwndbg reads before startup I could simply disable IDA there.

I feel like the first solution would be better if it could be implemented somewhat decently, as it doesn’t require any additional changes by the user, but I’m not sure if it would be okay to just hide all the stack traces. There might be cases where it would be better to show a stack trace. The second option is certainly easier in that regard and it could also prevent the three second delay that the connection check causes on startup. On the other hand, I’m not sure where the best place for a config file would be and it might also be a bit confusing to have another config file somewhere else?

If there is a consensus on what the best solution would be I would implement that, but I would like to know what you think is the right thing to do. It might even be good to do both things in part?

Also here is the whole error message if you want to have a look: The error appears in pwndbg/ida.py in init_ida_rpc_client()

[!] Ida Pro xmlrpc error
Traceback (most recent call last):
  File "/mnt/d/Uni/SS18/exploits/pwndbg/pwndbg/pwndbg/ida.py", line 64, in init_ida_rpc_client
    _ida.here()
  File "/usr/lib/python3.4/xmlrpc/client.py", line 1098, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.4/xmlrpc/client.py", line 1437, in __request
    verbose=self.__verbose
  File "/usr/lib/python3.4/xmlrpc/client.py", line 1140, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.4/xmlrpc/client.py", line 1152, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.4/xmlrpc/client.py", line 1264, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib/python3.4/xmlrpc/client.py", line 1294, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python3.4/http/client.py", line 1121, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 951, in _send_output
    self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 886, in send
    self.connect()
  File "/usr/lib/python3.4/http/client.py", line 863, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python3.4/socket.py", line 512, in create_connection
    raise err
  File "/usr/lib/python3.4/socket.py", line 503, in create_connection
    sock.connect(sa)
InterruptedError: [Errno 4] Unterbrechung während des Betriebssystemaufrufs

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

I vote port 31337 😉

On Fri, May 11, 2018 at 1:26 PM Disconnect3d notifications@github.com wrote:

@vityafx https://github.com/vityafx

I have just downloaded the pwndbg from the dev branch and installed it

The log you pasted shows Pwndbg: 1.0.0 build: 8ecaa67 which is not the latest dev version (it’s ~3 months old).

I also checked it once again on latest dev version and it works fine. Please update pwndbg to the latest dev version (from this repo 😛) and use set ida-enabled off.

We might actually think of changing the default port to something more non-standard as it seems many people have some servers running at port 8888.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pwndbg/pwndbg/issues/440#issuecomment-388447159, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG0GA-tvFHwh7uxvH0gzGtdY_-ipsIUks5txdfsgaJpZM4TY3ah .