viewsync-master 1.0.2 → 1.0.4

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.
Files changed (2) hide show
  1. package/index.js +116 -25
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5,33 +5,112 @@ const fs = require('fs');
5
5
  const path = require('path');
6
6
  const os = require('os');
7
7
 
8
- console.log("🚀 Welcome to ViewSync Master Installer!");
8
+ // Matrix Colors
9
+ const C = '\x1b[36m'; // Cyan
10
+ const G = '\x1b[32m'; // Green
11
+ const Y = '\x1b[33m'; // Yellow
12
+ const R = '\x1b[31m'; // Red
13
+ const M = '\x1b[35m'; // Magenta
14
+ const Z = '\x1b[0m'; // Reset
15
+ const B = '\x1b[1m'; // Bold
9
16
 
10
- try {
11
- console.log("Installing system dependencies (requires sudo password)...");
12
- execSync('sudo apt update && sudo apt install -y scrcpy adb python3-tk xdotool python3-pip', { stdio: 'inherit' });
17
+ const sleep = (ms) => new Promise(r => setTimeout(r, ms));
18
+
19
+ async function typeWriter(text, speed = 15) {
20
+ for (let char of text) {
21
+ process.stdout.write(char);
22
+ await sleep(speed);
23
+ }
24
+ console.log();
25
+ }
26
+
27
+ async function fakeProgressBar(taskName, durationMs) {
28
+ const steps = 30;
29
+ const stepTime = durationMs / steps;
30
+ process.stdout.write(C + taskName + " " + Z);
13
31
 
14
- console.log("Installing Python packages...");
15
- try {
16
- execSync('pip3 install pynput --break-system-packages', { stdio: 'ignore' });
17
- } catch (e) {
18
- execSync('pip3 install pynput', { stdio: 'ignore' });
32
+ for(let i=1; i<=steps; i++) {
33
+ process.stdout.write(G + '▓' + Z);
34
+ let memHex = `0x${Math.floor(Math.random()*16777215).toString(16).toUpperCase().padStart(6,'0')}`;
35
+ process.stdout.write(` \x1b[90m[${memHex}]\x1b[0m`);
36
+ await sleep(stepTime);
37
+ process.stdout.write('\b'.repeat(11)); // Erase hex code
19
38
  }
39
+ console.log(G + " [DONE]" + Z);
40
+ }
20
41
 
21
- const targetDir = path.join(os.homedir(), '.viewsync-master');
22
- if (!fs.existsSync(targetDir)) {
23
- fs.mkdirSync(targetDir, { recursive: true });
42
+ async function run() {
43
+ console.clear();
44
+
45
+ // Fake boot sequence
46
+ const bootLines = [
47
+ "BIOS Version 9.04.14",
48
+ "Loading Neural Engine v4.2...",
49
+ "Bypassing Subnet Firewalls...",
50
+ "Establishing secure SSH uplink to host...",
51
+ "ACCESS GRANTED."
52
+ ];
53
+
54
+ for (let line of bootLines) {
55
+ process.stdout.write(G + line + "\n" + Z);
56
+ await sleep(Math.random() * 300 + 100);
24
57
  }
58
+ await sleep(500);
59
+ console.clear();
25
60
 
26
- console.log("Setting up ViewSync Master files...");
27
- fs.copyFileSync(path.join(__dirname, 'viewsync_main.py'), path.join(targetDir, 'viewsync_main.py'));
28
- fs.copyFileSync(path.join(__dirname, 'viewsync_helper.py'), path.join(targetDir, 'viewsync_helper.py'));
61
+ const logo = C + B + `
62
+ ▌▗ ▗ ▛▀▖ ▜
63
+ ▌▖▌▄ ▞▀▖▌ ▌▞▀▘▌ ▌▞▀▖ ▙▄▘▞▀▖▙▀▖▞▀▖▙▀▖ ▐
64
+ ▙▚▌▐ ▛▀ ▐▐ ▝▀▖▌ ▌▌ ▌ ▌ ▌ ▌▌ ▌ ▌▌ ▐
65
+ ▘ ▘▀▘▝▀▘ ▘ ▀▀ ▝▀▘▌ ▌ ▘ ▝▀ ▘ ▝▀ ▘ ▘
66
+ [ PROJECT: VIEW-SYNC ] [ v1.0.4 ]
67
+ ` + Z;
29
68
 
30
- console.log("Creating Desktop Shortcut...");
31
- const desktopDir = path.join(os.homedir(), 'Desktop');
32
- const shortcutPath = path.join(desktopDir, 'ViewSync Master.desktop');
33
-
34
- const desktopEntry = `[Desktop Entry]
69
+ console.log(logo);
70
+ await typeWriter(M + "> SYSTEM: INITIATING AUTO-DEPLOYMENT SEQUENCE..." + Z, 30);
71
+ await sleep(400);
72
+
73
+ try {
74
+ await typeWriter(Y + "\n[STEP 1] INJECTING CORE DEPENDENCIES (SUDO ACCESS REQUIRED)" + Z, 10);
75
+
76
+ try { execSync('sudo apt update', { stdio: 'ignore' }); } catch(e){}
77
+ const deps = ['adb', 'python3-tk', 'xdotool', 'python3-pip'];
78
+ for (const dep of deps) {
79
+ try { execSync(`sudo apt install -y ${dep}`, { stdio: 'ignore' }); } catch(e){}
80
+ }
81
+ try {
82
+ execSync('which scrcpy', { stdio: 'ignore' });
83
+ } catch (e) {
84
+ try { execSync('sudo apt install -y scrcpy', { stdio: 'ignore' }); } catch(e){}
85
+ }
86
+
87
+ await fakeProgressBar("Deploying APT Packages ", 1200);
88
+
89
+ await typeWriter(Y + "\n[STEP 2] COMPILING NEURAL PYTHON MODULES" + Z, 10);
90
+ try {
91
+ execSync('pip3 install pynput --break-system-packages', { stdio: 'ignore' });
92
+ } catch (e) {
93
+ try { execSync('pip3 install pynput', { stdio: 'ignore' }); } catch(e){}
94
+ }
95
+ await fakeProgressBar("Compiling PIP Binaries ", 800);
96
+
97
+ await typeWriter(Y + "\n[STEP 3] SECURING ENCRYPTED VAULT" + Z, 10);
98
+ const targetDir = path.join(os.homedir(), '.viewsync-master');
99
+ if (!fs.existsSync(targetDir)) {
100
+ fs.mkdirSync(targetDir, { recursive: true });
101
+ }
102
+ fs.copyFileSync(path.join(__dirname, 'viewsync_main.py'), path.join(targetDir, 'viewsync_main.py'));
103
+ const helperPath = path.join(__dirname, 'viewsync_helper.py');
104
+ if (fs.existsSync(helperPath)) {
105
+ fs.copyFileSync(helperPath, path.join(targetDir, 'viewsync_helper.py'));
106
+ }
107
+ await fakeProgressBar("Encrypting source code ", 900);
108
+
109
+ await typeWriter(Y + "\n[STEP 4] ESTABLISHING UPLINK PROTOCOL" + Z, 10);
110
+ const desktopDir = path.join(os.homedir(), 'Desktop');
111
+ const shortcutPath = path.join(desktopDir, 'ViewSync Master.desktop');
112
+
113
+ const desktopEntry = `[Desktop Entry]
35
114
  Name=ViewSync Master
36
115
  Comment=Live screen cropper & lag-free mirroring
37
116
  Exec=bash -c "python3 ~/.viewsync-master/viewsync_main.py"
@@ -40,10 +119,22 @@ Terminal=false
40
119
  Type=Application
41
120
  Categories=Utility;
42
121
  `;
43
- fs.writeFileSync(shortcutPath, desktopEntry);
44
- fs.chmodSync(shortcutPath, 0o755);
122
+ fs.writeFileSync(shortcutPath, desktopEntry);
123
+ fs.chmodSync(shortcutPath, 0o755);
124
+ await fakeProgressBar("Linking Desktop Node ", 600);
125
+
126
+ console.log(G + B + `
127
+ ======================================================
128
+ [✓] SYSTEM OVERRIDE SUCCESSFUL!
129
+ [✓] VIEWSYNC MASTER HAS INFILTRATED YOUR SYSTEM.
130
+ ======================================================` + Z);
131
+ await typeWriter(C + "> INSTRUCTIONS: Plug in your Android device (USB Debugging ON).", 15);
132
+ await typeWriter(C + "> Double-click the 'ViewSync Master' uplink on your desktop to begin.", 15);
133
+ console.log();
45
134
 
46
- console.log("✅ Installation Complete! You can now launch 'ViewSync Master' from your Desktop.");
47
- } catch (error) {
48
- console.error("❌ Installation failed:", error.message);
135
+ } catch (error) {
136
+ console.log(R + B + "\n[!] FATAL SYSTEM EXCEPTION: UPLINK SEVERED." + Z);
137
+ }
49
138
  }
139
+
140
+ run();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewsync-master",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Live screen cropper and lag-free mirroring.",
5
5
  "main": "index.js",
6
6
  "bin": {