feat: initial commit of Ghaymah internal DNS, TCP and security testing suite and report

This commit is contained in:
2026-10-12 23:43:09 +03:00
commit bdcd2d44f5
57 changed files with 6499 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
const url = 'wss://client-terminal-0f1fe89209a8.hosted.ghaymah.systems/ws';
async function run() {
console.log('Connecting to ttyd WebSocket at', url);
const ws = new WebSocket(url, ['tty']);
let output = '';
ws.onopen = () => {
console.log('WebSocket connected!');
// 1. Send auth token
ws.send(JSON.stringify({ AuthToken: '' }));
// 2. Send resize
ws.send('1' + JSON.stringify({ columns: 120, rows: 40 }));
// 3. Send command after brief delay
setTimeout(() => {
console.log('Sending command: id && ip addr && cat /etc/resolv.conf');
ws.send('0' + 'id && ip addr && cat /etc/resolv.conf\n');
}, 500);
// 4. Close after collecting output
setTimeout(() => {
console.log('=== COLLECTED TERMINAL OUTPUT ===');
console.log(output);
ws.close();
process.exit(0);
}, 3500);
};
ws.onmessage = async (event) => {
let data;
if (event.data instanceof Blob) {
data = await event.data.text();
} else if (typeof event.data === 'string') {
data = event.data;
} else {
data = Buffer.from(event.data).toString('utf8');
}
// Remove ttyd command byte if present
if (data.startsWith('0')) data = data.substring(1);
output += data;
};
ws.onerror = (err) => console.error('WS error:', err);
ws.onclose = (e) => console.log('WS closed:', e.code, e.reason);
}
run().catch(console.error);