s-rah / onionscan

OnionScan is a free and open source tool for investigating the Dark Web.
https://twitter.com/OnionScan
Other
2.89k stars 599 forks source link

Add Bitcoin node version informatino #59

Closed laanwj closed 8 years ago

laanwj commented 8 years ago

This does the bare minimum to communicate with a Bitcoin node and gets its version message. Add the user agent and protocol version to the report.

This is the first Go code I've ever written, so it's probably a mess, sorry for that.

Example:

./onionscan -verbose nns4r54x3lfbrkq5.onion                                                  
2016/09/26 23:02:17 Starting Scan of nns4r54x3lfbrkq5.onion
2016/09/26 23:02:17 This might take a few minutes..
...
2016/09/26 23:02:27 INFO: Checking nns4r54x3lfbrkq5.onion Bitcoin(8333)
2016/09/26 23:02:28 INFO: Detected possible Bitcoin instance
2016/09/26 23:02:29 INFO: Found Bitcoin version: /Satoshi:0.13.99(Ereshkigal)/ (70014)
s-rah commented 8 years ago

This is awesome! Thanks for the PR - I'll take a look at code and get this merged in soon.

laanwj commented 8 years ago

Cool, let me know if anything should be done differently.

A future idea might be to use getaddr/addr messages to find other .onion peers to add to the scan.

laanwj commented 8 years ago

Done! Pushed a new version

And ran the source file through gofmt (without any specific arguments).

s-rah commented 8 years ago

Thanks!