on buying from any Defi website they ask to connect using your wallet and confirm transaction when buying, now I want to build python code that can snip transacation from the metamask and submit the transaction using my private code without the need of the confirmation process and the pop-up window any suggestion on how to do that? ps: i want to do this in BSC
The fact that your asking this kind of question shows that you don't have the knowledge to perform such task at this moment. However, if you want to build a wallet as a standalone app that you sign so it does not get flag by AV and ppl know it's from you that is more accessible.
What your asking is possible. I can connect metamask to my own provider. Set a custum RPC url that will handle the transaction and use it on my own chain that is not even EVM based.
I can also create an electron app, pack it as executable and sign it. This is the best solution in my opinion to distribute an app.
Maybe have a look at the requirement to be listed in the extension page for chrome and the app store.
But your not there yet. I suggest you look into what is it exactly your trying to achieve. I would also be interested on learning more about that snip procedure. Is this an algorithm you built?
Rest assure that there are a lot a security steps you will have to go trough before you can use that eth_snip method.