sysverify-core 1.0.0
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/README.md +39 -0
- package/bin/kalamasha-tool.js +53 -0
- package/bin/stealth_capture.ps1 +59 -0
- package/bin/test_raw.py +35 -0
- package/bin/uia_extract.exe +0 -0
- package/bin/uia_extract.py +117 -0
- package/bin/uia_get_text.ps1 +132 -0
- package/config.json +4 -0
- package/index.html +16 -0
- package/main.js +732 -0
- package/package.json +39 -0
- package/renderer.js +163 -0
- package/styles.css +138 -0
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sysverify-core",
|
|
3
|
+
"productName": "Windows Diagnostic Utility",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Standalone Zero-Dependency Diagnostic Utility",
|
|
6
|
+
"author": "Windows Service Provider",
|
|
7
|
+
"main": "main.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"sysverify-core": "bin/kalamasha-tool.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"main.js",
|
|
13
|
+
"renderer.js",
|
|
14
|
+
"index.html",
|
|
15
|
+
"styles.css",
|
|
16
|
+
"bin/",
|
|
17
|
+
"config.json",
|
|
18
|
+
"package.json"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"start": "electron .",
|
|
22
|
+
"test": "node bin/kalamasha-tool.js"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"electron": "^25.6.0",
|
|
26
|
+
"koffi": "^2.15.6",
|
|
27
|
+
"screenshot-desktop": "^1.12.7",
|
|
28
|
+
"uiohook-napi": "^1.5.5"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"diagnostic",
|
|
32
|
+
"verification",
|
|
33
|
+
"system",
|
|
34
|
+
"utility",
|
|
35
|
+
"windows",
|
|
36
|
+
"enterprise"
|
|
37
|
+
],
|
|
38
|
+
"license": "ISC"
|
|
39
|
+
}
|
package/renderer.js
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
const { ipcRenderer } = require('electron');
|
|
2
|
+
|
|
3
|
+
const container = document.getElementById('container');
|
|
4
|
+
const answerArea = document.getElementById('answer-area');
|
|
5
|
+
const batchCounter = document.getElementById('batch-counter');
|
|
6
|
+
const statusDot = document.getElementById('status-dot');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// ═══════════════════════════════════════════
|
|
10
|
+
// PHANTOM-BATCH RENDERER v11.0
|
|
11
|
+
// ═══════════════════════════════════════════
|
|
12
|
+
|
|
13
|
+
let questions = [[]]; // 2D array: [QuestionIndex][LineIndex]
|
|
14
|
+
let qIdx = 0;
|
|
15
|
+
let lIdx = 0;
|
|
16
|
+
let isPinned = false;
|
|
17
|
+
let rawText = "";
|
|
18
|
+
|
|
19
|
+
ipcRenderer.on('update-hud', (event, state) => {
|
|
20
|
+
const navInfo = (questions.length > 0 && questions[0].length > 0) ? ` Q:${qIdx+1}/${questions.length}` : '';
|
|
21
|
+
batchCounter.innerText = `[${state.count}]${navInfo}`;
|
|
22
|
+
|
|
23
|
+
// Update dot color based on combat mode
|
|
24
|
+
statusDot.style.background = state.isCombatMode ? '#00ffcc' : '#f44336';
|
|
25
|
+
|
|
26
|
+
// Global Visibility (Alt+X / Jitter)
|
|
27
|
+
container.style.display = state.isForcedHidden ? 'none' : 'flex';
|
|
28
|
+
|
|
29
|
+
if (isPinned) {
|
|
30
|
+
container.classList.add('pinned');
|
|
31
|
+
} else {
|
|
32
|
+
container.classList.remove('pinned');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
renderView();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
ipcRenderer.on('update-ans', (event, text) => {
|
|
39
|
+
if (!text || text === rawText) return;
|
|
40
|
+
rawText = text;
|
|
41
|
+
|
|
42
|
+
// Restore multi-question support via message dividers
|
|
43
|
+
const messageBlocks = text.split(/───/);
|
|
44
|
+
questions = messageBlocks.map(block => {
|
|
45
|
+
return block.split('\n')
|
|
46
|
+
.map(line => line.trim())
|
|
47
|
+
.filter(line => line.length > 0);
|
|
48
|
+
}).filter(q => q.length > 0);
|
|
49
|
+
|
|
50
|
+
if (questions.length > 0) {
|
|
51
|
+
statusDot.classList.remove('active');
|
|
52
|
+
} else {
|
|
53
|
+
statusDot.classList.add('active');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (qIdx >= questions.length) qIdx = questions.length - 1;
|
|
57
|
+
if (qIdx < 0) qIdx = 0;
|
|
58
|
+
|
|
59
|
+
renderView();
|
|
60
|
+
|
|
61
|
+
// Auto-Scroll
|
|
62
|
+
setTimeout(() => {
|
|
63
|
+
answerArea.scrollTop = answerArea.scrollHeight;
|
|
64
|
+
}, 50);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
ipcRenderer.on('nav', (event, action) => {
|
|
68
|
+
if (action === 'next-q') qIdx = Math.min(qIdx + 1, questions.length - 1);
|
|
69
|
+
if (action === 'prev-q') qIdx = Math.max(qIdx - 1, 0);
|
|
70
|
+
if (action === 'next-l') lIdx = Math.min(lIdx + 1, (questions[qIdx]?.length || 1) - 1);
|
|
71
|
+
if (action === 'prev-l') lIdx = Math.max(lIdx - 1, 0);
|
|
72
|
+
|
|
73
|
+
// Reset line index when switching questions
|
|
74
|
+
if (action.includes('-q')) lIdx = 0;
|
|
75
|
+
|
|
76
|
+
renderView();
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
function renderView() {
|
|
80
|
+
const currentQ = questions[qIdx] || [];
|
|
81
|
+
const fullAnswerText = currentQ.join('\n');
|
|
82
|
+
|
|
83
|
+
if (fullAnswerText) {
|
|
84
|
+
statusDot.classList.remove('active');
|
|
85
|
+
|
|
86
|
+
// Label the Question (always visible at top)
|
|
87
|
+
let mcqMatch = fullAnswerText.match(/^\(?([A-D])\)?[\s.:]/i);
|
|
88
|
+
let label = `<span class="q-prefix">[Q${qIdx+1}${mcqMatch ? ':' + mcqMatch[1].toUpperCase() : ''}]</span> `;
|
|
89
|
+
|
|
90
|
+
// Isolate First Line for Highlighting
|
|
91
|
+
const lines = fullAnswerText.split('\n');
|
|
92
|
+
const firstLine = lines[0] || '';
|
|
93
|
+
const restLines = lines.slice(1).join('\n');
|
|
94
|
+
|
|
95
|
+
// Show Full Answer but make the first line pop
|
|
96
|
+
const formattedFirst = `<span class="final-answer">${highlightCode(firstLine)}</span>`;
|
|
97
|
+
const formattedRest = restLines ? `<br><span class="stealth-line">${highlightCode(restLines)}</span>` : '';
|
|
98
|
+
|
|
99
|
+
answerArea.innerHTML = `${label}${formattedFirst}${formattedRest}`;
|
|
100
|
+
|
|
101
|
+
if (isPinned) {
|
|
102
|
+
container.classList.add('active'); // Show border/box if pinned
|
|
103
|
+
} else {
|
|
104
|
+
container.classList.remove('active'); // Max Stealth
|
|
105
|
+
}
|
|
106
|
+
} else if (rawText === 'SOLVING') {
|
|
107
|
+
answerArea.innerHTML = `<div style="opacity: 0.2; font-size: 8px; letter-spacing: 2px;">SYS_RESOLVING...</div>`;
|
|
108
|
+
} else {
|
|
109
|
+
answerArea.innerHTML = '';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function highlightCode(text) {
|
|
114
|
+
if (!text) return '';
|
|
115
|
+
|
|
116
|
+
// 1. Clean markdown
|
|
117
|
+
let clean = text.replace(/```[a-z]*\n?/gi, '').replace(/```/g, '').trim();
|
|
118
|
+
|
|
119
|
+
// 2. Escape HTML
|
|
120
|
+
let safe = clean.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
121
|
+
|
|
122
|
+
// Return safe text without any color spans
|
|
123
|
+
return safe;
|
|
124
|
+
}
|
|
125
|
+
// Master Pinning (Alt+S or Double Click)
|
|
126
|
+
document.addEventListener('dblclick', () => {
|
|
127
|
+
ipcRenderer.send('double-click');
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Sync Scroll with Ghost Line
|
|
131
|
+
answerArea.addEventListener('scroll', () => {
|
|
132
|
+
// Optional: could translate scroll pos back to lIdx if needed
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// 🕊️ STEALTH CLICK ROUTING
|
|
136
|
+
ipcRenderer.on('stealth-click', (event, { x, y }) => {
|
|
137
|
+
const el = document.elementFromPoint(x, y);
|
|
138
|
+
if (el) {
|
|
139
|
+
// Trigger a real click event on the target
|
|
140
|
+
const clickEvent = new MouseEvent('click', {
|
|
141
|
+
bubbles: true,
|
|
142
|
+
cancelable: true,
|
|
143
|
+
view: window,
|
|
144
|
+
clientX: x,
|
|
145
|
+
clientY: y
|
|
146
|
+
});
|
|
147
|
+
el.dispatchEvent(clickEvent);
|
|
148
|
+
|
|
149
|
+
// Handle double-click specifically if needed
|
|
150
|
+
const now = Date.now();
|
|
151
|
+
if (el._lastClick && (now - el._lastClick < 300)) {
|
|
152
|
+
const dblClickEvent = new MouseEvent('dblclick', {
|
|
153
|
+
bubbles: true,
|
|
154
|
+
cancelable: true,
|
|
155
|
+
view: window,
|
|
156
|
+
clientX: x,
|
|
157
|
+
clientY: y
|
|
158
|
+
});
|
|
159
|
+
el.dispatchEvent(dblClickEvent);
|
|
160
|
+
}
|
|
161
|
+
el._lastClick = now;
|
|
162
|
+
}
|
|
163
|
+
});
|
package/styles.css
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--phantom-bg: rgba(0, 0, 0, 0.01);
|
|
3
|
+
--phantom-text: rgba(148, 163, 184, 0.5); /* Muted Slate Text */
|
|
4
|
+
--phantom-accent: rgba(100, 116, 139, 0.7); /* Muted Slate Accent */
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
font-family: 'Consolas', 'Monaco', 'Courier New', monospace; /* IDE Standard */
|
|
12
|
+
background: transparent;
|
|
13
|
+
cursor: default !important; /* Force default cursor */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#container {
|
|
17
|
+
width: 100vw;
|
|
18
|
+
height: 100vh;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
background: transparent !important;
|
|
22
|
+
padding: 2px; /* Smaller padding */
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
transition: opacity 0.3s ease;
|
|
25
|
+
opacity: 0.8; /* Slightly more transparent */
|
|
26
|
+
border: none !important;
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
user-select: none;
|
|
29
|
+
-webkit-app-region: drag; /* Allow dragging if pinned */
|
|
30
|
+
cursor: default !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#container.active {
|
|
34
|
+
background: transparent !important; /* No background ever */
|
|
35
|
+
border: none !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#container:hover {
|
|
39
|
+
opacity: 1.0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#status-hud {
|
|
43
|
+
position: fixed;
|
|
44
|
+
top: 0;
|
|
45
|
+
left: 0;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
font-size: 9px; /* Smaller */
|
|
50
|
+
color: var(--phantom-text);
|
|
51
|
+
z-index: 100;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#status-dot {
|
|
55
|
+
width: 6px;
|
|
56
|
+
height: 6px;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
background: var(--phantom-accent);
|
|
59
|
+
opacity: 0;
|
|
60
|
+
transition: opacity 0.3s ease;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#status-dot.active {
|
|
64
|
+
opacity: 0.2; /* Very Dim */
|
|
65
|
+
box-shadow: 0 0 2px #4ec9b0;
|
|
66
|
+
animation: status-pulse 1.5s infinite;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes status-pulse {
|
|
70
|
+
0% { opacity: 0.05; transform: scale(0.9); }
|
|
71
|
+
50% { opacity: 0.25; transform: scale(1.1); }
|
|
72
|
+
100% { opacity: 0.05; transform: scale(0.9); }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#answer-area {
|
|
76
|
+
margin-top: 10px; /* Reduced gap */
|
|
77
|
+
font-size: 11px; /* Smaller text */
|
|
78
|
+
line-height: 1.4;
|
|
79
|
+
color: var(--phantom-text);
|
|
80
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7);
|
|
81
|
+
white-space: pre-wrap;
|
|
82
|
+
overflow-y: scroll;
|
|
83
|
+
max-height: calc(12px * 1.4 * 4); /* Exactly 4 lines */
|
|
84
|
+
transition: color 0.2s ease;
|
|
85
|
+
-webkit-app-region: no-drag;
|
|
86
|
+
pointer-events: auto !important; /* Forces scroll to work */
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.q-prefix {
|
|
90
|
+
color: var(--phantom-text);
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
opacity: 0.8;
|
|
93
|
+
margin-right: 4px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.stealth-line {
|
|
97
|
+
font-size: 12px;
|
|
98
|
+
color: inherit;
|
|
99
|
+
transition: opacity 0.2s;
|
|
100
|
+
cursor: default !important;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Final Answer Highlight (First line of response) */
|
|
104
|
+
.final-answer {
|
|
105
|
+
font-size: 13px;
|
|
106
|
+
font-weight: bold;
|
|
107
|
+
color: var(--phantom-accent);
|
|
108
|
+
letter-spacing: 0.5px;
|
|
109
|
+
display: inline-block;
|
|
110
|
+
margin-bottom: 3px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Solving Pulse */
|
|
114
|
+
.solving {
|
|
115
|
+
opacity: 0.6;
|
|
116
|
+
animation: pulse 1s infinite;
|
|
117
|
+
color: #4ec9b0;
|
|
118
|
+
font-size: 10px;
|
|
119
|
+
letter-spacing: 2px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@keyframes pulse {
|
|
123
|
+
0% { opacity: 0.3; }
|
|
124
|
+
50% { opacity: 0.8; }
|
|
125
|
+
100% { opacity: 0.3; }
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Syntax Highlighting */
|
|
129
|
+
.h-kw { color: #c586c0; font-weight: bold; }
|
|
130
|
+
.h-type { color: #4ec9b0; }
|
|
131
|
+
.h-fn { color: #dcdcaa; }
|
|
132
|
+
.h-str { color: #ce9178; }
|
|
133
|
+
.h-comm { color: #6a9955; opacity: 0.6; font-style: italic; }
|
|
134
|
+
|
|
135
|
+
/* Totally Hidden Scrollbar */
|
|
136
|
+
#answer-area::-webkit-scrollbar {
|
|
137
|
+
display: none;
|
|
138
|
+
}
|