The inject.js script can be pasted in the console window of the malicious actor's browser to override the navigator.credentials.get(). It can also be converted to a web extension to use.
The URL of the C2 server has to be mentioned in the flaskapp code for both the attacker and malware.
It can be made to start on boot.