Nmap Development mailing list archives

jsonrpc library and bitcoinrpc-info


From: Toni Ruottu <toni.ruottu () iki fi>
Date: Sat, 9 Jul 2011 11:24:43 +0300

  hey,

I've been building this minimal jsonrpc library, and thought I'd ask
for some feedback. I have attached the library, and a script
bitcoinrpc-info which uses the library. Bitcoinrpc-info queries the
rpc service of a bitcoin daemon for status information. I am using the
new creds library for maintaining credentials.

To try out the script, you need to get the bitcoin daemon from
http://www.bitcoin.org/
The Linux distribution package should come with binaries for both
32-bit and 64-bit.
I'm on 64-bit Ubuntu so I'd do

tar xzf bitcoin-0.3.24-linux.tar.gz
cd bitcoin-0.3.24/bin/64/
./bitcoind -datadir=. -rpcuser=foo -rpcpassword=bar

Setting the datadir to . should prevent the test from messing with
data from what ever other bitcoin software you might be using but
ofcourse I can not be 100% sure, so be careful. In this example I am
setting user name to foo and password to bar. If you do not specify a
username and a password the rpc interface will not come up.

You should be able to get some info out of the server by commanding
nmap -p 8332 --script bitcoinrpc-info --script-args
creds.global=foo:bar 127.0.0.1

  cheers, --Toni

Attachment: jsonrpc.lua
Description:

Attachment: bitcoinrpc-info.nse
Description:

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: