This repo contains a demo on how bitcoin flashing works. This software is for education only, I assume no responsibility for improper use.
To make it work you need to modify some methods of bitcoinlib as explained in the article describing the experiment: https://nicods96.github.io/hi/bitcoin-flashing/