Esempio n. 1
0
async def resetvars():
    db = DB()
    msg = "今日实时更新注入器使用总结:"
    msg += "\n今日登录:" + db.getvar('logincountday') + '次'
    msg += "\n今日注入:" + db.getvar('dllcountday') + '次'
    # await bot.send_group_msg_rate_limited(group_id=869494996, message=msg)
    await bot.send_group_msg_rate_limited(group_id=667556362, message=msg)
    db.setvar('dllcountday', 0)
    db.setvar('logincountday', 0)
    db.statistics_resetday()
    del db
    return
Esempio n. 2
0
async def reportinjectorinfo():
    db = DB()
    ssmgr = SessionkeyManager()
    msg = "当前实时更新注入器使用情况如下:"
    msg += "\n总登录:" + db.getvar('logincount') + '次'
    msg += "\n今日登录:" + db.getvar('logincountday') + '次'
    msg += "\n总注入:" + db.getvar('dllcount') + '次'
    msg += "\n今日注入:" + db.getvar('dllcountday') + '次'
    msg += "\n当前总在线人数:" + str(ssmgr.getonline())
    await bot.send_group_msg_rate_limited(group_id=869494996, message=msg)
    # await bot.send_group_msg_rate_limited(group_id=667556362, message=msg)
    del db
    del ssmgr
    return
Esempio n. 3
0
 def __init__(self):
     self.browser = webdriver.Firefox(
         firefox_profile=self.__FirefoxProfile__)
     # 初始化支付宝网页
     self.browser.get("https://personalweb.alipay.com/portal/i.htm")
     # self.login('18715707081', 'wjd1996')
     self.browser.implicitly_wait(500)
     self.username = self.browser.find_element_by_xpath(
         "//a[@seed='account-zhangh-myalipay-v1']").text  # 检测登录
     print('支付宝 ' + self.username + ' 登录成功!')
     time.sleep(5)  # 别那么快
     entrance = self.browser.find_element_by_xpath(
         "//a[@seed='global-record']")  # 模拟点击跳转记录页
     ActionChains(
         self.browser).move_to_element(entrance).click(entrance).perform()
     # self.browser.get("https://consumeprod.alipay.com/record/advanced.htm")  # 转到交易记录页
     # 打开数据库
     self.__db__ = DB()
     # 设置定时刷新
     self.__scheduler__ = AsyncIOScheduler()
     self.__mainloop_job__ = self.__scheduler__.add_job(
         self.mainloop_handler, 'interval', seconds=60)
     self.__scheduler__.start()
Esempio n. 4
0
 def __init__(self):
     self.__db__ = DB()
Esempio n. 5
0
import nonebot
from LXD.services.DBSvr import DB
import json

__plugin_name__ = 'LXD.Advertisement'
db = DB()
bot = nonebot.get_bot()


@bot.server_app.route('/getadv', methods=['GET'])
async def getadv():
    return json.dumps(db.getAdvertisements())