r/BitcoinAirdrops • • Feb 01 '18

I made a simple Python script to help using ymgve's script.

Hey,
We all know how great bitcoin_fork_claimer is.

But since it can require quite an effort to use it, specially for those having many addresses, I made a small script to help. Link: https://gist.github.com/ottosch/c5ba96ff296ddf95b36e498654faf871

Enter your address(es) and run it. It will search blockchain.info for valid transactions for each fork and output the commands to be used in bitcoin_fork_claimer. Example:

Bitcoin Pizza (BPA)
python claimer.py BPA ba3047b53972f93e6ca70f45797fb91fde5114c978f8b1d7e3e25cfbc4d03d12 PRIV_KEY_OF_1HTmbaeSZn7faPjxcSeEHJoxgBGMxJYYem 1HTmbaeSZn7faPjxcSeEHJoxgBGMxJYYem BPA_ADDR

python claimer.py BPA 66c6aa9136ac8bc19347210a1c820c111075738ff18bcd315ca29c7bc5828168 PRIV_KEY_OF_15ZvPgCkTrkKsUzw8PaianK6W7sZQhTMK1 15ZvPgCkTrkKsUzw8PaianK6W7sZQhTMK1 BPA_ADDR

Segwit2x (B2X)
python claimer.py B2X ba3047b53972f93e6ca70f45797fb91fde5114c978f8b1d7e3e25cfbc4d03d12 PRIV_KEY_OF_1HTmbaeSZn7faPjxcSeEHJoxgBGMxJYYem 1HTmbaeSZn7faPjxcSeEHJoxgBGMxJYYem B2X_ADDR

python claimer.py B2X 66c6aa9136ac8bc19347210a1c820c111075738ff18bcd315ca29c7bc5828168 PRIV_KEY_OF_15ZvPgCkTrkKsUzw8PaianK6W7sZQhTMK1 15ZvPgCkTrkKsUzw8PaianK6W7sZQhTMK1 B2X_ADDR

(the other forks)

Replace your private key and "forkcoin" address for each command.

If you find any bugs, let me know. You can PM the BTC address used, so I can check.

Edit (5 Fev): you can also specify which forks you want, to avoid output from unwanted forks.
Example: python fork-helper.py bcx b2x btv
Invalid forks are ignored.

Edit (9 Fev): added BTT.
Edit (???): added other forks.

