页次: 1
问题是这样的,之前公司的VPN就是hillstone,我在github上找到了压缩好的scvpn压缩包,可以正常使用。
但是现在公司多了一步sms认证,这个命令行客户端不支持了。
去他们官网下载linux版本,安装不支持archlinux。
我尝试改他们源码,直接coredump了。
有没有什么办法能伪装下Ubuntu,让把文件系统装上,看能不能正常使用。
安装包有一段代码是这样的:
var isUbuntuOs = false;
var isCentOSOs = false;
var isNeokylinOs = false;
function checkOsProductInfo() {
var productType = systemInfo.productType.toLowerCase();
var productVersion = systemInfo.productVersion;
/* start installer with -v to see debug output */
console.log("OS: " + productType + " " + productVersion);
console.log("Kernel: " + systemInfo.kernelType);
console.log("CPU Architecture: " + systemInfo.currentCpuArchitecture);
if (systemInfo.kernelType === "linux" && systemInfo.currentCpuArchitecture === "x86_64") {
¦ if (productType === "ubuntu" && productVersion >= "18.04") {
¦ ¦ isUbuntuOs = true;
¦ } else if (productType === "centos" && productVersion >= "7") {
¦ ¦ isCentOSOs = true;
¦ } else if (productType === "unknown" && productVersion === "unknown") {
¦ ¦ /* CentOS 7.6 */
¦ ¦ if (systemInfo.prettyProductName.indexOf('3.10.0') >= 0 &&
¦ ¦ ¦ systemInfo.prettyProductName.indexOf('el7') >= 0) {
¦ ¦ ¦ isCentOSOs = true;
¦ ¦ }
¦ }
}
}
最近编辑记录 adamzyg (2025-07-04 13:56:11)
niania
离线
看起来读的是 /etc/os-release
离线
看起来读的是 /etc/os-release
哈哈,我伪装成ubuntu,装上了能用。谢谢~
niania
离线
页次: 1