mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-07 12:16:04 +00:00
fix
This commit is contained in:
parent
253a2d3c19
commit
5910f93914
|
@ -63,7 +63,7 @@ var ChromeObject = function() {
|
||||||
this.installedDir,
|
this.installedDir,
|
||||||
"--profile-directory=\"" + this.profileName + "\"",
|
"--profile-directory=\"" + this.profileName + "\"",
|
||||||
"--user-data-dir=\"" + this.userDataDir + "\"",
|
"--user-data-dir=\"" + this.userDataDir + "\"",
|
||||||
url
|
"\"" + url + "\""
|
||||||
].join(' '), SYS.getCurrentScriptDirectory());
|
].join(' '), SYS.getCurrentScriptDirectory());
|
||||||
} else {
|
} else {
|
||||||
SHELL.createDesktopIcon("Chrome Prototype (" + this.installedDir + ")", [
|
SHELL.createDesktopIcon("Chrome Prototype (" + this.installedDir + ")", [
|
||||||
|
@ -75,7 +75,7 @@ var ChromeObject = function() {
|
||||||
"--incognito",
|
"--incognito",
|
||||||
"--profile-directory=\"" + this.profileName + "\"",
|
"--profile-directory=\"" + this.profileName + "\"",
|
||||||
"--user-data-dir=\"" + this.userDataDir + "\"",
|
"--user-data-dir=\"" + this.userDataDir + "\"",
|
||||||
url
|
"\"" + url + "\""
|
||||||
].join(' '), SYS.getCurrentScriptDirectory());
|
].join(' '), SYS.getCurrentScriptDirectory());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -120,13 +120,13 @@ var ChromeObject = function() {
|
||||||
"--user-data-dir=\"" + this.userDataDir + "\"",
|
"--user-data-dir=\"" + this.userDataDir + "\"",
|
||||||
"\"" + url + "\""
|
"\"" + url + "\""
|
||||||
].join(" "));
|
].join(" "));
|
||||||
sleep(1000);
|
sleep(1500);
|
||||||
this.processID = process.ProcessID;
|
this.processID = process.ProcessID;
|
||||||
sleep(1000);
|
sleep(1500);
|
||||||
shell.release();
|
shell.release();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("ChromeObject.open() -> " + e.message);
|
console.error("ChromeObject.open() -> " + e.message);
|
||||||
sleep(1000);
|
sleep(1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -156,11 +156,11 @@ var ChromeObject = function() {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
shell.release();
|
shell.release();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("ChromeObject.open() -> " + e.message);
|
console.error("ChromeObject.open() -> " + e.message);
|
||||||
sleep(1000);
|
sleep(1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
39
shadow.js
39
shadow.js
|
@ -78,14 +78,14 @@ var check_LDPlayer = function() {
|
||||||
"-p",
|
"-p",
|
||||||
pid
|
pid
|
||||||
]);
|
]);
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
shadowPID = process.ProcessID;
|
shadowPID = process.ProcessID;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppsPID.push([pid, ssPID, shadowPID]);
|
AppsPID.push([pid, ssPID, shadowPID]);
|
||||||
|
|
||||||
console.info("Waiting new launched");
|
console.info("Waiting new launched");
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -97,20 +97,20 @@ var check_NoxPlayer = function() {
|
||||||
|
|
||||||
for (var i = 0; i < items.length; i++) {
|
for (var i = 0; i < items.length; i++) {
|
||||||
var pid = items[i].PID;
|
var pid = items[i].PID;
|
||||||
var hostname = items[i].hostname;
|
var title = items[i].title;
|
||||||
|
|
||||||
if (pid > 0 && AppsMutex.indexOf(pid) < 0) {
|
if (pid > 0 && AppsMutex.indexOf(pid) < 0) {
|
||||||
console.info("New launched NoxPlayer: " + hostname);
|
console.info("New launched NoxPlayer: " + title);
|
||||||
AppsMutex.push(pid);
|
AppsMutex.push(pid);
|
||||||
|
|
||||||
if (hostname in Apps.NoxPlayer) {
|
if (title in Apps.NoxPlayer) {
|
||||||
while (!SYS.isAlivePID(ssPID)) {
|
while (!SYS.isAlivePID(ssPID)) {
|
||||||
var ss = SS.connect(Apps.NoxPlayer[hostname]);
|
var ss = SS.connect(Apps.NoxPlayer[title]);
|
||||||
ssPort = ss.listenPort;
|
ssPort = ss.listenPort;
|
||||||
ssPID = ss.processID;
|
ssPID = ss.processID;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error("Not assigned static IP: " + hostname);
|
console.error("Not assigned static IP: " + title);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,14 +125,14 @@ var check_NoxPlayer = function() {
|
||||||
"-p",
|
"-p",
|
||||||
pid
|
pid
|
||||||
]);
|
]);
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
shadowPID = process.ProcessID;
|
shadowPID = process.ProcessID;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppsPID.push([pid, ssPID, shadowPID]);
|
AppsPID.push([pid, ssPID, shadowPID]);
|
||||||
|
|
||||||
console.info("Waiting new launched");
|
console.info("Waiting new launched");
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -144,7 +144,12 @@ var check_Chrome = function() {
|
||||||
console.info("Creating Chrome Shoutcut: " + uniqueId);
|
console.info("Creating Chrome Shoutcut: " + uniqueId);
|
||||||
|
|
||||||
// 바탕화면에 바로가기만 생성
|
// 바탕화면에 바로가기만 생성
|
||||||
Chrome.create().setProfile(uniqueId, uniqueId).createShoutcut("https://google.com");
|
var number = uniqueId.replace(/[^0-9]/g,'');
|
||||||
|
Chrome.create()
|
||||||
|
.setProfile(uniqueId, uniqueId)
|
||||||
|
.setInPrivate(true)
|
||||||
|
.createShoutcut("https://google.com")
|
||||||
|
;
|
||||||
AppsMutex.push("chrome_" + uniqueId);
|
AppsMutex.push("chrome_" + uniqueId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,12 +183,12 @@ var check_ProcessName = function() {
|
||||||
"-n",
|
"-n",
|
||||||
uniqueId
|
uniqueId
|
||||||
]);
|
]);
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
shadowPID = process.ProcessID;
|
shadowPID = process.ProcessID;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppsPID.push([ssPID, shadowPID]);
|
AppsPID.push([ssPID, shadowPID]);
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -235,19 +240,19 @@ var main = function() {
|
||||||
console.info("Waiting new launched");
|
console.info("Waiting new launched");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
check_LDPlayer();
|
check_LDPlayer();
|
||||||
|
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
check_NoxPlayer();
|
check_NoxPlayer();
|
||||||
|
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
check_Chrome();
|
check_Chrome();
|
||||||
|
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
check_ProcessName();
|
check_ProcessName();
|
||||||
|
|
||||||
sleep(3000);
|
sleep(1500);
|
||||||
check_Zombie();
|
check_Zombie();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user