Pages:
Author

Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it - page 65. (Read 230409 times)

hero member
Activity: 862
Merit: 662
Well here is a code to get the public key from Legacy address with Transactions in the blockchain

Code:
import json
import requests

def get_publickey(address):
    txs = get_txs(address)
    publickey = None
    found = False
    for tx in txs:
        for vin in tx["vin"]:
            if vin["prevout"]["scriptpubkey_address"] == address:
                scriptsig_asm = vin["scriptsig_asm"]
                if "OP_PUSHBYTES_33" in scriptsig_asm or "OP_PUSHBYTES_65" in scriptsig_asm:
                    tokens = scriptsig_asm.split()
                    OP_token = tokens[-2]
                    last_token = tokens[-1]
                    if  OP_token == "OP_PUSHBYTES_33" or OP_token == "OP_PUSHBYTES_65" :
                        publickey = last_token
                        found = True
            if found:
                break
        if found:
            break
    return publickey

def get_txs(address):
    try:
        obj = None
        url = ""
        if networkname=="bitcoin":
            url = "https://mempool.space/api/address/" + address +"/txs"
        elif networkname=="testnet":
            url = "https://mempool.space/testnet/api/address/" + address +"/txs"
        else:
            print("Unknow network")
            exit()
        #print("Request url: {}".format(url))
        response = requests.get(url, timeout=10) # Sending an HTTP GET request
        if response.status_code == 200:
            #print("Response:\n{}".format(response.text))
            obj = response.json()
        elif response.status_code == 429:
            print(f"HTTP: {response.status_code}\nExit...")
            obj = []
        else:
            print(f"HTTP: {response.status_code}\n{response.text}\nExit...")
            obj = []
        return obj
    except Exception as e:
        print(f"An error occurred: {e}")
        return []

networkname="bitcoin"
address = "1Fo65aKq8s8iquMt6weF1rku1moWVEd5Ua"
publickey = get_publickey(address)
if(publickey is not None):
    print("Public key found {}".format(publickey))
else:
    print("Public key NOT found")

This code only work for TX already confirmed, Legacy address compressed and uncompressed

I hope you like it.

BTW my bot is already running. I am not going to be in front of my computer this time, last time i was fixing some code bugs, but right now I already tested the code with some other address.
member
Activity: 194
Merit: 14
I have managed to get a "Bot" but it's not a bot i have still to manually give the private key because i didn't know how to extract public key once its in the mempool plus i didn't know how to run Keyhunt or kangaroo after getting public key, sooooo i guess i'll have to be awake lol, i'm so bad


I would be happy for any improvement or any opinions if the following script may work?

I would like to ask for a small script that extract public key once it's seen on the mempool. I couldn't do it myself sadly. Could anyone help?

Thank you!


Code:
import requests
import time
from bitcoinlib.transactions import Transaction
from bitcoinlib.keys import Key

# Configuration
address = ''  # The address to monitor
new_address = ''  # The address to receive the new transaction
private_key_wif = ''  # Private key for the address that created the original transaction
initial_fee = 20000  # Initial fee in satoshis (0.0001 BTC)
fee_increment = 35000  # Increment for additional fees in satoshis
check_interval = 30  # Interval for checking new transactions in seconds
broadcast_interval = 60  # Interval for re-broadcasting transactions in seconds

def check_new_transactions(address):
    url = f'https://mempool.space/api/address/{address}/txs/chain'
    try:
        response = requests.get(url)
        response.raise_for_status()  # Raise an exception for HTTP errors
        data = response.json()
       
        # Print raw data to understand the response structure
        print(f"API response: {data}")
       
        if isinstance(data, list):
            return data
        else:
            print("Unexpected response format.")
            return []
    except requests.exceptions.RequestException as e:
        print(f"An error occurred while checking transactions: {e}")
        return []

def get_raw_transaction(txid):
    url = f'https://mempool.space/api/tx/{txid}/hex'
    try:
        response = requests.get(url)
        response.raise_for_status()
        return response.text
    except requests.exceptions.RequestException as e:
        print(f"An error occurred while getting raw transaction: {e}")
        return None

def create_replacement_transaction(original_tx_hex, private_key_wif, fee, new_address):
    try:
        key = Key.from_wif(private_key_wif)  # Use from_wif() to import the key
    except Exception as e:
        print(f"Error importing private key: {e}")
        return None

    try:
        # Load the original transaction
        tx = Transaction.import_raw(original_tx_hex)
       
        total_input_value = sum(input.value for input in tx.inputs)
        total_output_value = sum(output.value for output in tx.outputs)
        original_fee = total_input_value - total_output_value

        # Calculate the new fee in satoshis
        new_total_fee = original_fee + fee
        remaining_value = total_input_value - new_total_fee

        # Convert values to integers (satoshis)
        remaining_value = int(remaining_value)
        if remaining_value <= 0:
            print("Not enough funds to cover the new fee.")
            return None

        # Create a new transaction
        new_tx = Transaction()

        # Add all inputs from the original transaction
        for input in tx.inputs:
            new_tx.add_input(input.prev_txid, input.output_n, input.value)

        # Add a single output to the new address with the remaining value after fee
        new_tx.add_output(remaining_value, new_address)

        # Sign the new transaction
        new_tx.sign(key)

        return new_tx
    except Exception as e:
        print(f"Error creating replacement transaction: {e}")
        return None

def broadcast_transaction(tx_hex):
    url = 'https://mempool.space/api/tx'
    headers = {'Content-Type': 'application/json'}
    data = {'tx': tx_hex}
    try:
        response = requests.post(url, headers=headers, json=data)
        response.raise_for_status()
        return response.text
    except requests.exceptions.RequestException as e:
        print(f"An error occurred while broadcasting transaction: {e}")
        return None

# Monitor the address for new transactions
known_transactions = set()
current_fee = initial_fee

while True:
    print("Checking for new transactions...")
    transactions = check_new_transactions(address)
   
    if transactions:
        print("Address used in transactions. Retrieving public key...")
        # Skip public key retrieval if not supported

    for tx in transactions:
        txid = tx['txid']  # Adjust if necessary based on the actual response structure
        if txid not in known_transactions:
            print(f"New transaction found: {txid}")
            raw_tx_hex = get_raw_transaction(txid)
            if raw_tx_hex:
                print("Creating and broadcasting replacement transactions with increasing fees...")
               
                start_time = time.time()
                while True:
                    replacement_tx = create_replacement_transaction(raw_tx_hex, private_key_wif, current_fee, new_address)
                    if replacement_tx:
                        replacement_tx_hex = replacement_tx.as_hex()
                        broadcast_response = broadcast_transaction(replacement_tx_hex)
                        print(f"Broadcast response for fee {current_fee}: {broadcast_response}")
                       
                        # Increment the fee for the next transaction
                        current_fee += fee_increment
                       
                        # Check if 60 seconds have passed since the start of broadcasting
                        if time.time() - start_time >= broadcast_interval:
                            break  # Exit the loop after 60 seconds
                    else:
                        print("Failed to create replacement transaction.")
                       
                known_transactions.add(txid)
   
    print("Waiting before repeating the process...")
    time.sleep(check_interval)  # Check every 30 seconds
newbie
Activity: 23
Merit: 2
Hello everyone! I found the key to puzzle 66, but now I have another problem: how to withdraw the funds so that no one can intercept them with a bot? Please repost this message so the creator sees it! Maybe someone can tweet this so that the owners of large pools can respond, whether they can add the transaction to the next block when it is found, without broadcasting it to the network?
Pls, HELP ME!!!!!


are you here ?
Im pretty sure as of today, nobody has found it yet.
jr. member
Activity: 64
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
Hello everyone! I found the key to puzzle 66, but now I have another problem: how to withdraw the funds so that no one can intercept them with a bot? Please repost this message so the creator sees it! Maybe someone can tweet this so that the owners of large pools can respond, whether they can add the transaction to the next block when it is found, without broadcasting it to the network?
Pls, HELP ME!!!!!


are you here ?
member
Activity: 275
Merit: 20
the right steps towerds the goal
Am i already too late to participate or ?
Nooo.. you are on time.. let's do this
full member
Activity: 1162
Merit: 237
Shooters Shoot...
I just came back home after i have gotten shaved multiple times by my boss anyways

@WanderingPhilospher, i am now working to set up a bot. I know i have less chances against Alberto but a try is a try.

Am i already too late to participate or ?
Set your bot up...keep it running after you set it up.
member
Activity: 194
Merit: 14
I just came back home after i have gotten shaved multiple times by my boss anyways

@WanderingPhilospher, i am now working to set up a bot. I know i have less chances against Alberto but a try is a try.

Am i already too late to participate or ?
newbie
Activity: 20
Merit: 0
It's sad to see that people who are looking for a solution to the puzzle have switched to stealing them from the one who finds it first and tries to withdraw it. without hiding this fact.  Undecided

