Bitcoin Forum
April 26, 2024, 04:54:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Forcing all sends to a specific address?  (Read 651 times)
Envrin (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
December 24, 2013, 11:47:12 AM
 #1


Looking for a way to do this, and I'm assuming it requires hacking the bitcoind/-qt client.  Currently, there's functions such as "sendtoaddress" and "sendfrom" available in the bitcoind client.  What I need is ALL sends from the wallet to be automatically sent to one certain address, regardless of what address is given to those send functions.

For example, say I have an address ABC.  If sendtoaddress(XYC, 0.5) is executed on the wallet, I want the bitcoind client to send that 0.5 to ABC instead of XYZ.  I also need to send a quick HTTP request to a remote server before every transaction gets sent, get a response, and add that as a comment to the transaction upon sending.

I know this sounds sketchy, but it's actually legit, and being done for security reasons.  And we need this done within the bitcoind client itself, to make it more difficult for hackers to get into.  Any knowledge you can share on a way forward with this would be greatly appreciated.

1714150468
Hero Member
*
Offline Offline

Posts: 1714150468

View Profile Personal Message (Offline)

Ignore
1714150468
Reply with quote  #2

1714150468
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714150468
Hero Member
*
Offline Offline

Posts: 1714150468

View Profile Personal Message (Offline)

Ignore
1714150468
Reply with quote  #2

1714150468
Report to moderator
1714150468
Hero Member
*
Offline Offline

Posts: 1714150468

View Profile Personal Message (Offline)

Ignore
1714150468
Reply with quote  #2

1714150468
Report to moderator
elbandi
Hero Member
*****
Offline Offline

Activity: 525
Merit: 529


View Profile
December 24, 2013, 12:36:03 PM
 #2

try:
https://github.com/bitcoin/bitcoin/blob/master/src/rpcwallet.cpp#L323

change to:
Code:
CBitcoinAddress address("destaddress");

and search other rpc calls too (like createrawtransaction @ rpcrawtransaction.cpp, etc )

recompile the source
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 812
Merit: 1022

No Maps for These Territories


View Profile
December 24, 2013, 12:49:09 PM
 #3

You're right. This does sound sketchy.

I hope you are not stupid enough to actually try to abuse this now that you created a public topic.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
Envrin (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 251



View Profile
December 24, 2013, 12:55:20 PM
 #4

@elbandi -- Thanks, that helped loads!

I hope you are not stupid enough to actually try to abuse this now that you created a public topic.

Don't worry, it's for legit purposes.  We've been hacked to hell and back ourselves, hence the reasoning for this.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!