feat: complete multi-microservice project deployment, internal DNS, raw TCP and security penetration report
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
const { RemoteTerminal } = require('./remote_exec');
|
||||
|
||||
async function main() {
|
||||
const term = new RemoteTerminal();
|
||||
await term.connect();
|
||||
console.log('Connected to soc-tester pod!');
|
||||
|
||||
console.log('--- Test 1: TCP Port Probe on soc-redis ---');
|
||||
const nc = await term.exec('nc -zv -w 3 soc-redis-10f420c389ef 6379 2>&1');
|
||||
console.log('Output:', nc.output);
|
||||
|
||||
console.log('--- Test 2: Raw TCP Redis PING ---');
|
||||
const pingCmd = 'printf "*1\\r\\n\\$4\\r\\nPING\\r\\n" | nc -w 3 soc-redis-10f420c389ef 6379';
|
||||
const ping = await term.exec(pingCmd);
|
||||
console.log('Output:', ping.output);
|
||||
|
||||
console.log('--- Test 3: Raw TCP Redis SET & GET ---');
|
||||
const setGetCmd = 'printf "*3\\r\\n\\$3\\r\\nSET\\r\\n\\$15\\r\\nsoc:mesh:status\\r\\n\\$16\\r\\nGHAYMAH_MESH_OK\\r\\n*2\\r\\n\\$3\\r\\nGET\\r\\n\\$15\\r\\nsoc:mesh:status\\r\\n" | nc -w 3 soc-redis-10f420c389ef 6379';
|
||||
const setGet = await term.exec(setGetCmd);
|
||||
console.log('Output:', setGet.output);
|
||||
|
||||
console.log('--- Test 4: Raw TCP Redis INFO ---');
|
||||
const infoCmd = 'printf "*1\\r\\n\\$4\\r\\nINFO\\r\\n" | nc -w 3 soc-redis-10f420c389ef 6379 | grep -E "redis_version|connected_clients|tcp_port|role"';
|
||||
const info = await term.exec(infoCmd);
|
||||
console.log('Output:', info.output);
|
||||
|
||||
term.close();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
Reference in New Issue
Block a user