本插件是pcrjjc插件的重置版,可以独立于后端api运行

Overview

pcrjjc2

本插件是pcrjjc重置版,不需要使用其他后端api,但是需要自行配置客户端

本项目基于AGPL v3协议开源,由于项目特殊性,禁止基于本项目的任何商业行为

配置方法

  1. 环境需求:.net framework 4.5及以上 jre8
    别忘了装jre8
    别忘了装jre8
    别忘了装jre8
    重要的事情说三遍
  2. 用模拟器或root过的手机打开公主连结,并且游客登录或者账号登录,并过完全部教程
  3. 复制模拟器/data/data/com.bilibili.priconne/shared_prefs文件夹下的bili_key.xml和TouristLogin.xml或login.xml(如果是游客登录就是touristlogin.xml, 如果是账号登录是login.xml),放置到项目目录toolchain文件夹下
  4. 运行BiliPrefReader.exe
  5. 复制生成的touristlogin.json或者login.json到项目根目录(pcrjjc2文件夹)下,并重命名为account.json 似乎这一步会有奇妙的bug,导致只有output.txt生成,此时请把报错文件err.log发给我/提到issue上,可以手动构造account.json,参数如下:
{
    "uid": "output.txt中的uid_long,数字格式",
    "access_key": "output.txt中的access_token",
    "platform": 2,
    "channel": 1
}
  1. 本插件仅依赖于account.json即可以运行,不需要同时开着模拟器也不需要toolchain下任何其他文件,更不需要在服务器上开模拟器
