# Hacking Series Part 19

Category: pwn?? blockchain??

We are given a part of a blockchain and told to predict the nonce of block 130000. Since every block prior to the 130000th has a nonce, we can use the pseudo-randomness of these numbers to predict the future ones. With the PRNG predictor Python module (mersenne-twister-predictor or mt19937predictor), you can do this easily for both 32 and 64 bit numbers.

Using `predictor.setrandbits()`

you can insert previous nonce values and the type of integer to generate new ones afterwards. Since the part of the blockchain given had 1548 blocks, I repeated this process 1548 times so that the next few generated numbers were accurate predictions. In other words, the predictor based it’s predictions on all of the given blocks in the blockchain.

I then made the predictor generate the next 4 numbers because the 130000th block was 4 blocks away from the end of the chain I was given.

I took the last 64 bit number (starting with 627…) and converted it into it’s hexadecimal representation which was the answer to the objective.

`objective 11a: 57066318F32F729D`