Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: crofrihosl on September 16, 2019, 12:00:40 AM



Title: bot automatic sweep
Post by: crofrihosl on September 16, 2019, 12:00:40 AM
not sure if this the wrong section for this question please move it

- i want to know more about this and how it's works

i saw some compromised bitcoin addresses balance got sweeped in few seconds after deposit

- can i set up a similar service?



Title: Re: bot automatic sweep
Post by: legendster on September 16, 2019, 12:50:30 AM
Not sure what you are asking here.

So let me get this straight, you want to set up a service that would sweep compromised bitcoin addresses? or what?


Title: Re: bot automatic sweep
Post by: nc50lc on September 16, 2019, 03:24:06 AM
Not sure what you are asking here.

So let me get this straight, you want to set up a service that would sweep compromised bitcoin addresses? or what?
He must be talking about leaked private keys of addresses that are still receiving dust amounts,
Most of them were reported compromised Brainwallets.

Example: 1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN (https://www.blockchain.com/btc/address/1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN)
Notice the <15sec gap between receiving and sending transactions' timestamp.

@crofrihosl Some online forwarding services (I can't find the old ones) or a script like: bitcoin.stackexchange.com (https://bitcoin.stackexchange.com/questions/12280/how-automatically-to-forward-bitcoins-from-one-address-to-another) will work.
You need to install bitcoin core and change some of the code (depending on what is running) to use the latter.


Title: Re: bot automatic sweep
Post by: odolvlobo on September 16, 2019, 05:10:26 AM
You might find this thread to be interesting: Bitcoin Forum > Bitcoin > Development & Technical Discussion > Collection of 18.509 found and used Brainwallets (https://bitcointalk.org/index.php?topic=4768828.0)


Title: Re: bot automatic sweep
Post by: crofrihosl on September 16, 2019, 01:03:51 PM
Not sure what you are asking here.

So let me get this straight, you want to set up a service that would sweep compromised bitcoin addresses? or what?
He must be talking about leaked private keys of addresses that are still receiving dust amounts,
Most of them were reported compromised Brainwallets.

not them, i want to set up a new bot or script (i don't know what is it) with my own random list

-let say i have 1 million bitcoin address and i have the private key for each
-if i receive any  fund to any address i want that fund automatic transfer and immediately to one specific address

- how much will this cost me and what do i need?


Title: Re: bot automatic sweep
Post by: nc50lc on September 16, 2019, 01:41:23 PM
-let say i have 1 million bitcoin address and i have the private key for each
-if i receive any  fund to any address i want that fund automatic transfer and immediately to one specific address

- how much will this cost me and what do i need?
The cost? Depending on the Coder.
Go to Services (https://bitcointalk.org/index.php?board=52.0) (if you're paying with Bitcoins) and see if there's someone with positive rating is willing make you a script.

If you're planning to use something like the code in the link,
you're going to need to a full node with wallet.dat containing all of your pre-generated private keys (importing them will be time consuming)
You can ask and trust the programmer to make a .txt containing all the prv keys and use a command to be able to import them in one go (example (https://bitcoin.stackexchange.com/questions/69205/bitcoin-cli-importprivkey-to-the-same-user-or-different-users)) or do it yourself if you don't wan't to show him the keys;

and Ubuntu running on a decent spec PC.
I just need to tell you that those 1mil randomly generated private keys doesn't have a reasonable chance to hit a collision.


Title: Re: bot automatic sweep
Post by: thirdprize on September 18, 2019, 10:03:21 AM

-let say i have 1 million bitcoin address and i have the private key for each
-if i receive any  fund to any address i want that fund automatic transfer and immediately to one specific address


I have thought about doing this and have written code to generate keys and addresses.  A couple of things to think about.

  • The chances of someone else using the same addresses as you are VERY, VERY remote.  So remote it probably wont ever happen.
  • Running a bitcoin node might be quicker but querying an address from any of the online services takes about a second.  That is 11.5 days to query a million addresses.

That is a lot of power and internet for something that will (probably) never happen.


Title: Re: bot automatic sweep
Post by: adroitful_one on September 27, 2019, 02:20:03 AM
Blockchain.info has a pretty decent API also. I have used it a few times. If you don't want to run a full Bitcoin node, this may be the way to go. However, they do limit the amount of queries to the API per day unless you contact them and have them increase it. But, even the base amount of queries they give you is pretty large. You could code this whole application in php or something and have cronjobs to open the php page every x seconds to run the queries. Or, like others have mentioned, you could host a full node yourself.


Title: Re: bot automatic sweep
Post by: Dabs on September 27, 2019, 04:08:56 PM
There are some wallets out there (mostly from alts) that do something called autocombine and multisend, so in theory you just need to ask any decent blockchain coder to make your wallet for you.

I know one can make a wallet that either waits for every block, or waits for a transaction, then immediately forwards that to either a specific address, or randomly from a group of addresses. Or make it wait a few minutes in between checking so you can batch transactions and save on fees. Depending on your use case, you could do this every few hours instead of every minute.


If you don't want to run a Core wallet, you could maybe have some sort of script running on electrum; where you pregenerate (or use a large gap limit) your thousands of addresses. Millions would need some sort of custom implementation as that's not going to work on a core wallet efficiently.


Title: Re: bot automatic sweep
Post by: crofrihosl on September 27, 2019, 04:55:07 PM
There are some wallets out there (mostly from alts) that do something called autocombine and multisend, so in theory you just need to ask any decent blockchain coder to make your wallet for you.

I know one can make a wallet that either waits for every block, or waits for a transaction, then immediately forwards that to either a specific address, or randomly from a group of addresses. Or make it wait a few minutes in between checking so you can batch transactions and save on fees. Depending on your use case, you could do this every few hours instead of every minute.


If you don't want to run a Core wallet, you could maybe have some sort of script running on electrum; where you pregenerate (or use a large gap limit) your thousands of addresses. Millions would need some sort of custom implementation as that's not going to work on a core wallet efficiently.
thanks for now i am working on something but i will remember this reply