viewsync-master 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +32 -45
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const {
|
|
3
|
+
const { exec } = require('child_process');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const os = require('os');
|
|
7
|
+
const util = require('util');
|
|
8
|
+
const execAsync = util.promisify(exec);
|
|
7
9
|
|
|
8
10
|
// Matrix Colors
|
|
9
11
|
const C = '\x1b[36m'; // Cyan
|
|
@@ -11,7 +13,6 @@ const G = '\x1b[32m'; // Green
|
|
|
11
13
|
const Y = '\x1b[33m'; // Yellow
|
|
12
14
|
const R = '\x1b[31m'; // Red
|
|
13
15
|
const M = '\x1b[35m'; // Magenta
|
|
14
|
-
const W = '\x1b[37m'; // White
|
|
15
16
|
const Z = '\x1b[0m'; // Reset
|
|
16
17
|
const B = '\x1b[1m'; // Bold
|
|
17
18
|
|
|
@@ -28,7 +29,6 @@ async function typeWriter(text, speed = 15) {
|
|
|
28
29
|
async function decryptText(text, duration = 1000) {
|
|
29
30
|
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%&*';
|
|
30
31
|
const iterations = duration / 50;
|
|
31
|
-
|
|
32
32
|
for (let i = 0; i < iterations; i++) {
|
|
33
33
|
let scrambled = '';
|
|
34
34
|
for (let j = 0; j < text.length; j++) {
|
|
@@ -41,31 +41,27 @@ async function decryptText(text, duration = 1000) {
|
|
|
41
41
|
process.stdout.write('\r' + C + B + text + Z + '\n');
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
async function
|
|
45
|
-
const steps = 30;
|
|
46
|
-
const stepTime = durationMs / steps;
|
|
47
|
-
process.stdout.write(C + taskName + " " + Z);
|
|
48
|
-
|
|
49
|
-
for(let i=1; i<=steps; i++) {
|
|
50
|
-
process.stdout.write(G + '▓' + Z);
|
|
51
|
-
let memHex = `0x${Math.floor(Math.random()*16777215).toString(16).toUpperCase().padStart(6,'0')}`;
|
|
52
|
-
process.stdout.write(` \x1b[90m[${memHex}]\x1b[0m`);
|
|
53
|
-
await sleep(stepTime);
|
|
54
|
-
process.stdout.write('\b'.repeat(11));
|
|
55
|
-
}
|
|
56
|
-
console.log(G + " [DONE]" + Z);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
async function spinner(text, duration) {
|
|
44
|
+
async function runCommandWithSpinner(text, cmd) {
|
|
60
45
|
const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
61
46
|
let i = 0;
|
|
47
|
+
let done = false;
|
|
48
|
+
|
|
62
49
|
const interval = setInterval(() => {
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
if (!done) {
|
|
51
|
+
process.stdout.write(`\r${M}${frames[i]} ${C}${text} ${G}[0x${Math.floor(Math.random()*16777215).toString(16).toUpperCase().padStart(6,'0')}]${Z} `);
|
|
52
|
+
i = (i + 1) % frames.length;
|
|
53
|
+
}
|
|
65
54
|
}, 80);
|
|
66
|
-
|
|
55
|
+
|
|
56
|
+
try {
|
|
57
|
+
await execAsync(cmd);
|
|
58
|
+
} catch(e) {
|
|
59
|
+
// Ignore errors to keep it flowing
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
done = true;
|
|
67
63
|
clearInterval(interval);
|
|
68
|
-
process.stdout.write(`\r${G}✔ ${text} [COMPLETED]${Z}\n`);
|
|
64
|
+
process.stdout.write(`\r${G}✔ ${text} [COMPLETED] ${Z}\n`);
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
async function run() {
|
|
@@ -73,6 +69,7 @@ async function run() {
|
|
|
73
69
|
|
|
74
70
|
try {
|
|
75
71
|
console.log(R + B + "/// ACCESS RESTRICTED: SECURITY CLEARANCE REQUIRED ///" + Z);
|
|
72
|
+
const { execSync } = require('child_process');
|
|
76
73
|
execSync('sudo -v', { stdio: 'inherit' });
|
|
77
74
|
} catch(e) {
|
|
78
75
|
console.log(R + "Intruder detected. Terminating connection." + Z);
|
|
@@ -80,7 +77,6 @@ async function run() {
|
|
|
80
77
|
}
|
|
81
78
|
console.clear();
|
|
82
79
|
|
|
83
|
-
// Hardware Scan
|
|
84
80
|
await decryptText("INITIALIZING HARDWARE SCAN...");
|
|
85
81
|
const gbRam = Math.round(os.totalmem() / (1024 * 1024 * 1024));
|
|
86
82
|
console.log(G + `[+] CPU Architecture: ${os.arch().toUpperCase()}` + Z);
|
|
@@ -101,7 +97,7 @@ async function run() {
|
|
|
101
97
|
▌▖▌▄ ▞▀▖▌ ▌▞▀▘▌ ▌▞▀▖ ▙▄▘▞▀▖▙▀▖▞▀▖▙▀▖ ▐
|
|
102
98
|
▙▚▌▐ ▛▀ ▐▐ ▝▀▖▌ ▌▌ ▌ ▌ ▌ ▌▌ ▌ ▌▌ ▐
|
|
103
99
|
▘ ▘▀▘▝▀▘ ▘ ▀▀ ▝▀▘▌ ▌ ▘ ▝▀ ▘ ▝▀ ▘ ▘
|
|
104
|
-
[ PROJECT: VIEW-SYNC ] [ v1.0.
|
|
100
|
+
[ PROJECT: VIEW-SYNC ] [ v1.0.6 ]
|
|
105
101
|
` + Z;
|
|
106
102
|
|
|
107
103
|
console.log(logo);
|
|
@@ -110,31 +106,23 @@ async function run() {
|
|
|
110
106
|
|
|
111
107
|
try {
|
|
112
108
|
await typeWriter(Y + "\n[PHASE 1] INJECTING CORE DEPENDENCIES" + Z, 10);
|
|
113
|
-
await
|
|
114
|
-
|
|
109
|
+
await runCommandWithSpinner("Updating APT Repositories", "sudo apt update");
|
|
110
|
+
await runCommandWithSpinner("Injecting ADB Protocols", "sudo apt install -y adb");
|
|
111
|
+
await runCommandWithSpinner("Injecting X11 Automation Core", "sudo apt install -y xdotool");
|
|
112
|
+
await runCommandWithSpinner("Compiling Python GUI Interface", "sudo apt install -y python3-tk python3-pip");
|
|
115
113
|
|
|
116
|
-
await spinner("Resolving Quantum Packages", 1000);
|
|
117
|
-
const deps = ['adb', 'python3-tk', 'xdotool', 'python3-pip'];
|
|
118
|
-
for (const dep of deps) {
|
|
119
|
-
try { execSync(`sudo apt install -y ${dep}`, { stdio: 'ignore' }); } catch(e){}
|
|
120
|
-
}
|
|
121
114
|
try {
|
|
122
|
-
|
|
115
|
+
await execAsync('which scrcpy');
|
|
123
116
|
} catch (e) {
|
|
124
|
-
|
|
117
|
+
await runCommandWithSpinner("Deploying ViewSync Display Engine", "sudo apt install -y scrcpy");
|
|
125
118
|
}
|
|
126
|
-
await fakeProgressBar("Deploying System Binaries ", 1200);
|
|
127
119
|
|
|
128
120
|
await typeWriter(Y + "\n[PHASE 2] COMPILING NEURAL PYTHON MODULES" + Z, 10);
|
|
129
|
-
await
|
|
130
|
-
try {
|
|
131
|
-
execSync('pip3 install pynput --break-system-packages', { stdio: 'ignore' });
|
|
132
|
-
} catch (e) {
|
|
133
|
-
try { execSync('pip3 install pynput', { stdio: 'ignore' }); } catch(e){}
|
|
134
|
-
}
|
|
135
|
-
await fakeProgressBar("Compiling PIP Modules ", 1000);
|
|
121
|
+
await runCommandWithSpinner("Fetching Pynput Algorithms", "pip3 install pynput --break-system-packages || pip3 install pynput");
|
|
136
122
|
|
|
137
123
|
await typeWriter(Y + "\n[PHASE 3] SECURING ENCRYPTED VAULT" + Z, 10);
|
|
124
|
+
await runCommandWithSpinner("Allocating Memory Vault", "sleep 1");
|
|
125
|
+
|
|
138
126
|
const targetDir = path.join(os.homedir(), '.viewsync-master');
|
|
139
127
|
if (!fs.existsSync(targetDir)) {
|
|
140
128
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
@@ -144,7 +132,7 @@ async function run() {
|
|
|
144
132
|
if (fs.existsSync(helperPath)) {
|
|
145
133
|
fs.copyFileSync(helperPath, path.join(targetDir, 'viewsync_helper.py'));
|
|
146
134
|
}
|
|
147
|
-
await
|
|
135
|
+
await runCommandWithSpinner("Encrypting Source Code", "sleep 1");
|
|
148
136
|
|
|
149
137
|
await typeWriter(Y + "\n[PHASE 4] ESTABLISHING UPLINK PROTOCOL" + Z, 10);
|
|
150
138
|
const desktopDir = path.join(os.homedir(), 'Desktop');
|
|
@@ -161,7 +149,7 @@ Categories=Utility;
|
|
|
161
149
|
`;
|
|
162
150
|
fs.writeFileSync(shortcutPath, desktopEntry);
|
|
163
151
|
fs.chmodSync(shortcutPath, 0o755);
|
|
164
|
-
await
|
|
152
|
+
await runCommandWithSpinner("Linking Desktop Node", "sleep 1");
|
|
165
153
|
|
|
166
154
|
console.log(G + B + `
|
|
167
155
|
======================================================
|
|
@@ -169,7 +157,6 @@ Categories=Utility;
|
|
|
169
157
|
[✓] VIEWSYNC MASTER HAS INFILTRATED YOUR SYSTEM.
|
|
170
158
|
======================================================` + Z);
|
|
171
159
|
|
|
172
|
-
// Make the terminal beep!
|
|
173
160
|
process.stdout.write('\x07');
|
|
174
161
|
|
|
175
162
|
await typeWriter(C + "> INSTRUCTIONS: Plug in your Android device (USB Debugging ON).", 15);
|