元宝shell自动充值多账号版 宝塔计划任务自动充值脚本代码+使用说明
本帖最后由 柠檬 于 2022-1-23 10:42 编辑#使用方法:
配合玩法为为充值玩家提供周卡,月卡等服务
也可以作为充值满一定玩家提供福利 ,定时返还银元宝
打开宝塔-左侧-计划任务
任务名称自定义
选择执行周期即每天要充值的时间
修改上面的数据库密码 充值金额 和要充值的帐号
复制上面的内容 填入脚本内容里
添加任务即可
<div>
</div><div>#!/bin/bash
DBNAME="dl_adb_all"
USERNAME="root"
PASSWORD="BHD2WjrBnT8sKAKj"
COIN_NUM="100"
user_account=("test0816" "1008611" "1105389211qq")
length=`expr ${#user_account[@]} - 1`
for i in $(seq 0 $length)
do
BEFORE_COIN=`mysql-u${USERNAME} -p${PASSWORD} --skip-column-names -e "use ${DBNAME} ;
SELECT silver_coin FROM account WHERE account = '${user_account}';"`
AFTER_COIN=`expr $BEFORE_COIN + $COIN_NUM`
if [ $AFTER_COIN -ge 0 ] && [ $AFTER_COIN -le 2000000000 ]
then mysql -u${USERNAME} -p${PASSWORD} -e "use ${DBNAME};
UPDATE account SET silver_coin = silver_coin + $COIN_NUM, CHECKSUM = upper(CAST(md5(concat(CAST(account AS char CHARACTER SET utf8),CAST(PASSWORD AS char CHARACTER SET utf8),CAST(LPAD(CONV(privilege, 10, 16), 8, 0) AS char CHARACTER SET utf8),CAST(blocked_time AS char CHARACTER SET utf8),CAST(LPAD(CONV(gold_coin, 10, 16), 8, 0) AS char CHARACTER SET utf8),CAST(LPAD(CONV(silver_coin, 10, 16), 8, 0) AS char CHARACTER SET utf8),CAST(coin_password AS char CHARACTER SET utf8),CAST(unlock_coin_password_time AS char CHARACTER SET utf8),CAST(trade_lock_time AS char CHARACTER SET utf8),CAST(permit_ip AS char CHARACTER SET utf8),'ABCDEF')) AS CHAR))WHERE account = '${user_account}';"
sleep 1
echo "$(date +"%Y-%m-%d %H:%M:%S") 成功为帐号 ${user_account} 充值$COIN_NUM银元宝,当前银元宝数量为$AFTER_COIN" >> /root/charge_accs.log
else echo "$(date +"%Y-%m-%d %H:%M:%S") 帐号 ${user_account} 充值失败, 当前银元宝数量为$BEFORE_COIN" >> /root/charge_accs.log
fi
done
</div>
是爷们的娘们的都帮顶!大力支持 顶顶更健康 好,很好,非常好! 众里寻他千百度,蓦然回首在这里! 无论是不是沙发都得回复下 啊啊啊啊啊啊啊啊啊啊啊 打酱油的人拉,回复下赚取积分 确实不错,顶先 顶顶更健康