Edit (5 Mar): now showing your balance at the end of the output. You can also add "-balance" to show only the balance (won't output the commands).

23 Upvotes

46 comments sorted by

2

u/[deleted] Feb 01 '18 edited Feb 01 '18

I've successfully used ymgve's script to claim forks, but still new with this. Can you pretend you're explaining it to a child, with explicit detail?

Here are my steps & where I got stuck:

Open python 2.7 > Run cmd.exe (windows 10) > Navigate to fork-helper destination folder > Input the BTC address that I want to check > Receive: "Address" is not recognized as an internal or external command, operable program or batch file

Any help here would be much appreciated.

1

u/ottoteixeira Feb 01 '18

You have to edit fork_helper.py (it's a text file) and add your addresses. There are 2 addresses there. Just replace with yours.

Then you run the script the same way you did with ymgve's.

I'm not a Windows user, but it's probably something like "python fork_helper.py". How did you run ymgve's?

1

u/[deleted] Feb 02 '18

Ah I see. Had to edit using IDLE to insert addresses. Worked great, thanks!

2

u/wheyjuice Feb 02 '18

Curious, but if I spent out of the same address multiple times with no change address, how does this script find all the UTXO and TXID with a remaining balance? Since if you use the same address as change, it would seem you could have lots of txid with lingering dust. Are you able to find which txid's still hold balance through https://blockchain.info/rawaddr/ ?

1

u/ottoteixeira Feb 02 '18

It simply picks all transactions that happened prior to the fork block. Then removes those that were used as inputs to other transactions (prior to the fork, of course). Does that answer your question?
Edit: and yeah, all extracted from blockchain.info.

1

u/wheyjuice Feb 02 '18

Got it, thanks!

2

u/Playboy_BTC Feb 04 '18

Oh this looks so good!

One question though

How do I run this? I edited the file and put my info there but when I write in linux fork-helper.py or run fork-helper or start fork-helper, to run it, it says command not found

1

u/ottoteixeira Feb 04 '18

Try python fork-helper.py
It has to be version 2.x though. You can check with python --version I think.
If it's version 3, you might also have version 2 installed. Type python and instead of enter, hit TAB twice to see.

1

u/Playboy_BTC Feb 04 '18

python fork-helper.py worked! Thank you :)

2

u/sQtWLgK Feb 07 '18

my wishlist:

  • tor support (bc.i is already enough of a privacy nightmare)

  • output with a leading space, so that privkeys do not leak to the history

2

u/ottoteixeira Feb 07 '18

I don't know how hard it would be to implement Tor support. Maybe it would be better to just host the script online, so the requests to blockchain.info would be done by the server.

The leading space, though, requires no effort. Done.

Thanks!

2

u/throwawayagin Mar 04 '18

Small request, how do modify this to point to a file of pubkeys as input?

1

u/ottoteixeira Mar 05 '18

That was my original idea, but then I thought it was better to just change the script, to avoid having people download 2 files.

But it's pretty simple. Just make the addresses variable read from file, like this: https://stackoverflow.com/questions/3277503/how-do-i-read-a-file-line-by-line-into-a-list

1

u/throwawayagin Mar 05 '18

I'm also getting an error on some specific addresses

Traceback (most recent call last):
  File "fork-helper.py", line 170, in <module>
    main()
  File "fork-helper.py", line 100, in main
    valid = process_txs(addr, txs, coindata)
  File "fork-helper.py", line 122, in process_txs
    if input_tx["prev_out"]["tx_index"] == txid["tx_index"] and input_tx["prev_out"]["addr"] == addr:
KeyError: 'prev_out'

1

u/ottoteixeira Mar 06 '18

Can you send me the address? If necessary you can PM.

1

u/est_cap May 18 '18 edited May 18 '18

Did you find the origin of this issue? I am having the same problem

2

u/[deleted] Jun 12 '18

u/cointippy 0.005 BTC

great work :)

1

u/ottoteixeira Jun 12 '18

Thank you! :)

1

u/cointippy Jun 12 '18

/u/ottoteixeira, you've just received a 0.005 BTC tip from /u/dearshock! ($34.38 in BTC)

[Deposit](https://np.reddit.com/message/compose/?to=cointippy&subject=Deposit&message=Deposit%20%5Benter%20crypto%20here%5D The%20crypto%20you%20can%20currently%20deposit%20is%3A%20BTC%2C%20LTC%2C%20DASH%2C%20ZEC%20or%20DGB.+) | [Withdraw](https://np.reddit.com/message/compose/?to=cointippy&subject=Withdraw&message=Withdraw%20%5Benter%20amount%20here%5D%20%5Benter%20crypto%20here%5D%20%5Benter%20CoinMall%20username%20here%5D The%20crypto%20you%20can%20currently%20deposit%20is%3A%20BTC%2C%20LTC%2C%20DASH%2C%20ZEC%20or%20DGB. CoinMall%20username%20is%20your%20username%20found%20at%20www.coinmall.com+) | Balance | Help | r/cointippy | Powered by CoinMall

4

u/sisop Feb 01 '18 edited Feb 01 '18

Thank. Checked it all works. Looks good.

1

u/berepere Feb 01 '18

different coin: BTV pls

1

u/ottoteixeira Feb 01 '18

What's that?

1

u/berepere Feb 01 '18

another fork. https://bitvote.one/

1

u/ottoteixeira Feb 01 '18 edited Feb 01 '18

Oh, you mean to support BTV? It would be pointless because bitcoin_fork_claimer doesn't support it yet.

Edit: Oops, bitcoin_fork_claimer DOES support it. Added BTV to my script.

2

u/nttgraphics Feb 03 '18

I noticed this at the first glance. In fact, it was quite easy to “add support” by simply duplicating one line and editting the block height, fork name & ticker. :)

1

u/logical Feb 01 '18

Is there anywhere you can sell BPA or B2X?

1

u/ottoteixeira Feb 01 '18

