It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
#!/usr/bin/python
#################################################################################
# #
#.______ _______. ______ ___ .__ __. #
#| _ \ / | / | / \ | \ | | #
#| |_) | ______ | (----`| ,----' / ^ \ | \| | #
#| / |______| \ \ | | / /_\ \ | . ` | #
#| |\ \----. .----) | | `----./ _____ \ | |\ | #
#| _| `._____| |_______/ \______/__/ \__\ |__| \__| v0.2.0 #
# #
#GNU PL - 2015 - ca333 (modified by simcity4242) #
# #
#USE AT OWN RISK! #
#################################################################################
import json
import urllib2
import time
import sys
#for some reason blockchain.info api-chain is 59711 blocks short..
#blockstart = 170399
#blockstart += 59711
#blockcount = urllib2.urlopen("https://blockchain.info/en/q/getblockcount").read()
def rscan(addr):
"""Check address for duplicated r values."""
# TODO: add BCI API check address
print "WELCOME TO R-scan v0.1.2!"
print "ADDRESS-R-SCAN: "
urladdr = 'https://blockchain.info/address/%s?format=json&offset=%s'
###control api-url
#print str(urladdr[:-22] % addr)
addrdata = json.load(urllib2.urlopen(urladdr % (addr, '0')))
ntx = addrdata['n_tx']
print "Data for pubkey: " + str(addr) + " has " + str(addrdata['n_tx']).center(6) + "Tx%s" % 's'[ntx==1:]
#print "number of txs: " + str(addrdata['n_tx'])
#tx-details:
txs = []
for i in range(0, ntx//50 + 1):
sys.stderr.write("Fetching Txs from offset\t%s\n" % str(i*50))
jdata = json.load(urllib2.urlopen(urladdr % (addr, str(i*50))))
txs.extend(jdata['txs'])
#assert len(txs) == ntx
addrdata['txs'] = txs
y = 0
inputs = []
while y < ntx:
#print "#################################################################################"
#print "TX nr :" + str(y+1)
#print "hash: " + str(addrdata['txs'][y]['hash'])
#print "number of inputs: " + str(addrdata['txs'][y]['vin_sz'])
#only if
#if addrdata['txs'][y]['vin_sz'] > 1:
zy = 0
while zy < addrdata['txs'][y]['vin_sz']:
print "Input-ScriptNR " + str(zy+1) + " :" + str(addrdata['txs'][y]['inputs'][zy]['script'])
inputs.append(addrdata['txs'][y]['inputs'][zy]['script'])
zy += 1
y += 1
xi = 0
zi = 1
lenx = len(inputs)
alert = 0
bad = []
#compare the sig values in each input script
while xi < lenx-1:
x = 0
while x < lenx-zi:
if inputs[xi][10:74] == inputs[x+zi][10:74]:
print "In Input NR: " + str(xi) + "[global increment] " + str(inputs[xi])
print('\a')
print "Resued R-Value: "
print inputs[x+zi]
bad.append((int(x), str(inputs[x+zi][10:74])))
alert += 1
x += 1
zi += 1
xi += 1
#check duplicates
#alert when everything ok
if alert < 1:
print "Good pubKey. No problems."
else:
print "Address %s has %d reused R value%s!" % (addr, len(bad), "s"[len(bad)==1:])
return bad
if __name__ == '__main__':
from sys import argv
print """python rscan.py 1BFhrfTTZP3Nw4BNy4eX4KFLsn9ZeijcMm"""
if len(argv) == 1:
addr = raw_input("Enter Bitcoin address eg 1BFhrfTTZP3Nw4BNy4eX4KFLsn9ZeijcMm")
elif len(argv) == 2 and isinstance(argv[1], basestring):
addr = str(argv[1])
rscan(addr)
# 9ec4bc49e828d924af1d1029cacf709431abbde46d59554b62bc270e3b29c4b1
#!/usr/bin/python
#################################################################################
# #
#.______ _______. ______ ___ .__ __. #
#| _ \ / | / | / \ | \ | | #
#| |_) | ______ | (----`| ,----' / ^ \ | \| | #
#| / |______| \ \ | | / /_\ \ | . ` | #
#| |\ \----. .----) | | `----./ _____ \ | |\ | #
#| _| `._____| |_______/ \______/__/ \__\ |__| \__| v0.2.0 #
# #
#GNU PL - 2015 - ca333 (modified by simcity4242) #
# #
#USE AT OWN RISK! #
#################################################################################
import json
import urllib2
import time
import sys
#for some reason blockchain.info api-chain is 59711 blocks short..
#blockstart = 170399
#blockstart += 59711
#blockcount = urllib2.urlopen("https://blockchain.info/en/q/getblockcount").read()
def rscan(addr):
"""Check address for duplicated r values."""
# TODO: add BCI API check address
print "WELCOME TO R-scan v0.1.2!"
print "ADDRESS-R-SCAN: "
urladdr = 'https://blockchain.info/address/%s?format=json&offset=%s'
###control api-url
#print str(urladdr[:-22] % addr)
addrdata = json.load(urllib2.urlopen(urladdr % (addr, '0')))
ntx = addrdata['n_tx']
print "Data for pubkey: " + str(addr) + " has " + str(addrdata['n_tx']).center(6) + "Tx%s" % 's'[ntx==1:]
#print "number of txs: " + str(addrdata['n_tx'])
#tx-details:
txs = []
for i in range(0, ntx//50 + 1):
sys.stderr.write("Fetching Txs from offset\t%s\n" % str(i*50))
jdata = json.load(urllib2.urlopen(urladdr % (addr, str(i*50))))
txs.extend(jdata['txs'])
#assert len(txs) == ntx
addrdata['txs'] = txs
y = 0
inputs = []
while y < ntx:
#print "#################################################################################"
#print "TX nr :" + str(y+1)
#print "hash: " + str(addrdata['txs'][y]['hash'])
#print "number of inputs: " + str(addrdata['txs'][y]['vin_sz'])
#only if
#if addrdata['txs'][y]['vin_sz'] > 1:
zy = 0
while zy < addrdata['txs'][y]['vin_sz']:
print "Input-ScriptNR " + str(zy+1) + " :" + str(addrdata['txs'][y]['inputs'][zy]['script'])
inputs.append(addrdata['txs'][y]['inputs'][zy]['script'])
zy += 1
y += 1
xi = 0
zi = 1
lenx = len(inputs)
alert = 0
bad = []
#compare the sig values in each input script
while xi < lenx-1:
x = 0
while x < lenx-zi:
if inputs[xi][10:74] == inputs[x+zi][10:74]:
print "In Input NR: " + str(xi) + "[global increment] " + str(inputs[xi])
print('\a')
print "Resued R-Value: "
print inputs[x+zi]
bad.append((int(x), str(inputs[x+zi][10:74])))
alert += 1
x += 1
zi += 1
xi += 1
#check duplicates
#alert when everything ok
if alert < 1:
print "Good pubKey. No problems."
else:
print "Address %s has %d reused R value%s!" % (addr, len(bad), "s"[len(bad)==1:])
return bad
if __name__ == '__main__':
from sys import argv
print """python rscan.py 1BFhrfTTZP3Nw4BNy4eX4KFLsn9ZeijcMm"""
if len(argv) == 1:
addr = raw_input("Enter Bitcoin address eg 1BFhrfTTZP3Nw4BNy4eX4KFLsn9ZeijcMm")
elif len(argv) == 2 and isinstance(argv[1], basestring):
addr = str(argv[1])
rscan(addr)
# 9ec4bc49e828d924af1d1029cacf709431abbde46d59554b62bc270e3b29c4b1
scriptPubKey = OP_DUP OP_HASH160OP_EQUALVERIFY OP_CHECKSIG
scriptSig =
> btcc OP_DUP OP_HASH160 897c81ac37ae36f7bc5b91356cfb0138bfacb3c1 OP_EQUALVERIFY OP_CHECKSIG
> 76a914897c81ac37ae36f7bc5b91356cfb0138bfacb3c188ac
$db = new PDO('pgsql:dbname=explore;host=localhost;','pgsql','');
$count = $rpc->getblockcount();
for ($i=0;$i<=$count;$i++) {
$hash = $rpc->getblock($rpc->getblockhash($i));
foreach ($hash['tx'] as $tx) {
$raw = $rpc->getrawtransaction($tx);
if ($raw == -5) {
continue;
} else {
$x = $rpc->decoderawtransaction($raw);
if(is_array($x)) {
foreach ($x['vin'] as $vin) {
if (isset($vin['coinbase']))
continue;
$txid = $vin['txid'];
$stmt = $db->prepare('delete from tx where txid = :id');
$stmt->bindValue('id',$x['txid']);
$stmt->execute();
}
foreach ($x['vout'] as $index=>$out) {var_dump($out['value']);
$stmt = $db->prepare('insert into tx (txid,"value",n,pubkey,address) values (:id,:value,:n,:pubkey,:address)');
$stmt->bindValue(':id',$x['txid']);
$stmt->bindValue(':value',$out['value']);
$stmt->bindValue(':n',$index);
$stmt->bindValue(':pubkey',$out['scriptPubKey']['hex']);
$stmt->bindValue(':address',$out['scriptPubKey']['addresses'][0]);
$stmt->execute();
}
}
}
}
}
$stmt->bindValue(':pubkey',$out['scriptPubKey']['hex']);
$stmt->bindValue(':address',$out['scriptPubKey']['addresses'][0]);
47 | Push 71 bytes |
30 | Header byte indicating signature |
44 | Length of what follows (68 bytes) |
02 | Header byte for R |
20 | Length of R (32 bytes) |
7965.....ecd7 | R |
02 | Header byte for S |
20 | Length of S (32 bytes) |
4f08.....0eff | S |
01 | Hashtype byte (SIGHASH_ALL) |
------------------------------------ | ------------------------------------ |
41 | Push 65 bytes |
0441....bba5 | Pubkey |
47 | Push 71 bytes |
30 | Header byte indicating signature |
44 | Length of what follows (68 bytes) |
02 | Header byte for R |
20 | Length of R (32 bytes) |
7965.....ecd7 | R |
02 | Header byte for S |
20 | Length of S (32 bytes) |
4f08.....0eff | S |
01 | Hashtype byte (SIGHASH_ALL) |
------------------------------------ | ------------------------------------ |
41 | Push 65 bytes |
0441....bba5 | Pubkey |