Skip to content

Instantly share code, notes, and snippets.

@ldub
Last active November 21, 2019 21:49
Show Gist options
  • Save ldub/225f81b2ed295adb9ce705bf1f03cf04 to your computer and use it in GitHub Desktop.
Save ldub/225f81b2ed295adb9ce705bf1f03cf04 to your computer and use it in GitHub Desktop.
Smarx Capture The Ether

first two transactions from 0x6B477781b0e68031109f21887e6B5afEAaEB002b:

  1. 0xd79fc80e7b787802602f3317b7fe67765c14a7d40c3e0dcb266e63657f8813961
  2. 0x061bf0b4b5fdb64ac475795e9bc5a3978f985919ce6747ce2cfbbcaccaf51009

lets ask infura for more information...

λ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x061bf0b4b5fdb64ac475795e9bc5a3978f985919ce6747ce2cfbbcaccaf51009"],"id":1}' https://ropsten.infura.io/v3/

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xe23306ce25e2e0329ed148f17e16b3b566b2b42cb86bf4ece5b41a0fee30a497",
        "blockNumber": "0x2e019c",
        "from": "0x6b477781b0e68031109f21887e6b5afeaaeb002b",
        "gas": "0x5208",
        "gasPrice": "0x3b9aca00",
        "hash": "0x061bf0b4b5fdb64ac475795e9bc5a3978f985919ce6747ce2cfbbcaccaf51009",
        "input": "0x",
        "nonce": "0x1",
        "r": "0x69a726edfb4b802cbf267d5fd1dabcea39d3d7b4bf62b9eeaeba387606167166",
        "s": "0x2bbd9c2a6285c2b43e728b17bda36a81653dd5f4612a2e0aefdb48043c5108de",
        "to": "0x92b28647ae1f3264661f72fb2eb9625a89d88a31",
        "transactionIndex": "0x11",
        "v": "0x29",
        "value": "0x1922e95bca330e00"
    }
}

and the second tx:

λ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xd79fc80e7b787802602f3317b7fe67765c14a7d40c3e0dcb266e63657f881396"],"id":1}' https://ropsten.infura.io/v3/

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x0515b2216fa8012618c330bff363d7a49876f4b0f05752b17b01597b5527a604",
        "blockNumber": "0x2e0197",
        "from": "0x6b477781b0e68031109f21887e6b5afeaaeb002b",
        "gas": "0x5208",
        "gasPrice": "0x3b9aca00",
        "hash": "0xd79fc80e7b787802602f3317b7fe67765c14a7d40c3e0dcb266e63657f881396",
        "input": "0x",
        "nonce": "0x0",
        "r": "0x69a726edfb4b802cbf267d5fd1dabcea39d3d7b4bf62b9eeaeba387606167166",
        "s": "0x7724cedeb923f374bef4e05c97426a918123cc4fec7b07903839f12517e1b3c8",
        "to": "0x92b28647ae1f3264661f72fb2eb9625a89d88a31",
        "transactionIndex": "0x9",
        "v": "0x29",
        "value": "0x1111d67bb1bb0000"
    }
}

What are these r,s,v values? ECDSA requires a fresh random number for each signature. Reusing an r value is dangerous!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment