ca333 / rng-scanner

python script to scan BTC blockchain for input scripts with reused r values
24 stars 34 forks source link

Scan more than 10,000 transactions #1

Closed DesWurstes closed 3 years ago

DesWurstes commented 4 years ago

And python3!

Blockchain.com had a limit of 10,000 transactions, so I changed the URL.

balasid1404 commented 3 years ago

it says index out of range can you post the fixed script please

DesWurstes commented 3 years ago

@balasid1404 Does it work now?

balasid1404 commented 3 years ago

Sir I will check it did you remove the index limit?

On Tue, 29 Sep 2020, 22:26 DesWurstes, notifications@github.com wrote:

@balasid1404 https://github.com/balasid1404 Does it work now?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-700845701, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYD3VRSDSZH477SZQYLSIIGS5ANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

Whoops sorry I noticed I just fixed another bug. I'll report once again once I fix the bug you found

DesWurstes commented 3 years ago

I fixed it, it should work now

balasid1404 commented 3 years ago

Sir I used it it work perfect now but how can I paste bulk addresses and scan them automatically? I am completely beginner for python can you help me?

On Tue, 29 Sep 2020, 23:26 DesWurstes, notifications@github.com wrote:

I fixed it, it should work now

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-700880799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYFBWHFOHFPTRSDD3RLSIINTZANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

I updated it once again. You can now use it like:

for param in 1MsHWS1BnwMc3tLE8G35UXsS58fKipzB7a 1CijKR7rDvJJBJfSPyUYrWC8kAsQLy2B2e; do python3 /rscan.py $param; done >/dev/null

It will print only if matches are found.

balasid1404 commented 3 years ago

I can't understand what you are saying can you just add all the command and enable it to just copy paste the address?? I am just starting to understand your program it will be a great help

DesWurstes commented 3 years ago

You can download the newer rscan.py and use Terminal commands to run it with different addresses. The Terminal command is:

for param in add addressed here; do python3 /rscan.py $param; done >/dev/null

where add addressed here are space separated addresses.

balasid1404 commented 3 years ago

But I hope if we can add the addresses in text file and then run a batch file to scan whole text file it will be easy can you please make it?

On Mon, 5 Oct 2020, 11:31 DesWurstes, notifications@github.com wrote:

You can download the newer rscan.py and use Terminal commands to run it with different addresses. The Terminal command is:

for param in add addressed here; do python3 /rscan.py $param; done >/dev/null

where add addressed here are space separated addresses.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-703415713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYHILY2GQYVCFM2DXNLSJFOLZANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

You can enter addresses in a file named a.txt separated by a space or newline and call the script as follows (paste into terminal):

for param in `cat a.txt`; do python3 rscan.py $param; done >/dev/null
balasid1404 commented 3 years ago

I did it but it says param is not defined and by terminal you mean cmd or linux terminal and please say step by step where to open like that I am a complete noob

On Mon, 5 Oct 2020, 22:34 DesWurstes, notifications@github.com wrote:

You can enter addresses in a file named a.txt separated by a space or newline and call the script as follows (paste into terminal):

for param in cat a.txt; do python3 rscan.py $param; done >/dev/null

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-703763193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYANDUI3ZXTAONPWC7LSJH4C5ANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

OK

a.txt in the current directory (Or use cd $HOME/Desktop for example if the file is on your desktop) should be like:

1ABC..
1DNS..

(Line separated addresses)

rscan.py should be in the same directory too. Then paste this:

for param in `cat a.txt`; do python3 rscan.py $param; done >/dev/null
balasid1404 commented 3 years ago

Can't I do this in windows?

On Fri, 9 Oct 2020, 21:03 DesWurstes, notifications@github.com wrote:

OK

  • Linux Terminal (or type bash and enter before running any other commands below)

a.txt in the current directory (Or use cd $HOME/Desktop for example if the file is on your desktop) should be like:

1ABC.. 1DNS..

(Line separated addresses)

rscan.py should be in the same directory too. Then paste this:

for param in cat a.txt; do python3 rscan.py $param; done >/dev/null

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-706250786, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYGSOINOZQSHR6YP6UDSJ4UOBANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

Okay, for Window just use my updated script: https://gist.github.com/DesWurstes/8bfeac78dad31011dddd511cb0c1526d with the standard python3 command

In the same directory as the updated script, the addresses must be in addr.txt

balasid1404 commented 3 years ago

Thanks a lot sir I admire your work a lot!! I hope I can become a programmer like you. I am doing vulnerability analysis with your code thanks a lot for this

On Fri, 9 Oct 2020, 22:02 DesWurstes, notifications@github.com wrote:

Okay, for Window just use my updated script: https://gist.github.com/DesWurstes/8bfeac78dad31011dddd511cb0c1526d with the standard python3 command

