Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

路径问题 #3

Open
PSGO opened this issue May 12, 2024 · 9 comments
Open

路径问题 #3

PSGO opened this issue May 12, 2024 · 9 comments

Comments

@PSGO
Copy link

PSGO commented May 12, 2024

PPPwnGo还没有一例反馈点击后无法执行的情况,Lite有人反馈此问题,可能是由于路径导致。同样,Select Stage2 File,我在自测Loader的时候发现了类似问题。

//调用C++
string ethPath = GetInterfacePath(ethName);
//string pppwnFath = @"PPPwn\pppwn.exe";
string pppwnFath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "PPPwn" + "\" + "pppwn.exe";
string newFwVer = fwVersion.Replace(".", "");
//string arguments = $"--interface {ethPath} --fw {newFwVer} --stage1 .\PPPwn\stage1\{newFwVer}\stage1.bin --stage2 .\PPPwn\stage2\{newFwVer}\stage2.bin --auto-retry";
string arguments = "--interface " + ethPath + " --fw " + newFwVer + " --stage1 PPPwn/stage1/" + newFwVer + "/stage1.bin --stage2 PPPwn/stage2/" + newFwVer + "/stage2.bin --auto-retry";
bool isStatge0 = false;

@PokersKun
Copy link
Owner

这个问题倒是比较少出现,不过目前我使用的是相对路径其实也不太好,等后续有需要做成安装包版本的话一般都是使用系统环境路径来拼接会好一点。

@PSGO
Copy link
Author

PSGO commented May 15, 2024

关了吧,其实是另一个问题,我一直以为路径....
有少部分用户反馈同一个“参数格式”错误,大部分还是正常的

整段和PPPwnGo差不多,就是少了个空格,Go一直不存在这个问题

process.StartInfo.FileName = pppwnFath; // 设置要执行的程序路径
process.StartInfo.Arguments = arguments; // 设置程序参数
Console.WriteLine(pppwnFath + " " + arguments);

修正:
process.StartInfo.FileName = pppwnFath; // 设置要执行的程序路径
process.StartInfo.Arguments = " " + arguments; // 设置程序参数
//Console.WriteLine(pppwnFath + " " + arguments);

@PSGO
Copy link
Author

PSGO commented May 15, 2024

关于Select Stage2 File报错,可以复现的,抽空我截图哈

@PSGO
Copy link
Author

PSGO commented May 16, 2024

在某些语言环境里,比如西班牙语环境中小数点就是逗号而不是点,传参就会报错

修正:
string[] formattedallFwVersion = allFwVersion.Select(name => (name.Insert(name.Length - 2, "."))).ToArray();

@PSGO
Copy link
Author

PSGO commented May 17, 2024

更新逻辑的基础可能还有优化空间,先删目录后解压风险有点大,极端测试中如果,有一定概率解压失败,PPPwn组件不完整将无法使用,建议用一个临时目录,用xcopy最后删除

@PSGO
Copy link
Author

PSGO commented May 19, 2024

少量新用户会遇到获取网卡deviceID失败,建议写个循环

PokersKun added a commit that referenced this issue May 21, 2024
… splice the path of stage2 file, and optimized the update process of PPPwnCPP.

- update PPPwnCPP, stage1.bin and stage2.bin (test files) to the latest version, add 7.00/7.01/7.02 firmware support.
@PokersKun
Copy link
Owner

PokersKun commented May 21, 2024

抱歉,最近比较忙没来得及处理问题,现在把能修的部分已经更新到 a00eddb 了,可以看一下能不能解决问题。

整段和PPPwnGo差不多,就是少了个空格,Go一直不存在这个问题

补充了这部分关于空格的修改。

关于Select Stage2 File报错,可以复现的,抽空我截图哈

这个问题估计指的是 #4,但在我的系统上添加单引号会导致找不到文件,所以这里我用了另外的方法(选择 stage2 文件时将文件拷贝至固定目录下,在启动 PPPwnCPP 时和 stage1 一样用固定的路径应该可以解决大部分系统环境下的问题)。

在某些语言环境里,比如西班牙语环境中小数点就是逗号而不是点,传参就会报错

补充了这部分关于小数点的修改。

更新逻辑的基础可能还有优化空间,先删目录后解压风险有点大,极端测试中如果,有一定概率解压失败,PPPwn组件不完整将无法使用,建议用一个临时目录,用xcopy最后删除

这里我使用了另外的方法(更新开始时先备份原文件,在出现异常时恢复原文件)来优化这个逻辑。

少量新用户会遇到获取网卡deviceID失败,建议写个循环

这个问题我没办法复现,暂时还没有修复,看看能不能提供 Log 会方便一点。

😁最后感谢大佬的关注和排查,辛苦了哈💪

@PSGO
Copy link
Author

PSGO commented May 21, 2024

快别这么说,我就是个天桥贴膜的...

@PSGO
Copy link
Author

PSGO commented May 31, 2024

经过长时间观察,在老旧电脑、网卡、网卡驱动上
networkInterface.Description要比networkInterface.Name兼容性更好

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants