Gavin's bitcointools are nice for dumping blocks, but they require you to shutdown bitcoind, because bitcoin sets DB_PRIVATE flag, preventing outside users from using the multi-user database
See "getblockbycount" branch of git repository
https://github.com/jgarzik/bitcoinHere is sample command usage and output for block at height 71995:
$ /spare/repo/bitcoin.hacks/bitcoind -datadir=/garz/bitcoin/data getblock 71995
{
"hash" : "00000000002d1a4380793affbc610885aa2e0b224eeedd64ffe108044ec7d434",
"ver" : 1,
"prev_block" : "000000000103fcffbd8020ff7459f3635eb41102ee3b22fa466a7fdfc05bad58",
"mrkl_root" : "9d436c694968454ea0d17f4aece3b829930027c3cb918e5107a1605aa2eeae33",
"time" : 1280823515,
"bits" : 469830746,
"nonce" : 2918845955,
"n_tx" : 4,
"tx" : [
{
"hash" : "f85e77e4379694c8d2c1232d6fddfc7792073fb8484bdac37a9ba5ed1d245c57",
"ver" : 1,
"vin_sz" : 1,
"vout_sz" : 1,
"lock_time" : 0,
"in" : [
{
"prev_out" : {
"hash" : "0000000000000000000000000000000000000000000000000000000000000000",
"n" : 4294967295
},
"coinbase" : "045a0c011c0143"
}
],
"out" : [
{
"value" : 50.00000000000000,
"scriptPubKey" : "0xAD2D2527C630A3CF951703C4F44BB70F8C7524823F7095253D9412A1E9CAD1782B6B83228083A02485C20BC1870FB1A06C09DB768A5D27326A3E2FD859E7799204 OP_CHECKSIG"
}
]
},
{
"hash" : "38431f2f029a37a74a5b5bf0327f41a67b83aef8ad60a2efe918a8f1f0e7df1b",
"ver" : 1,
"vin_sz" : 1,
"vout_sz" : 1,
"lock_time" : 0,
"in" : [
{
"prev_out" : {
"hash" : "d9b308ca3484b7be6599c5050fec2cd2d31e654a0d2560989ffd28590bef6e6a",
"n" : 0
},
"scriptSig" : "0x01D82CD24A2C12E108087B9D9F81C49EF550F24D12668381D1D333D383B8EEB717200209F92E3246912CE4965E728963DF65FA63D9CCA10513CEF35C9BDCDC8018695F20024430"
}
],
"out" : [
{
"value" : 50.00000000000000,
"scriptPubKey" : "OP_DUP OP_HASH160 0x403FC36C7A1B5A9390F29343F4317F148A3ACB18 OP_EQUALVERIFY OP_CHECKSIG"
}
]
},
{
"hash" : "c61a96af68cce7329a450c18e3ac359d3052bda9187515a42fa7d262405213bd",
"ver" : 1,
"vin_sz" : 1,
"vout_sz" : 2,
"lock_time" : 0,
"in" : [
{
"prev_out" : {
"hash" : "1ff50ec1208497b333972da7dfdb2ba92c18da901df997d630b32981a013b783",
"n" : 0
},
"scriptSig" : "0x0132831D85F7395034FD537CADFB5BC3DF134347E73BD76352D31314686785B17320024351730466BEC02AD0A9D1F2BFBF4F246AFA8EE4B1BEE3FA8B83801B8301AF5820024430 0x51342C8A6D8C38C33413C63BE8CA93AD060BEA212D961EA63F4C76013E81978A06934604515C7941A729450A508CF556AD6B5061ADABF74C8F881C44B2405CDA04"
}
],
"out" : [
{
"value" : 0.05000000000000000,
"scriptPubKey" : "OP_DUP OP_HASH160 0xE183BC5BB9CEF757C51BCD8B864A8F2210114373 OP_EQUALVERIFY OP_CHECKSIG"
},
{
"value" : 0.4300000000000000,
"scriptPubKey" : "OP_DUP OP_HASH160 0x209F7B58DC860A2B0D2547FE659D78DFFC68FA77 OP_EQUALVERIFY OP_CHECKSIG"
}
]
},
{
"hash" : "d561a3594fcf97dd1a1abe7a1eda15c8e335aaaecf97f959de0595298d87c6d5",
"ver" : 1,
"vin_sz" : 1,
"vout_sz" : 2,
"lock_time" : 0,
"in" : [
{
"prev_out" : {
"hash" : "c61a96af68cce7329a450c18e3ac359d3052bda9187515a42fa7d262405213bd",
"n" : 1
},
"scriptSig" : "0x01DCDA3BAD3620FE246F2D973D6128123FC5F054121624852D98CEA4A3333128D00021025FFA265DA89861FC609792AD193204FCF0B2C1823B2D23052BCBD468274367BA0021024630 0x53B6705A0E13FD31A87C4F5F43ABDA77995B7CDA87B521043488254B16A122AFE99EA0BAE780CA19C6DCB733ECA9F42404B1F77951703B4057362704C126BD2304"
}
],
"out" : [
{
"value" : 0.05000000000000000,
"scriptPubKey" : "OP_DUP OP_HASH160 0x388E046D522A5EFDBFD272EAE11E9718F8C10FA0 OP_EQUALVERIFY OP_CHECKSIG"
},
{
"value" : 0.3800000000000000,
"scriptPubKey" : "OP_DUP OP_HASH160 0x1FC4B63556EB262B048F4A908875A62E338F7364 OP_EQUALVERIFY OP_CHECKSIG"
}
]
}
],
"mrkl_tree" : [
"f85e77e4379694c8d2c1232d6fddfc7792073fb8484bdac37a9ba5ed1d245c57",
"38431f2f029a37a74a5b5bf0327f41a67b83aef8ad60a2efe918a8f1f0e7df1b",
"c61a96af68cce7329a450c18e3ac359d3052bda9187515a42fa7d262405213bd",
"d561a3594fcf97dd1a1abe7a1eda15c8e335aaaecf97f959de0595298d87c6d5",
"b626f3cd7c1fd229bffbec34fab2700bc31659dbf2a74f7916701a18490125b4",
"dd74eea07e9bf2744655a9bab3a8cdbc5fe9a0c86ad18f42a2c259d40a83decb",
"9d436c694968454ea0d17f4aece3b829930027c3cb918e5107a1605aa2eeae33"
]
}