Comments
  • tw分支中关于msgpack的unpackb方法的问题

    tw分支中关于msgpack的unpackb方法的问题

    在pcrclient.py的unpack方法中报错: msgpack.exceptions.ExtraData: unpack(b) received extra data 我在StackOverflow上查了相关的一些回答,没有办法很好地解决。 比如将msgpack换成umsgpack,或者替换不同msgpack的版本等等。 不过我也注意到requirement.txt限制该依赖在1.0.2版本以上,应该不是版本问题 对代码不是很熟悉,希望能帮忙一下,谢谢

    python [2021-04-02 11:53:27,435 竞技场推送] INFO: Message 464351974 triggered wrapper by RexTrigger. C:\Users\Ryzin\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py:979: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn( [2021-04-02 11:53:30,451 竞技场推送] ERROR: <class 'msgpack.exceptions.ExtraData'> occured when wrapper handling message 464351974. [2021-04-02 11:53:30,451 竞技场推送] ERROR: unpack(b) received extra data. Traceback (most recent call last): File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\msghandler.py", line 30, in handle_message await sf.func(bot, event) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, **kwargs) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\__init__.py", line 103, in on_query_arena res = await query(id) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\__init__.py", line 58, in query await client.login() File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\pcrclient.py", line 151, in login await self.callapi('/check/check_agreement', {}) File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\pcrclient.py", line 127, in callapi response = self.unpack(response)[0] File "C:\Users\Ryzin\Desktop\PyProject\hoshino_xcw\XCW\hoshino\hoshino\modules\pcrjjc2\pcrclient.py", line 94, in unpack return unpackb(dec, File "msgpack\_unpacker.pyx", line 202, in msgpack._cmsgpack.unpackb msgpack.exceptions.ExtraData: unpack(b) received extra data.

    opened by Ryzin 28
  • 突然就报这个错了

    突然就报这个错了

    之前好好的

    Execution of job "SafeService.decoWrapper.<locals>.wrapper (trigger: interval[0:01:00], next run at: 2022-10-28 14:28:04 CST)" skipped: maximum number of running instances reached (1)

    opened by WindStill 16
  • 请问这个是哪里出了问题?

    请问这个是哪里出了问题?

    [2022-06-09 10:54:09,513 竞技场推送] INFO: 开始生成竞技场查询图片... [2022-06-09 10:54:09,547 chara] INFO: Downloading chara icon from https://redive.estertion.win/icon/unit/107561.webp [2022-06-09 10:54:11,275 竞技场推送] ERROR: <class 'FileNotFoundError'> occured when wrapper handling message 723046859. [2022-06-09 10:54:13,490 竞技场推送] ERROR: [Errno 2] No such file or directory: '../res/img\priconne\unit\icon_unit_107561.png' Traceback (most recent call last): File "D:\Program Files\Hoshino_XCW\hoshino\msghandler.py", line 28, in handle_message await service_func.func(bot, event) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, **kwargs) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2_init_.py", line 253, in on_query_arena_all result_image = await generate_info_pic(res, uid) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2\create_img.py", line 259, in generate_info_pic return await run_sync_func(_generate_info_pic_internal, *args, **kwargs) File "D:\Program Files\Hoshino_XCW\hoshino\aiorequests.py", line 10, in run_sync_func return await asyncio.get_event_loop().run_in_executor( File "D:\Program Files\Python\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "D:\Program Files\Hoshino_XCW\hoshino\modules\pcrjjc2\create_img.py", line 49, in _generate_info_pic_internal pic_dir = chara.fromid(id_favorite).icon.path File "D:\Program Files\Hoshino_XCW\hoshino\modules\priconne\chara.py", line 148, in icon download_chara_icon(self.id, 6) File "D:\Program Files\Hoshino_XCW\hoshino\modules\priconne\chara.py", line 118, in download_chara_icon img.save(save_path) File "D:\Program Files\Python\lib\site-packages\PIL\Image.py", line 2209, in save fp = builtins.open(filename, "w+b") FileNotFoundError: [Errno 2] No such file or directory: '../res/img\priconne\unit\icon_unit_107561.png'

    opened by yfsunrise 7
  • 验证码链接发不出来

    验证码链接发不出来

    现在的验证码链接应该是被腾讯过滤了,管理员收不到机器人发的验证码。

    await bot.send_private_msg(
         # self_id = sid,
        user_id = acinfo['admin'],
        message = f'pcr账号登录需要验证码,请完成以下链接中的验证内容后将第一行validate=后面的内容复制,并用指令/pcrval xxxx将内容发送给机器人完成验证\n验证链接:'
    )
    

    把message里的 url 去掉,就能收到通知了

    opened by WindStill 5
  • tw

    tw

    TW分支登录报错205。。。标题一不小心按到回车了没打全。 [2021-06-02 20:21:36,131 nonebot] INFO: Self: 471425760, Message 1696779255 from 2775116592@[群:792730444]: '竞技场查询 259356212' [2021-06-02 20:21:36,132 竞技场推送] INFO: Message 1696779255 triggered wrapper by RexTrigger. C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\ urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w arnings warnings.warn( pcrclient: /check/check_agreement api called C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\ urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w arnings warnings.warn( pcrclient: /check/game_start api called C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\ urllib3\connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-w arnings warnings.warn( pcrclient: /load/index api failed code = 205, {'status': 3, 'title': '伺服器錯誤 ', 'message': '遊戲發生錯誤。\\n即將返回標題畫面。'} 这是错误代码

    opened by BlackTitle 5
  • requirements.txt  疑似依赖存在问题

    requirements.txt 疑似依赖存在问题

    环境: 宿主机:ubuntu 20.04 Docker Debian10 (buster) python 3.8.7

    原 requirements.txt 如下 ,其中 msgpack_python 最后更新日期为 2018年3月,对python3支持可能不是很好?在按照readme.md部署加载moduel时,所有jjc查询功能失效。报错如下面error.log部分。

    谷歌后找到了一个issue,提示与 msgpack 有关,检查后在源码requirement.txt里找到相关设置。 我这边尝试了两个步骤,升级msgpack到1.0.4未能解决问题。卸载msgpack_python后,功能恢复正常,也没有错误日志了

    msgpack_python==0.5.6
    msgpack==1.0.2
    nonebot==1.8.4
    Pillow==9.0.1
    pycryptodome==3.14.1
    python_dateutil==2.8.2
    requests==2.27.1
    zhconv==1.4.3
    

    error log如下:

    [2022-06-13 00:16:31,827 竞技场推送] ERROR: <class 'TypeError'> occured when wrapper handling message -20*********5.
    [2022-06-13 00:16:31,827 竞技场推送] ERROR: __init__() got an unexpected keyword argument 'strict_map_key'
    Traceback (most recent call last):
      File "/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message
        await sf.func(bot, event)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/safeservice.py", line 25, in wrapper
        return await func(*args, **kwargs)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/__init__.py", line 195, in on_query_arena
        res = await query(id)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/__init__.py", line 125, in query
        await client.login()
      File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 205, in login
        lres = await self.callapi('/tool/sdk_login', {
      File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 146, in callapi
        response = pcrclient.unpack(response)[0] if crypted else loads(response)
      File "/HoshinoBot/hoshino/modules/pcrjjc2/pcrclient.py", line 130, in unpack
        return unpackb(dec[:-dec[-1]],
      File "/usr/local/lib/python3.8/site-packages/msgpack/fallback.py", line 118, in unpackb
        unpacker = Unpacker(None, **kwargs)
    TypeError: __init__() got an unexpected keyword argument 'strict_map_key'
    
    
    opened by LiYangkai 3
  • SafeService报错

    SafeService报错

    报错代码Execution of job "SafeService.decoWrapper..wrapper (trigger: interval[0:01:00], next run at: 2022-02-28 01:05:10 CST)" skipped: maximum number of running instances reached (1) 重启好像暂时会好 也可能是其他插件的问题,但好像就这个插件不能用 改成星乃的Service就没问题了

    opened by SonderXiaoming 3
  • 依然有问题,不知道为啥

    依然有问题,不知道为啥

    [2022-12-07 02:13:35,084 竞技场推送] ERROR: <class 'AttributeError'> occured when wrapper handling message 1624892920. [2022-12-07 02:13:35,084 竞技场推送] ERROR: module 'hoshino.util' has no attribute 'filt_message' Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Hoshinobot\HoshinoBot\hoshino\msghandler.py", line 28, in handle_message await sf.func(bot, event) File "C:\Users\Administrator\Desktop\Hoshinobot\HoshinoBot\hoshino\modules\pcrjjc2\safeservice.py", line 25, in wrapper return await func(*args, **kwargs) File "C:\Users\Administrator\Desktop\Hoshinobot\HoshinoBot\hoshino\modules\pcrjjc2_init_.py", line 269, in on_query_arena f'''昵称:{util.filt_message(str(res['user_info']["user_name"]))} AttributeError: module 'hoshino.util' has no attribute 'filt_message' [2022-12-07 02:13:35,099 nonebot] INFO: Message 1624892920 is ignored: Handled by RexTrigger of Hoshino

    opened by cadaeibf1 1
Releases(hoshinobot-res)
  • hoshinobot-res(Oct 16, 2022)

    Hoshino静态图片资源包

    声明

    本静态资源包内图片均来自互联网中可公开获取的资源,本资源包仅作整理搬运,著作权归原作者所有,切勿用于商业及非法用途!因本资源包而产生的利益纠纷及法律责任,由本资源包的直接使用者负责!

    使用方法

    解压本压缩包至任意位置,在HoshinoBot/config.py中配置RESOURCE_DIR路径 注意:路径应指向最外层文件夹,而非内层的img文件夹! 例如: 您解压本资源包至C:/Users/Yuuki/Downloads/res/则应配置 RESOURCE_DIR = "C:/Users/Yuuki/Downloads/res/" 文件夹priconne的路径应为"C:/Users/Yuuki/Downloads/res/img/priconne"

    更新资源请使用本资源包中的爬虫img/priconne/spider.py,启动前请修改需要爬取的范围,仅爬取需要的部分即可。使用前请务必爬取一下头像库,否则生成图片必报错!!! rank表等资源由于月度更新,来源较杂,如需更新请于Hoshino的后花园群中向bot索要,您也可以搬运其他rank表,搬运时请注意保留原作者信息。

    Source code(tar.gz)
    Source code(zip)
    res-20200501.zip(17.44 MB)
💥 Fast State-of-the-Art Tokenizers optimized for Research and Production

Provides an implementation of today's most used tokenizers, with a focus on performance and versatility. Main features: Train new vocabularies and tok

Hugging Face 6.2k Dec 31, 2022
Code for Emergent Translation in Multi-Agent Communication

Emergent Translation in Multi-Agent Communication PyTorch implementation of the models described in the paper Emergent Translation in Multi-Agent Comm

Facebook Research 75 Jul 15, 2022
Use Google's BERT for named entity recognition (CoNLL-2003 as the dataset).

For better performance, you can try NLPGNN, see NLPGNN for more details. BERT-NER Version 2 Use Google's BERT for named entity recognition (CoNLL-2003

Kaiyinzhou 1.2k Dec 26, 2022
Code for EMNLP20 paper: "ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training"

ProphetNet-X This repo provides the code for reproducing the experiments in ProphetNet. In the paper, we propose a new pre-trained language model call

Microsoft 394 Dec 17, 2022
[ICLR'19] Trellis Networks for Sequence Modeling

TrellisNet for Sequence Modeling This repository contains the experiments done in paper Trellis Networks for Sequence Modeling by Shaojie Bai, J. Zico

CMU Locus Lab 460 Oct 13, 2022
Open source code for AlphaFold.

AlphaFold This package provides an implementation of the inference pipeline of AlphaFold v2.0. This is a completely new model that was entered in CASP

DeepMind 9.7k Jan 02, 2023
Search msDS-AllowedToActOnBehalfOfOtherIdentity

前言 现在进行RBCD的攻击手段主要是搜索mS-DS-CreatorSID,如果机器的创建者是我们可控的话,那就可以修改对应机器的msDS-AllowedToActOnBehalfOfOtherIdentity,利用工具SharpAllowedToAct-Modify 那我们索性也试试搜索所有计算机

Jumbo 26 Dec 05, 2022
Py65 65816 - Add support for the 65C816 to py65

Add support for the 65C816 to py65 Py65 (https://github.com/mnaberez/py65) is a

4 Jan 04, 2023
Easily train your own text-generating neural network of any size and complexity on any text dataset with a few lines of code.

textgenrnn Easily train your own text-generating neural network of any size and complexity on any text dataset with a few lines of code, or quickly tr

Max Woolf 4.8k Dec 30, 2022
A deep learning-based translation library built on Huggingface transformers

DL Translate A deep learning-based translation library built on Huggingface transformers and Facebook's mBART-Large 💻 GitHub Repository 📚 Documentat

Xing Han Lu 244 Dec 30, 2022
Ukrainian TTS (text-to-speech) using Coqui TTS

title emoji colorFrom colorTo sdk app_file pinned Ukrainian TTS 🐸 green green gradio app.py false Ukrainian TTS 📢 🤖 Ukrainian TTS (text-to-speech)

Yurii Paniv 85 Dec 26, 2022
A collection of GNN-based fake news detection models.

This repo includes the Pytorch-Geometric implementation of a series of Graph Neural Network (GNN) based fake news detection models. All GNN models are implemented and evaluated under the User Prefere

SafeGraph 251 Jan 01, 2023
Trex is a tool to match semantically similar functions based on transfer learning.

Trex is a tool to match semantically similar functions based on transfer learning.

62 Dec 28, 2022
A spaCy wrapper of OpenTapioca for named entity linking on Wikidata

spaCyOpenTapioca A spaCy wrapper of OpenTapioca for named entity linking on Wikidata. Table of contents Installation How to use Local OpenTapioca Vizu

Universitätsbibliothek Mannheim 80 Jan 03, 2023
Simple Python library, distributed via binary wheels with few direct dependencies, for easily using wav2vec 2.0 models for speech recognition

Wav2Vec2 STT Python Beta Software Simple Python library, distributed via binary wheels with few direct dependencies, for easily using wav2vec 2.0 mode

David Zurow 22 Dec 29, 2022
Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingwai

TextCortex - HemingwAI Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a Hemingw

TextCortex AI 27 Nov 28, 2022
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition

CRNN paper:An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition 1. create your ow

Tsukinousag1 3 Apr 02, 2022
Include MelGAN, HifiGAN and Multiband-HifiGAN, maybe NHV in the future.

Fast (GAN Based Neural) Vocoder Chinese README Todo Submit demo Support NHV Discription Include MelGAN, HifiGAN and Multiband-HifiGAN, maybe include N

Zhengxi Liu (刘正曦) 134 Dec 16, 2022
AI-Broad-casting - AI Broad casting with python

Basic Code 1. Use The Code Configuration Environment conda create -n code_base p