n0099 / tbclient.protobuf

从 244 个历史版本百度贴吧客户端中提取出的所有 Protocol Buffers 定义文件 `.proto`
https://n0099.net/tbm
23 stars 6 forks source link

是不是少了一点? #8

Open Dilettante258 opened 1 month ago

Dilettante258 commented 1 month ago

https://github.com/n0099/tbclient.protobuf/blob/926f0a2f365fcefe3d705598418fe52d541a0b88/proto/UserPost/DataReq.proto#L30-L33

缺了个

CommonReq common = 27;

我最近在重构项目将会从你的repo里面引用一些proto文件,感谢了。

n0099 commented 1 month ago

看branchtbclient不要看main https://github.com/n0099/tbclient.protobuf/blame/tbclient/proto/UserPost/DataReq.proto#L31-L32 https://github.com/n0099/tbclient.protobuf/blame/9eabdc71110125a93461adeae3505baa06b66a78/java/UserPost/DataReq.java#L61-L64 jadx将其重命名 https://github.com/skylot/jadx/blob/b5e3dcf70fb388c46e27c2acd3411e7bc52eb2d4/jadx-core/src/main/java/jadx/core/codegen/utils/CodeGenUtils.java#L114 https://github.com/skylot/jadx/blob/b5e3dcf70fb388c46e27c2acd3411e7bc52eb2d4/jadx-core/src/main/java/jadx/core/dex/visitors/rename/RenameVisitor.java#L235f64788common并插了行注释(根据 https://github.com/skylot/jadx/blob/b5e3dcf70fb388c46e27c2acd3411e7bc52eb2d4/jadx-core/src/main/java/jadx/core/codegen/utils/CodeGenUtils.java#L111 https://github.com/skylot/jadx/blob/b5e3dcf70fb388c46e27c2acd3411e7bc52eb2d4/jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java#L244-L249 可以用高于info--comments-level关)导致这个regex不匹配 https://github.com/n0099/tbclient.protobuf/blob/31383157abcfbaefcdc8dfffac1e296da2ca0f0e/squareWireProtoBufJavaGeneratedClassesDecompiler.php#L40 image 更好的是换个 https://github.com/javaparser/javaparser 来处理ast而非拿regex锤子 https://en.wikipedia.org/wiki/Law_of_the_instrument 钉字符串钉子 https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 https://z.n0099.net/#narrow/near/87047 但即便大脑升级ast也无法把f64788common变回common除非又写regex来对其f\d+(\w+)