B2X can be sold at Exrates. I don't know about BPA.

1

u/Playboy_BTC Feb 04 '18

Also there was another fork in Dec called Bitmark BTM. Can I just add that in the file under Forks to check list in the same format as others?

1

u/ottoteixeira Feb 04 '18

You can, it will check if you have valid transactions, but unless bitcoin_fork_claimer supports it, you won't be able to claim it.

1

u/Playboy_BTC Feb 04 '18

I ran the script and it was very helpful. Thank you But it didnt give anything for BCX eventhough Im pretty sure I have some balance there to claim.

Anyone was able to claim BCX from this yet? I`m not sure if the script actually checks for BCX

1

u/ottoteixeira Feb 04 '18

I got mine using the script. If you want, you can PM the address and I'll look. Did it say you have any SBTC? It's the same block as BCX (498888).

1

u/ottoteixeira Feb 05 '18

Oh, a user found a bug that was hiding some transactions when a specific situation happened. Not sure if that's your case, but you should download the script again and try one more time.

If you still don't get the output you think is correct, you can PM me your address and I'll check.

1

u/Playboy_BTC Feb 06 '18

It doesnt say anything about SBTC nor BCX. Just updated and tried again. The BTC address is... 12XSXv3kfxwLBwPs9bCwE1FrMmmRfNn3JP

Im not positive but I might have the coin balance in Hitbtc at that time to get my free SBTCs but I dont think they gave the bcx to its members.

1

u/ottoteixeira Feb 06 '18

12XSXv3kfxwLBwPs9bCwE1FrMmmRfNn3JP

Block 498888 was confirmed at 2017-12-12 10:29:53: https://blockchain.info/block/00000000000000000006cd8c4c5c0582afad218f13eb02f1351d0fa1821590d7

Your withdrawal happened at 2017-12-12 13:17:53 - block 498919: https://blockchain.info/pt/tx/76fda3c2a7e081b698d37fcd22487083675d74bff1a4fa5bcb0629470d0c2cab

It seems you were a few hours late :-(

2

u/Playboy_BTC Feb 06 '18

Aww man! I knew Id miss it! Damn it! Its alright. Hey thx dude. Awesome file by the way. Very useful.

1

u/TomJonesSecond Feb 13 '18

I am using a Trezor. Is there a way I can get the private key and the addresses so I could use them for your script?

1

u/ottoteixeira Feb 13 '18

Sorry, don't know. You'd better ask in a Trezor related forum.

1

u/samsung500gb Mar 13 '18

Were you able to get your private keys from Trezor?

1

u/est_cap May 21 '18

Great tool! I am experiencing an error with some specific addresses

Traceback (most recent call last):
File "fork-helper.py", line 140, in <module>
main()
File "fork-helper.py", line 65, in main
valid = process_txs(addr, txs, coindata)
File "fork-helper.py", line 89, in process_txs
if input_tx["prev_out"]["tx_index"] == txid["tx_index"] and input_tx["prev_out"]["addr"] == addr:
KeyError: 'prev_out'

It only happens with a specific address and the service findmycoins.ninja seems to fail in a similar manner

I see in a previous comment, user u/throwawayagin seems to experience same issue, but no fix is found in the comment

Anyone else experienced this issue and found out how to fix it?The address in question has around 30 transactions

1

u/ottoteixeira May 21 '18

That's because those transactions came from mining. I did a small update. Please try again to see if it works.

Thanks

2

u/[deleted] Feb 01 '18

This is amazing, thanks!

2

u/kxax Feb 01 '18

Great! Thanks!

1

u/[deleted] Feb 01 '18

can anyone please teach me how to use this fork claimer?

2

u/[deleted] Feb 02 '18

This isn't the fork claimer, this is a tool to give you easy inputs into the fork claimer. I figured it out with the help of ppl here, happy to pay it forward, send me a PM if you'd like help.

1

u/[deleted] Feb 04 '18

[removed] — view removed comment

1

u/ottoteixeira Feb 05 '18

It should be the same procedure as the others.
But I sold my BTP with BitPie's Android app. It's a lot simpler. You need Bither app to get the fork(s) and send them to BitPie, which is a wallet and also an exchange.