Post
Topic
Board Development & Technical Discussion
Re: Using Kangaroo for WIF solving
by
BHWallet
on 02/09/2022, 16:35:56 UTC
Just a lazy solution:
Code:
import java.math.BigInteger;

public class K {
    public static void main(String[] args) {
        BigInteger start = new BigInteger("0552e025571c01bcd9eda59365a2fb3ae0bd7547dfeeeb13d971d848bcbf0467", 16);
        BigInteger stride = BigInteger.valueOf(58L).pow(32);//depends on the position of most-right unknown character
        BigInteger range = BigInteger.valueOf(58L).pow(5);//5=number of unknown characters
        BigInteger end = start.add(range);
        System.out.println("START: "+start.toString(16));
        System.out.println("END: "+end.toString(16));
        System.out.println("STRIDE: "+stride.toString(16));
    }
}

Going back to this version of Kangaroo: I think there is still something wrong with calculations with checksum - for longer ranges (>6 unknown characters) it does not return result, while when there is case without checksum (just a stride) it works good.

how do i run this java.
i have a question, does this work with missing chars at the end of the wif, really want to know, stuck on reading here past 2 days.
 Embarrassed
He has a java one that will work pretty well and fast for 7-8 characters missing off the end. For the method in this topic, it won't do any good because your stride will be "1"...meaning check every key, in order.

Here is a python script I threw together real quick if you are more familiar with it:

Code:
#First, enter the start range as start = "starting range like example below"
start       =  "552e025571c01bcda0297c22731d74becbd2cc13a750046ca49b5e9006a2c72" # <<<<------ enter starting range in hex
startrange  =  int(start, 16) #leave alone

#This determines the range that determines the start and end range; depends on the number of unknown characters; enter that number in ukchar = int(x)
ukchar      =  int(5) # <<<<------ enter the number of unknown characters
addtostart  =  int(pow(58, ukchar))
endrange    =  hex(startrange + addtostart).rstrip("L").lstrip("0x")

#This determines the stride which is based on the position of the most right unknown character; enter that number in mostright = int(x)
mostright   =  int(32)  # <<<<------ enter the position of the most right unknown character
stride      =  int(pow(58, mostright))

#This prints out starting range, ending range, and stride; leave alone
print ("Starting range: " + hex(startrange).rstrip("L").lstrip("0x"))
print ("Ending range  : " + endrange)
print ("Stride        : " + hex(stride).rstrip("L").lstrip("0x"))


What exactly are we doing with this tool?

I am using WP's python script with PawGo's Kangaroo to get the range & stride and it's all working as it supposed to, but I don't understand this tool at all tbh

How can I begin solving #120 for example by using it's public key and some random WIF within the range? I don't get it