Private Flag
In Solidity, "private" variables can only be read by the contracts and are not accessible to the outside world. But, like, what if you're a hacker, you know?
Contract Link (Sepolia Testnet):
https://sepolia.etherscan.io/address/0xa907dd350eea49d9a8c2c5f58ef1f7a14015cce3
The objective:
Retrieve the value of secret_flag from the contract.
Contract Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract private_flag{
string public name = "Anon";
string private Address = "Private";
uint8 public age = 13;
address public wallet = 0x0000000000000000000000000000000000001337;
uint48 private favourite_number = 1337;
bytes32[4] private Hashes;
uint16 public num1 = 1;
uint16 private num2 = 2;
bool private Pwn = false;
bool private pWn = false;
bool private pwN = false;
string private secret_flag = .................[REDACTED]...................
address public owner;
}