KS note
512 subscribers
61 photos
2 files
72 links
・ Web3 & etc.

πŸ₯·β›“οΈπŸ· @MostPow3rful
Download Telegram
2️⃣ #ETHERNAUT #level_2 #Fallout

i solved this challenge using cast :
cast send $CHALLENGE_CONTRACT_ADDRESS "Fal1out()" --rpc-url $RPC_URL --private-key $PRIVATE_KEY

but i wrote the Solidity code too.

πŸ₯·πŸ· <Happy Hacking/>
3️⃣ #ETHERNAUT #level_3 #Coin_Flip

must run Attack.sh file to solve the challenge

πŸ₯·πŸ· <Happy Hacking/>
4️⃣ #ETHERNAUT #level_4 #Telephone

must run the attack() function using cast:
cast send $CHALLENGE_CONTRACT_ADDRESS "attack(address)" $PLAYER_ADDRESS --rpc-url $RPC_URL --private-key $PRIVATE_KEY


πŸ₯·πŸ· <Happy Hacking/>
5️⃣ #ETHERNAUT #level_5 #Token

πŸ₯·πŸ· <Happy Hacking/>
6️⃣ #ETHERNAUT #level_6 #Delegation

must solve this challenge using cast and call the challenge contract :
cast send $CHALLENGE_CONTRACT_ADDRESS "pwn()" --rpc-url $RPC_URL --private-key $PRIVATE_KEY

but i wrote the Solidity Code too,

πŸ₯·πŸ· <Happy Hacking/>
7️⃣ #ETHERNAUT #level_7 #Force

πŸ₯·πŸ· <Happy Hacking/>
8️⃣ #ETHERNAUT #level_8 #Vault

you can access the private variables using cast :
cast storage $CHALLENGE_CONTRACT_ADDRESS 1 --rpc-url $RPC_URL


πŸ₯·πŸ· <Happy Hacking/>
9️⃣ #ETHERNAUT #level_9 #King

πŸ₯·πŸ· <Happy Hacking/>
πŸ”Ÿ #ETHERNAUT #level_10 #Re_entrancy

πŸ₯·πŸ· <Happy Hacking/>
1️⃣1️⃣ #ETHERNAUT #level_11 #Elevator

πŸ₯·πŸ· <Happy Hacking/>
πŸ”₯1
1️⃣2️⃣ #ETHERNAUT #level_12 #Privacy

you can access the private variables using cast :
cast storage $CHALLENGE_CONTRACT_ADDRESS 5 --rpc-url $RPC_URL


πŸ₯·πŸ· <Happy Hacking/>
🧩 Function's Correct order

[public/external/internal/private] [view/pure/none] [payable|OPTIONAL] [virtual|OPTIONAL] [override|OPTIONAL] [customModifier|OPTIONAL] [returns|OPTIONAL]
πŸ”Ž Decode The `msg.data`

⁉️ Why msg.data[4:] => Because the first 4-byte of data is function signature

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

contract Decode {
function run(
string memory _i1,
address _i2,
uint256 _i3,
bool _i4
) public pure returns (
string memory,
address,
uint256,
bool
) {
return abi.decode(
msg.data[4:],
(string,address,uint256,bool)
);
}
}
πŸ“– Mastering Ethereum Book - Online

https://cypherpunks-core.github.io/ethereumbook/
πŸ€– useful AI

1️⃣ Phind : https://www.phind.com
2️⃣ ChatGPT : https://chatgpt.com/
3️⃣ ChainGPT : https://app.chaingpt.org/