And with a very high chance the miner pool mining the block will rob them too.
member
Activity: 499
Merit: 38
The important thing is to be successful without getting in front of the computer. I think you were on the computer for the first exam.
Now we will see if the bot you created will perform transactions without your knowledge. The creator will do this work while everyone is asleep and at any time period. The result will be very different.

Yep. And sh** happens with "full" automated programs.
newbie
Activity: 0
Merit: 0
It's sad to see that people who are looking for a solution to the puzzle have switched to stealing them from the one who finds it first and tries to withdraw it. without hiding this fact.  Undecided
full member
Activity: 1162
Merit: 237
Shooters Shoot...
166Bitrbfa16oR7DKKSzgdhU4MpVKE4cKb

Address added to my list

@WanderingPhilospher nice to test this again, but just like someone said before you don't need to do it, unless you want to test some specific thing.

You can also organize a bait and at the same time you can run a real transaction for 13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so. That would be fun. Grin

I also think the same when the Brazilian guy did his experiment, that is why i develop my bot to what multiple address at the same time.

Child Pays For Parent (CPFP) in Bitcoin what it does in practice

When a UTXO is not confirmed by the network but you need to pay something ASAP you can increase the fee of your transaction just to push the miner to accept both Transactions
Example:
Someone send to you 1 BTC paying only 1sat/vB this is Transaction "A", network fee is right now 5 sat/vB, But you need to pay Something to someone else you need to make a new Transaction "B" you need to pay some high Fee, but if you pay the current fee 5 sat/vB, but since the Parent Transaction is not mined yet, then you need to pay more than 5 sat/vB because fee of both transaction are add together, in average both transactions fee is like 3sat/vB so you need to increment fee until the average fee of both transactions reach the minimum level to be accepted by a miner.





And so the games begin...
jr. member
Activity: 64
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
The important thing is to be successful without getting in front of the computer. I think you were on the computer for the first exam.
Now we will see if the bot you created will perform transactions without your knowledge. The creator will do this work while everyone is asleep and at any time period. The result will be very different.
jr. member
Activity: 67
Merit: 1
let's digress a bit, what do you think NPU would work for computing public keys
jr. member
Activity: 67
Merit: 1
in the first test you sent it from an address that starts with 1 to an address that also starts with 1 try sending it to an address that starts with 3 or bc1q or bc1p
hero member
Activity: 862
Merit: 662
166Bitrbfa16oR7DKKSzgdhU4MpVKE4cKb

Address added to my list

@WanderingPhilospher nice to test this again, but just like someone said before you don't need to do it, unless you want to test some specific thing.

You can also organize a bait and at the same time you can run a real transaction for 13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so. That would be fun. Grin

I also think the same when the Brazilian guy did his experiment, that is why i develop my bot to what multiple address at the same time.

Child Pays For Parent (CPFP) in Bitcoin what it does in practice

When a UTXO is not confirmed by the network but you need to pay something ASAP you can increase the fee of your transaction just to push the miner to accept both Transactions
Example:
Someone send to you 1 BTC paying only 1sat/vB this is Transaction "A", network fee is right now 5 sat/vB, But you need to pay Something to someone else you need to make a new Transaction "B" you need to pay some high Fee, but if you pay the current fee 5 sat/vB, but since the Parent Transaction is not mined yet, then you need to pay more than 5 sat/vB because fee of both transaction are add together, in average both transactions fee is like 3sat/vB so you need to increment fee until the average fee of both transactions reach the minimum level to be accepted by a miner.



jr. member
Activity: 64
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
How to defeat the bots: burn the 6.6 BTC in miner fees in the first transaction.
Nobody wins except the miners.

I think the 1st test of RBF was not a real test, the real test will be now. In the first test, everyone was waiting in front of the computer. This test will happen suddenly and we will see if fully automated bots can come into play. Everyone should prepare their bot, let the puzzle creator send the transaction to the network whenever they want within a few days, and see what happens.
newbie
Activity: 6
Merit: 0
How to defeat the bots: burn the 6.6 BTC in miner fees in the first transaction.
Nobody wins except the miners.
jr. member
Activity: 42
Merit: 0
Ok, all of you BOT owners. Get ready for round 2 of RBF test.

I am a newb with ding certain things on the blockchain and what I am trying to do.  I probably shouldn't be doing this, but sometimes, mistakes, are the best things to learn from.

I would like all to participate as they did in the last 66 bit bot test. But def at least the winner, albert0bsd. But I know the more, the better chances to test different strategies or programs/processes, so I would like to get all bot owners on board.