In the same directory as the updated script, the addresses must be in addr.txt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-706281058, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYEFGIYSU6FUGGX3TDTSJ43JZANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

You're welcome, happy to help, let me know if something goes wrong.

balasid1404 commented 3 years ago

It works perfectly but how can I store the output of each address as different text automatically?

On Fri, 9 Oct 2020, 22:06 DesWurstes, notifications@github.com wrote:

You're welcome, happy to help, let me know if something goes wrong.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-706283125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYFXOSMBXIAZKIO3ZGLSJ432LANCNFSM4PKHXPDA .

balasid1404 commented 3 years ago

I mean as text file

On Sat, 10 Oct 2020, 08:42 Bala Sidarthan, balausha1404@gmail.com wrote:

It works perfectly but how can I store the output of each address as different text automatically?

On Fri, 9 Oct 2020, 22:06 DesWurstes, notifications@github.com wrote:

You're welcome, happy to help, let me know if something goes wrong.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-706283125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYFXOSMBXIAZKIO3ZGLSJ432LANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

Call it as

python3 rscan.py 2>out.txt

it will print only the addresses and found matches to out.txt while printing progress to the command prompt normally so you can see that it's working.

balasid1404 commented 3 years ago

sir now it says again index list out of range and also the process is very slow now

DesWurstes commented 3 years ago

I fixed the index problem, updated at here: https://gist.github.com/DesWurstes/8bfeac78dad31011dddd511cb0c1526d

Is it still slow? I can't understand why it's so.

balasid1404 commented 3 years ago

Now it works perfectly sir no index error or slow issue if any issue persists I will forward it to you

On Mon, 12 Oct 2020, 21:36 DesWurstes, notifications@github.com wrote:

I fixed the index problem, updated at here: https://gist.github.com/DesWurstes/8bfeac78dad31011dddd511cb0c1526d

Is it still slow? I can't understand why it's so.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ca333/rng-scanner/pull/1#issuecomment-707209802, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5HXYAKMIDRQ5GJZZ5STSLSKMSPPANCNFSM4PKHXPDA .

DesWurstes commented 3 years ago

Excellent, thank you for telling me that it worked for you!

Luci-hub commented 3 years ago

Hi, when i scan an address i get this kind of results at out.txt Screenshot_2 it gives non re-used results at out.txt as well.

Call it as

python3 rscan.py 2>out.txt

it will print only the addresses and found matches to out.txt while printing progress to the command prompt normally so you can see that it's working.

DesWurstes commented 3 years ago

@Luci-hub Where's the problem so?

Luci-hub commented 3 years ago

@Luci-hub Where's the problem so?

It spams the r values and shows empty lines while saying that there are re-used r values

DesWurstes commented 3 years ago

The next lines after Reused R-value show the r value.

Luci-hub commented 3 years ago

The problem is this, it shows empty lines without giving re-used r values. And it spams it over and over again. Screenshot-3 Can you add something that can show txid as well?

DesWurstes commented 3 years ago

Sure, there is a newer version at https://gist.github.com/DesWurstes/937de5ce335fe255eccc23b2abded49e

It's used the same way.

Luci-hub commented 3 years ago

Screenshot_13 I dont understand this much however it seems like the problem with not showing re-used r value is not gone in this version again. Thank you for this new update.

Sure, there is a newer version at https://gist.github.com/DesWurstes/937de5ce335fe255eccc23b2abded49e

It's used the same way.

DesWurstes commented 3 years ago

Hello, it's now showing you the TXIDs, what are you trying to achieve?

Ah I see the issue now, this code doesn't work all the time... The address is probably safe, Let me see what I can do now to fix the code.

DesWurstes commented 3 years ago

Hello, I can't fix those false positives, it's too much work. I don't think there are any vulnerable addresses left anyway.

Luci-hub commented 3 years ago

thank you for your help

DesWurstes commented 3 years ago

You're welcome... as I said I can't help because my code doesn't work on even my computer.

Luci-hub commented 3 years ago

I see, thank you again. If you again decide to check the codes please let me know .

Ango87 commented 2 years ago

@DesWurstes sir please how i can contact you x help me

Ango87 commented 2 years ago

I got an error blink@localhost:/storage/emulated/0/Download/rng-scanner$ python3 rscan.py WELCOME TO R-scan v0.1.4! ADDRESS-R-SCAN: type address: 15Fho2TVSG9Q8Vr1Rg9sUH29x1oBkSFcgm https://api-r.bitcoinchain.com/v1/address/txs/15Fho2TVSG9Q8Vr1Rg9sUH29x1oBkSFcgm Traceback (most recent call last): File "/sdcard/Download/rng-scanner/rscan.py", line 49, in countdata = json.loads(request_source(countaddr)) File "/usr/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

RiaanGroen commented 2 years ago

I get the same error.

", line 44, in main countdata = json.loads(request_source(countaddr)) File "/usr/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)