Bitcoin Forum
July 29, 2024, 02:16:25 AM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: « 1 ... 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 [278] 279 280 281 »
  Print  
Author Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it  (Read 198401 times)
GR Sasa
Member
**
Offline Offline

Activity: 190
Merit: 14


View Profile
July 24, 2024, 08:39:25 PM
 #5541

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
albert0bsd
Hero Member
*****
Offline Offline

Activity: 897
Merit: 675



View Profile
July 24, 2024, 11:33:54 PM
 #5542

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.
madogss
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
July 24, 2024, 11:44:32 PM
 #5543

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!
nomachine posted his bot a couple pages back that includes getting public key, running keyhunt, and sweeping funds.
CY4NiDE
Jr. Member
*
Offline Offline

Activity: 44
Merit: 10


View Profile
July 25, 2024, 12:49:08 AM
 #5544

I got a bot online too, I'll get away from the PC now and leave it running.

Code:
Initializing Thief Bot v0...

Monitoring: 166Bitrbfa16oR7DKKSzgdhU4MpVKE4cKb
No outgoing transaction yet... [T: 1481]

1CY4NiDEaNXfhZ3ndgC2M2sPnrkRhAZhmS
nomachine
Member
**
Offline Offline

Activity: 383
Merit: 21


View Profile
July 25, 2024, 06:02:50 AM
Last edit: July 25, 2024, 06:38:33 AM by nomachine
 #5545

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!
nomachine posted his bot a couple pages back that includes getting public key, running keyhunt, and sweeping funds.

Please note that this is not the definitive version. Everyone needs to test and retest to create the final version. However, it serves as an example of what it should look like. The bot PC should have nothing installed except the bot. Anything else can affect the response and screw up. A very good ping and a reliable connection to the mempool are crucial.

one of the clues:

This code only work for TX already confirmed

Code:
    while True:
        logging.info("Running scan...")
        pubkey = get_exact_public_key_unconfirmed(address) or get_exact_public_key_confirmed(address)
        if pubkey:
            logging.info(f"Extracted Public Key: {pubkey}")
            save_public_key(pubkey)

            # Uncomment to run Keyhunt (ensure you have the keyhunt tool and the correct parameters)
            run_keyhunt(pubkey)


I have two functions. One is for unconfirmed and the other for confirmed separately Grin
AlanJohnson
Member
**
Offline Offline

Activity: 104
Merit: 11


View Profile
July 25, 2024, 08:50:34 AM
 #5546

Is it possible that someone runs a bot waiting for 66bit having fees set to almost all balance  just to piss everyone off ?  You know the answer  Grin
ronin445
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
July 25, 2024, 01:56:08 PM
 #5547

Is it possible that someone runs a bot waiting for 66bit having fees set to almost all balance  just to piss everyone off ?  You know the answer  Grin


you have to stay infront of the computer to make it success.Bot  not working %100 automatic when the process gives error.
Also for me thats theft even ı loot it with the bot to prove something then I sent it back to the real owner
 Someone told 11 days ago found the key but who is the real owner of the puzzle 66 ?
I believe the first one find it should take the prize..
nomachine
Member
**
Offline Offline

Activity: 383
Merit: 21


View Profile
July 25, 2024, 05:07:39 PM
Last edit: July 25, 2024, 05:39:49 PM by nomachine
 #5548

We could see a situation where multiple or thousands of bots continuously send replacement transactions, each one with progressively higher fees, trying to claim the coins for themselves. Since no bot is willing to give up the opportunity for another, this could result in a continuous increase in fees. In the end, almost all of the funds might be eaten up by transaction fees, with most of the money going to the miners.

Is it possible that someone runs a bot waiting for 66bit having fees set to almost all balance  just to piss everyone off ?  You know the answer  Grin

It doesn't matter whether the first replacement transaction or 24 in a row is 6 BTC; the result will be the same in the end.
Kamoheapohea
Jr. Member
*
Offline Offline

Activity: 36
Merit: 11


View Profile
July 25, 2024, 05:44:18 PM
 #5549

Please someone also try with a CPFP transaction. Maybe this confuses the other bots.
vjudeu
Hero Member
*****
Offline Offline

Activity: 787
Merit: 1882



View Profile
July 25, 2024, 05:58:54 PM
 #5550

It is possible to get the reward in a trustless way. Some examples:

OP_RIPEMD160 <puzzleHash> OP_EQUALVERIFY <solverKey> OP_CHECKSIG
OP_SHA256 <revealedHash> OP_EQUALVERIFY <solverKey> OP_CHECKSIG

The first Script can be used to send "I know the key" signal in a trustless way. The second Script can reveal the public key, after the first "I know the key" transaction, but also lock the reward to the solver's key.

Some practical examples, with the smallest key:

OP_DUP OP_HASH160 751e76e8199196d454941c45d1b3a323f1433bd6 OP_EQUALVERIFY OP_CHECKSIG

public key: 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
first hash: 0f715baf5d4c2ed329785cef29e562f73488c8a2bb9dbc5700b361d54b9b0554
second hash: 751e76e8199196d454941c45d1b3a323f1433bd6

OP_RIPEMD160 751e76e8199196d454941c45d1b3a323f1433bd6 OP_EQUALVERIFY <solverKey> OP_CHECKSIG

Then, the solver can provide: "<signature> 0f715baf5d4c2ed329785cef29e562f73488c8a2bb9dbc5700b361d54b9b0554". Only the solver will know the first hash. And it is still not the public key, so it can be revealed, as a signal, to get it deeply confirmed, and to give the community a choice: "give me those coins now, if you want to see the solution". By scanning the blockchain, it is possible to determine, who was the first person, revealing the first hash on-chain. Also, because scripts are hidden behind hashes, nobody will fake that signal, if P2SH, P2WSH or P2TR will be deeply confirmed first.