Same setup, key is in the 66 bit range.

Address:

166Bitrbfa16oR7DKKSzgdhU4MpVKE4cKb

It seemed like everyone has an auto bot...meaning all you are doing is putting in the address on some type of watch list, and once your program gets a hit for the address, the bots do their thing to find the key and alter the original transaction.

So if everyone who is going to participate, put in the above address into your bot ASAP. I would like to get a response back from at least albert0bsd that he is entered the address and is ready to proceed.

All I ask, if one of you are successful in diverting the coinage, you PM me and tell me how you did it. That's all. Just a request, not a requirement lol.

I'm not sure I will say the exact time I send funds out of the address, because that is more realistic to 66's transfer, no one is going to let us know they are about to sweep the coins...but that could change.

This may fail, may be successful. We all shall see.

Am I missing any information/anything else to put out there?

Ok, bot owners, let's get ready to rumble. Who is ready? Let's do it.

You are so right, no one tells you when to withdraw puzzle 66, they do the transaction suddenly. You can also notify Alberto and other people who own the bots and withdraw the money suddenly.

You can also organize a bait and at the same time you can run a real transaction for 13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so. That would be fun. Grin

Do you think someone would cheat like that? BS. Angry
member
Activity: 499
Merit: 38
Ok, all of you BOT owners. Get ready for round 2 of RBF test.

I am a newb with ding certain things on the blockchain and what I am trying to do.  I probably shouldn't be doing this, but sometimes, mistakes, are the best things to learn from.

I would like all to participate as they did in the last 66 bit bot test. But def at least the winner, albert0bsd. But I know the more, the better chances to test different strategies or programs/processes, so I would like to get all bot owners on board.

Same setup, key is in the 66 bit range.

Address:

166Bitrbfa16oR7DKKSzgdhU4MpVKE4cKb

It seemed like everyone has an auto bot...meaning all you are doing is putting in the address on some type of watch list, and once your program gets a hit for the address, the bots do their thing to find the key and alter the original transaction.

So if everyone who is going to participate, put in the above address into your bot ASAP. I would like to get a response back from at least albert0bsd that he is entered the address and is ready to proceed.

All I ask, if one of you are successful in diverting the coinage, you PM me and tell me how you did it. That's all. Just a request, not a requirement lol.

I'm not sure I will say the exact time I send funds out of the address, because that is more realistic to 66's transfer, no one is going to let us know they are about to sweep the coins...but that could change.

This may fail, may be successful. We all shall see.

Am I missing any information/anything else to put out there?

Ok, bot owners, let's get ready to rumble. Who is ready? Let's do it.

You are so right, no one tells you when to withdraw puzzle 66, they do the transaction suddenly. You can also notify Alberto and other people who own the bots and withdraw the money suddenly.

You can also organize a bait and at the same time you can run a real transaction for 13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so. That would be fun. Grin
jr. member
Activity: 64
Merit: 1
34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
Ok, all of you BOT owners. Get ready for round 2 of RBF test.

I am a newb with ding certain things on the blockchain and what I am trying to do.  I probably shouldn't be doing this, but sometimes, mistakes, are the best things to learn from.

I would like all to participate as they did in the last 66 bit bot test. But def at least the winner, albert0bsd. But I know the more, the better chances to test different strategies or programs/processes, so I would like to get all bot owners on board.

Same setup, key is in the 66 bit range.

Address:

166Bitrbfa16oR7DKKSzgdhU4MpVKE4cKb

It seemed like everyone has an auto bot...meaning all you are doing is putting in the address on some type of watch list, and once your program gets a hit for the address, the bots do their thing to find the key and alter the original transaction.

So if everyone who is going to participate, put in the above address into your bot ASAP. I would like to get a response back from at least albert0bsd that he is entered the address and is ready to proceed.

All I ask, if one of you are successful in diverting the coinage, you PM me and tell me how you did it. That's all. Just a request, not a requirement lol.

I'm not sure I will say the exact time I send funds out of the address, because that is more realistic to 66's transfer, no one is going to let us know they are about to sweep the coins...but that could change.

This may fail, may be successful. We all shall see.

Am I missing any information/anything else to put out there?

Ok, bot owners, let's get ready to rumble. Who is ready? Let's do it.

You are so right, no one tells you when to withdraw puzzle 66, they do the transaction suddenly. You can also notify Alberto and other people who own the bots and withdraw the money suddenly.
Pages:
Jump to: