we can access the password byte32
by using the web3.eth.getStorageAt
function. This function returns the value of the storage at a given position of the address.
this will return the password in byte32
format then we convert byte32 to string . 0x1E69cb80921A413F96e24DE10124770b820b0119
is a sepolia contract address.
this will return the password in byte32
format.
this is the contract that converts the byte32
to string
format and then we get the password.
Anyone can get the password of the owner without calling the getPassword
function.
Remix
foundry
we can take encrypted password
as the parameter of the setpassword function which can only decrypted by the owner private key
.
Private functions and state variables are only visible for the contract they are defined in and not in derived contracts. In this case private doesn't mean secret/confidential
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.