Recover public key from raw Ethereum tx data

This is a tool to help recover public keys from Ethereum raw tx data, which supports both EIP-1559 tx/s and EIP-155 tx/s (i.e. before EIP-1559).

Background Info

Public keys are either

1. 65 bytes long and look like
0x04 || uncompressed public key
2. 33 bytes long and look like
0x02 or 0x03 || compressed public key

Ethereum addresses are the last 20 bytes of the hash of the uncompressed public key