DEV Community

Jadi
Jadi

Posted on

Accessing and browsing blockchain using web3py python library

This is from HeroCTF v5, Blockchain challenge called Arrest. It reads:

In the dim-lit confines of his room, a lone figure hunched over a computer screen. Known online as 'Swissy', he was one of the most notorious ransomware operators worldwide.
From his small apartment in a forgotten corner of Moscow, Swissy had wreaked havoc on the digital world, crippling entire industries with his ransomware attacks.
But tonight, his reign of terror ended abruptly. A sudden knock echoed through the room, followed by the splintering of the door as Russian FSB agents stormed in.
Swissy was arrested, but the real challenge was only beginning - tracing the syndicate behind him.
Find the address who funded the ransomware operator (0xf6c0513FA09189Bf08e1329E44A86dC85a37c176)

To solve it, I use web3py to connect to the blockchain and then will check for every block created from the beginning. There, I will check for transactions in the block and if there is any, I will check for its "to". If it matches, we will show the "from" (which is Swissy!).

IMO this can be a good intro if you are interested in using web3py and blockchain programming in general.

Top comments (0)