<p>Use my code located <a href="https://gist.github.com/DesWurstes/8bfeac78dad31011dddd511cb0c1526d" rel="nofollow noreferrer">here</a>:</p>
<ul>
<li>In your working directory (that you cd'd into) create an <code>addr.txt</code> containing your list of addresses separated by space or a newline.</li>
<li>Run it as <code>python3 rscan.py 2&gt;out.txt</code>. It'll print the progress and if anything bad is found it'll be in <code>out.txt</code> in your working directory.</li>
</ul>

CC BY-SA 4.0
2021-01-26T11:10:24.693Z
thank you very much sir! please tell me is there any script which can scan blockchain for specific signature
Muhammad Adnan Alam
CC BY-SA 4.0
2021-01-26T11:10:27.110Z
thank you very much sir! please tell me is there any script which can scan blockchain for specific signature
Muhammad Adnan Alam
CC BY-SA 4.0
2021-01-26T11:22:47.813Z
This script collects all signatures from an address and checks for all matches. If it isn't, what do you specifically need?
MCCCS
CC BY-SA 4.0
2021-01-26T11:27:10.167Z
the script scan the entire blockchain and search for the signatures and find the match of given signature input
Muhammad Adnan Alam
CC BY-SA 4.0
2021-01-26T11:45:22.877Z
I don't have it, maybe you can ask about it in a new question? It sounds difficult to code since block explorers don't index by signature
MCCCS
CC BY-SA 4.0
2021-01-29T13:22:16.710Z
Dear MCCCS your script work fine for me and i got a key which has the reuse value for many times but the script is printing transaction input number and i don't know how to find it because signature is not indexed in blockchain. if it can print hash of transaction which has the reuse r value it will be bit easy to trace the transaction. please let me know if you have the solution.
Muhammad Adnan Alam
CC BY-SA 4.0
2021-01-29T14:07:06.360Z
@MuhammadAdnanAlam Here is my updated code that also prints hashes: https://gist.github.com/DesWurstes/937de5ce335fe255eccc23b2abded49e
MCCCS
CC BY-SA 4.0
2021-01-25T13:50:08.623Z
2021-01-25T13:50:08.623Z
MCCCS
<pre><code>hello friends here is the code to find reuse R values of bitcoin transaction but unfortunately it is not scanning more than 51 transaction secondly it can only use one address at a time and i want to use text file to check multiple addresses as well as i want to save the output in a text file please help me to sort out 
</code></pre>
<blockquote>
<p>import json</p>
</blockquote>
<blockquote>
<p>import urllib2</p>
</blockquote>
<blockquote>
<p>import time</p>
</blockquote>
<blockquote>
<p>import sys</p>
</blockquote>
<blockquote>
<p>#for some reason blockchain.info api-chain is 59711 blocks short..</p>
</blockquote>
<blockquote>
<p>blockstart = 170399</p>
</blockquote>
<blockquote>
<p>blockstart += 59711</p>
</blockquote>
<blockquote>
<p>blockcount = urllib2.urlopen(&quot;https://blockchain.info/de/q/getblockcount&quot;).read()</p>
</blockquote>
<blockquote>
<p>print &quot;WELCOME TO R-scan v0.1.2!&quot;</p>
</blockquote>
<blockquote>
<p>print &quot;ADDRESS-R-SCAN: &quot;</p>
</blockquote>
<blockquote>
<p>addr = raw_input(&quot;type address:  &quot;)</p>
</blockquote>
<blockquote>
<p>urladdr = &quot;https://blockchain.info/de/rawaddr/&quot; + str(addr)</p>
</blockquote>
<blockquote>
<p>#control api-url</p>
</blockquote>
<blockquote>
<p>print urladdr</p>
</blockquote>
<blockquote>
<p>addrdata = json.load(urllib2.urlopen(urladdr))</p>
</blockquote>
<blockquote>
<p>print &quot;Data for pubkey: &quot; + str(addr)</p>
</blockquote>
<blockquote>
<p>print &quot;number of txs: &quot; + str(addrdata['n_tx'])</p>
</blockquote>
<blockquote>
<p>#tx-details:</p>
</blockquote>
<blockquote>
<p>y = -0</p>
</blockquote>
<blockquote>
<p>inputs = []</p>
</blockquote>
<blockquote>
<p>while y &lt; addrdata['n_tx']:</p>
</blockquote>
<blockquote>
<p>print &quot;#################################################################################&quot;</p>
</blockquote>
<blockquote>
<p>print &quot;TX nr :&quot; + str(y+1)</p>
</blockquote>
<blockquote>
<p>print &quot;hash: &quot; + str(addrdata['txs'][y]['hash'])</p>
</blockquote>
<blockquote>
<p>print &quot;number of inputs: &quot; + str(addrdata['txs'][y]['vin_sz'])</p>
</blockquote>
<blockquote>
<p>#only if</p>
</blockquote>
<blockquote>
<p>#if addrdata['txs'][y]['vin_sz'] &gt; 1:</p>
</blockquote>
<blockquote>
<p>zy = 0</p>
</blockquote>
<blockquote>
<p>while zy &lt; addrdata['txs'][y]['vin_sz']:</p>
</blockquote>
<blockquote>
<pre><code>  print &quot;Input-ScriptNR &quot; + str(zy+1) + &quot; :&quot; + str(addrdata['txs'][y]['inputs'][zy]['script'])
</code></pre>
</blockquote>
<blockquote>
<pre><code>  inputs.append(addrdata['txs'][y]['inputs'][zy]['script'])
</code></pre>
</blockquote>
<blockquote>
<pre><code>  zy += 1
</code></pre>
</blockquote>
<blockquote>
<p>y += 1</p>
</blockquote>
<blockquote>
<p>print &quot;compare: &quot;</p>
</blockquote>
<blockquote>
<p>xi = 0</p>
</blockquote>
<blockquote>
<p>zi = 1</p>
</blockquote>
<blockquote>
<p>lenx = len(inputs)</p>
</blockquote>
<blockquote>
<p>alert = 0</p>
</blockquote>
<blockquote>
<p>#compare the sig values in each input script</p>
</blockquote>
<blockquote>
<p>while xi &lt; lenx-1:</p>
</blockquote>
<blockquote>
<p>x = 0</p>
</blockquote>
<blockquote>
<p>while x &lt; lenx-zi:</p>
</blockquote>
<blockquote>
<pre><code>  if inputs[xi][10:74] == inputs[x+zi][10:74]:
</code></pre>
</blockquote>
<blockquote>
<pre><code>      print &quot;In Input NR: &quot; + str(xi) + &quot;[global increment] &quot; + str(inputs[xi])
</code></pre>
</blockquote>
<blockquote>
<pre><code>      print('\a')
</code></pre>
</blockquote>
<blockquote>
<pre><code>                   print &quot;Resued R-Value: &quot;
</code></pre>
</blockquote>
<blockquote>
<pre><code>      print inputs[x+zi][10:74]
</code></pre>
</blockquote>
<blockquote>
<pre><code>                   alert += 1
</code></pre>
</blockquote>
<blockquote>
<pre><code>  x += 1
</code></pre>
</blockquote>
<blockquote>
<p>zi += 1</p>
</blockquote>
<blockquote>
<p>xi += 1</p>
</blockquote>
<blockquote>
<p>#check duplicates</p>
</blockquote>
<blockquote>
<p>#alert when everything ok</p>
</blockquote>
<blockquote>
<p>if alert &lt; 1:</p>
</blockquote>
<blockquote>
<p>print &quot;Good pubKey. No problems.&quot;</p>
</blockquote>
<blockquote>
<p>sys.exit()</p>
</blockquote>

<value><nonce>
hello please let me know whats wrong with this script for find Reuse R value
Muhammad Adnan Alam
# hello please let me know whats wrong with this script for find Reuse R value

(Asked by: username_0 on 2021-01-25)

```
hello friends here is the code to find reuse R values of bitcoin transaction but unfortunately it is not scanning more than 51 transaction secondly it can only use one address at a time and i want to use text file to check multiple addresses as well as i want to save the output in a text file please help me to sort out 

```

> 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/de/q/getblockcount").read()

> print "WELCOME TO R-scan v0.1.2!"

> print "ADDRESS-R-SCAN: "

> addr = raw\_input("type address: ")

> urladdr = "https://blockchain.info/de/rawaddr/" + str(addr)

> #control api-url

> print urladdr

> addrdata = json.load(urllib2.urlopen(urladdr))

> print "Data for pubkey: " + str(addr)

> print "number of txs: " + str(addrdata['n\_tx'])

> #tx-details:

> y = -0

> inputs = []

> while y < addrdata['n\_tx']:

> 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

> print "compare: "

> xi = 0

> zi = 1

> lenx = len(inputs)

> alert = 0

> #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][10:74]
>
> ```

> ```
>                    alert += 1
>
> ```

> ```
>   x += 1
>
> ```

> zi += 1

> xi += 1

> #check duplicates

> #alert when everything ok

> if alert < 1:

> print "Good pubKey. No problems."

> sys.exit()

**Tags:** value, nonce


---

## 1 answers

### Answer by username_1 on 2021-01-25. Score: 1 | Accepted answer

Use my code located [here](https://gist.github.com/DesWurstes/8bfeac78dad31011dddd511cb0c1526d):

* In your working directory (that you cd'd into) create an `addr.txt` containing your list of addresses separated by space or a newline.
* Run it as `python3 rscan.py 2>out.txt`. It'll print the progress and if anything bad is found it'll be in `out.txt` in your working directory.

> **Comments:**
> **username_0**: thank you very much sir! please tell me is there any script which can scan blockchain for specific signature  
> **username_0**: thank you very much sir! please tell me is there any script which can scan blockchain for specific signature  
> **username_1**: This script collects all signatures from an address and checks for all matches. If it isn't, what do you specifically need?  
> **username_0**: the script scan the entire blockchain and search for the signatures and find the match of given signature input  
> **username_1**: I don't have it, maybe you can ask about it in a new question? It sounds difficult to code since block explorers don't index by signature  
> **username_0**: Dear username_1 your script work fine for me and i got a key which has the reuse value for many times but the script is printing transaction input number and i don't know how to find it because signature is not indexed in blockchain. if it can print hash of transaction which has the reuse r value it will be bit easy to trace the transaction. please let me know if you have the solution.  
> **username_1**: @username_0 Here is my updated code that also prints hashes: https://gist.github.com/DesWurstes/937de5ce335fe255eccc23b2abded49e  

---

