Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I want to get the IP addresses list in the response returned by bitcoin.addr command

I would like to get the IP addresses of the peer list maintained by a bitcoin node. For this, I built the 'version', 'verack' and 'getaddr' messages using socket programming. I was able to get the 'addr' message from the corresponding bitcoin node. Now, further I would like to parse that addr response and get the list of IP addresses contained in it. I have tried using the bitcoin protocol documentation provided by the pyshark library. However, when I execute, pkt.bitcoin.addr.address or pkt.bitcoin.address.address, I get an Attribute error saying no such attribute exist. How can I parse such addr response for my further analysis?