Skip to content

Conversation

YuHuanTin
Copy link
Contributor

No description provided.

@z0z0r4
Copy link
Collaborator

z0z0r4 commented Apr 17, 2025

不懂 c++ 等个佬吧。。

@z0z0r4 z0z0r4 requested a review from xiaoyv404 April 17, 2025 05:47
@SessionHu
Copy link
Collaborator

不懂改依赖的缘故, 经验告诉我们非必要情况依赖什么的还是不要乱动

@YuHuanTin
Copy link
Contributor Author

因为我发现原来写的可读性和性能都不如这个好

@cxw620
Copy link
Contributor

cxw620 commented Apr 17, 2025

我倒感觉实在没必要把这些用例塞正文里面, 放 Discussion 供参考就行, 要不然这么多语言全塞进去.

留 JavaScript 的得了, 毕竟本来就是逆向前端的.

@z0z0r4
Copy link
Collaborator

z0z0r4 commented Apr 18, 2025

已经有这么多实现了我觉得还是不错的。本来就只有这个有实现参考,也不是很多这种,而且留discussion可能时效性啥的会比较混乱,且谁都发一份,能不能用都不确定

@SessionHu
Copy link
Collaborator

折腾了好一会总算是把代码编译出来了, 跑是能跑起来的, 结果是否正确就不清楚了, 以下是运行结果

(纯 ASCII 版)

@SessionHu ? /workspaces/bilibili-API-collect (master) $ g++ wbi.cc -std=c++23 -I/usr/include/botan-3 -lbotan-3 -lcpr -o wbi
@SessionHu ? /workspaces/bilibili-API-collect (master) $ ./wbi
avid=1755630705&cid=1574294582&fnval=4048&fnver=0&fourk=1&qn=32&wts=1744995884&w_rid=5920dda4e4801c1d71082ab10827dd8b
@SessionHu ? /workspaces/bilibili-API-collect (master) $ g++ app.cc -std=c++23 -I/usr/include/botan-3 -lbotan-3 -lcpr -o app
@SessionHu ? /workspaces/bilibili-API-collect (master) $ ./app
{"appkey":"1d8b6e7d45233436","id":114514,"sign":"01479cf20504d865519ac50f33ba3a7d","str":"1919810","test":"???????"}
appkey=1d8b6e7d45233436&id=114514&sign=01479cf20504d865519ac50f33ba3a7d&str=1919810&test=%E3%81%84%E3%81%84%E3%82%88%EF%BC%8C%E3%81%93%E3%81%84%E3%82%88

(彩色截图)
Screenshot_2025-04-19-01-13-13-128_org.chromium.chrome.stable.jpg

@z0z0r4
Copy link
Collaborator

z0z0r4 commented Apr 19, 2025

结果不知道对不对可咋合.jpg

暂挂中

@wuziqian211
Copy link
Collaborator

wuziqian211 commented Apr 19, 2025

折腾了好一会总算是把代码编译出来了, 跑是能跑起来的, 结果是否正确就不清楚了, 以下是运行结果

(纯 ASCII 版)

@SessionHu ? /workspaces/bilibili-API-collect (master) $ g++ wbi.cc -std=c++23 -I/usr/include/botan-3 -lbotan-3 -lcpr -o wbi
@SessionHu ? /workspaces/bilibili-API-collect (master) $ ./wbi
avid=1755630705&cid=1574294582&fnval=4048&fnver=0&fourk=1&qn=32&wts=1744995884&w_rid=5920dda4e4801c1d71082ab10827dd8b
@SessionHu ? /workspaces/bilibili-API-collect (master) $ g++ app.cc -std=c++23 -I/usr/include/botan-3 -lbotan-3 -lcpr -o app
@SessionHu ? /workspaces/bilibili-API-collect (master) $ ./app
{"appkey":"1d8b6e7d45233436","id":114514,"sign":"01479cf20504d865519ac50f33ba3a7d","str":"1919810","test":"???????"}
appkey=1d8b6e7d45233436&id=114514&sign=01479cf20504d865519ac50f33ba3a7d&str=1919810&test=%E3%81%84%E3%81%84%E3%82%88%EF%BC%8C%E3%81%93%E3%81%84%E3%82%88

(彩色截图)
Screenshot_2025-04-19-01-13-13-128_org.chromium.chrome.stable.jpg

经过 JS 版代码验证,结果一致

Screenshot_2025-04-19-21-20-17-716_com.termux-edit.jpg

@z0z0r4
Copy link
Collaborator

z0z0r4 commented Apr 19, 2025

well,是否应该合并呢

@SessionHu
Copy link
Collaborator

现在这已经从可行性变成必要性的问题了是吧

@z0z0r4
Copy link
Collaborator

z0z0r4 commented Apr 19, 2025

现在这已经从可行性变成必要性的问题了是吧

是的,我没有合并过类似换依赖这种,我也不熟 c++ 不知道哪个依赖更适合

@SessionHu
Copy link
Collaborator

现在这已经从可行性变成必要性的问题了是吧

是的,我没有合并过类似换依赖这种,我也不熟 c++ 不知道哪个依赖更适合

虽然我也不写 cpp, 但看依赖关系, 似乎原来的库更常用一点, 加上前面说过的原因, 总之我是中立态度

❯ apt rdepends botan3
botan3
Reverse Depends:
  Depends: botan3-static (= 3.7.1-2)
❯ apt rdepends cryptopp
cryptopp
Reverse Depends:
  Depends: cryptopp-static (= 8.9.0)
  Depends: megacmd
  Depends: codecrypt

@xiaoyv404
Copy link
Collaborator

我不熟悉cpp(

@z0z0r4 z0z0r4 added the 算法/Algorithm 与API相关的算法及代码示例 label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
算法/Algorithm 与API相关的算法及代码示例
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants