forked from 48Club/enhanced_rpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExploiter.sh
32 lines (24 loc) · 1.39 KB
/
Exploiter.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/bash
GETH_PATH=$1
GETH_BIN=$2
echo "GETH_PATH: $GETH_PATH, GETH_BIN: $GETH_BIN"
GETH_RUN="$GETH_BIN attach --datadir $GETH_PATH --exec "
geth_sync(){
for address in $(echo $1 $2 | jq -s '.[0] + .[1] | unique' | jq -r ".[]"); do
if ! [[ $1 == *$address* ]]; then
$GETH_RUN "miner.add$3('$address')" > /dev/null
echo "miner.add$3('$address')"
fi
if ! [[ $2 == *$address* ]]; then
$GETH_RUN "miner.del$3('$address')" > /dev/null
if ! [[ $address == "0x0000000000000000000000000000000000000000" ]]; then
echo "miner.del$3('$address')"
fi
fi
done
$GETH_RUN "miner.list$3()"
}
$GETH_RUN "miner.addExploiter('0x0000000000000000000000000000000000000000')" > /dev/null
$GETH_RUN "miner.addWhitelist('0x0000000000000000000000000000000000000000')" > /dev/null
geth_sync $($GETH_BIN attach --exec "miner.listExploiter()" --datadir $GETH_PATH | tr '[:upper:]' '[:lower:]' | jq -rc ) $(curl -s https://raw.githubusercontent.com/BNB48Club/puissant_service/main/exploiter.json | tr '[:upper:]' '[:lower:]' | jq -rc ) Exploiter
geth_sync $($GETH_BIN attach --exec "miner.listWhitelist()" --datadir $GETH_PATH | tr '[:upper:]' '[:lower:]' | jq -rc ) $(curl -s https://raw.githubusercontent.com/BNB48Club/puissant_service/main/whitelistContract.json | tr '[:upper:]' '[:lower:]' | jq -rc 'keys') Whitelist