If the community will verify that signal, and agree to deposit 6.6 BTC to get the solution, then the next Script can be constructed:

OP_SHA256 0f715baf5d4c2ed329785cef29e562f73488c8a2bb9dbc5700b361d54b9b0554 OP_EQUALVERIFY <solverKey> OP_CHECKSIG

In that case, this particular solver can provide: "<signature> <puzzleKey>". Everyone will then try to grab the key for the puzzle, and clear it. However, the signature will protect the coins for the solver.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Akito S. M. Hosana
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 25, 2024, 05:59:28 PM
 #5551

So, all those poor developers spent months honing their skills in Jacobian Coordinates , only to find out their efforts were as useful as a dragon’s breath mint because the unicorn-bot just swooped in and claimed the prize.

And that’s how you end up with an elaborate riddle-solving contest where the only thing you really need is a magical unicorn-bot to do all the work.  🦄🔮
kTimesG
Member
**
Offline Offline

Activity: 109
Merit: 24


View Profile
July 25, 2024, 07:33:49 PM
 #5552

So, all those poor developers spent months honing their skills in Jacobian Coordinates , only to find out their efforts were as useful as a dragon’s breath mint because the unicorn-bot just swooped in and claimed the prize.

And that’s how you end up with an elaborate riddle-solving contest where the only thing you really need is a magical unicorn-bot to do all the work.  🦄🔮
Jacobian coordinates has jack shit to do with puzzle 66 or any other puzzle without an exposed public key. If you know of any program that uses JC to create zillions of random addresses, please let them know that they are doing something very wrong.

66 & friends are more like a SHA/RIPEMD hashing rate competition, onto which the winner of gets pissed on by the Jacobian Coordinates honing skills contest participants. Oh wait, shit, Jacobian Coordinates are totally incompatible with Pollard's DLP methods.
Akito S. M. Hosana
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 26, 2024, 09:10:47 AM
 #5553

So, all those poor developers spent months honing their skills in Jacobian Coordinates , only to find out their efforts were as useful as a dragon’s breath mint because the unicorn-bot just swooped in and claimed the prize.

And that’s how you end up with an elaborate riddle-solving contest where the only thing you really need is a magical unicorn-bot to do all the work.  🦄🔮
Jacobian coordinates has jack shit to do with puzzle 66 or any other puzzle without an exposed public key. If you know of any program that uses JC to create zillions of random addresses, please let them know that they are doing something very wrong.

66 & friends are more like a SHA/RIPEMD hashing rate competition, onto which the winner of gets pissed on by the Jacobian Coordinates honing skills contest participants. Oh wait, shit, Jacobian Coordinates are totally incompatible with Pollard's DLP methods.

This was a joke. But it does not matter.
Here's a another one. No matter how much you earn on puzzle 130, the unicorn-bot will earn more from 66-90 🦄
GR Sasa
Member
**
Offline Offline

Activity: 190
Merit: 14


View Profile
July 26, 2024, 11:35:06 AM
 #5554

I think @WanderingPhilospher forgot us lol...

Hope he's doing ok
zahid888
Member
**
Offline Offline

Activity: 272
Merit: 20

the right steps towerds the goal


View Profile
July 26, 2024, 01:02:34 PM
 #5555

Off topic:

White Hat Recovery reward 10%, i.e., up to $23 Million

https://x.com/WazirXIndia/status/1815004031561220352



1BGvwggxfCaHGykKrVXX7fk8GYaLQpeixA
ElonMusk_ia
Newbie
*
Offline Offline

Activity: 10
Merit: 2


View Profile
July 26, 2024, 01:34:25 PM
 #5556

Good luck.
OxSD
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
July 26, 2024, 02:02:53 PM
 #5557

I think @WanderingPhilospher forgot us lol...

Hope he's doing ok
He's pretty smart and I think his competition makes sense to test some techniques that allow coins to be transferred safely rather than to show that coins can be easily stolen
brainless
Member
**
Offline Offline

Activity: 317
Merit: 34


View Profile
July 26, 2024, 03:07:47 PM
 #5558

I think @WanderingPhilospher forgot us lol...

Hope he's doing ok
He's pretty smart and I think his competition makes sense to test some techniques that allow coins to be transferred safely rather than to show that coins can be easily stolen
Maybe it's mind game, all bot busy for find test , and newly bots maybe also block by ping many times, and in background they play real 66 bit puzzle transaction Smiley

13sXkWqtivcMtNGQpskD78iqsgVy9hcHLF
OxSD
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
July 26, 2024, 03:14:32 PM
 #5559

Maybe it's mind game, all bot busy for find test , and newly bots maybe also block by ping many times, and in background they play real 66 bit puzzle transaction Smiley
A professional bot definitely does not use mempool.space or similar APIs. It uses its own node, so blocking is only for inexperienced bots that use third-party APIs.
Baskentliia
Jr. Member
*
Offline Offline

Activity: 60
Merit: 1

34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ


View Profile WWW
July 26, 2024, 03:36:33 PM
 #5560

Off topic:

White Hat Recovery reward 10%, i.e., up to $23 Million

https://x.com/WazirXIndia/status/1815004031561220352




Hello, are we going to find one of these wallets, deliver it to the Wazirx exchange official and get a reward? Did I get right ?
Could you share the program you use?

34Sf4DnMt3z6XKKoWmZRw2nGyfGkDgNJZZ
Pages: « 1 ... 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 [278] 279 280 281 »
  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!