Reduced spam
This commit is contained in:
parent
66e0db11bd
commit
2a326d477f
22
index.js
22
index.js
|
@ -196,7 +196,7 @@ function make_encryption_key(string)
|
|||
key.at.rx = 0;
|
||||
key.at.tx = 0;
|
||||
|
||||
console.log("make_encryption_key:", key.str);
|
||||
//console.log("make_encryption_key:", key.str);
|
||||
|
||||
// Return the key
|
||||
return key;
|
||||
|
@ -204,22 +204,22 @@ function make_encryption_key(string)
|
|||
|
||||
function socket_write(socket, encryption, data)
|
||||
{
|
||||
console.log("socket_write() b4:", data);
|
||||
//console.log("socket_write() b4:", data);
|
||||
|
||||
// Convert the data to JSON
|
||||
data = JSON.stringify(data);
|
||||
|
||||
console.log("socket_write() stringify:", data);
|
||||
//console.log("socket_write() stringify:", data);
|
||||
|
||||
// Encrypt the data
|
||||
data = string_encrypt(encryption, data);
|
||||
|
||||
console.log("socket_write() encrypt:", data);
|
||||
//console.log("socket_write() encrypt:", data);
|
||||
|
||||
// Order the request
|
||||
data = send_ordered(data);
|
||||
|
||||
console.log("socket_write() ordered:", data);
|
||||
//console.log("socket_write() ordered:", data);
|
||||
|
||||
// Send the data
|
||||
socket.write(data);
|
||||
|
@ -243,7 +243,7 @@ function connect(hostname, port=22068)
|
|||
|
||||
g.rsa_task.stdout.on('data', function(data)
|
||||
{
|
||||
console.log("child stdout:", data.toString());
|
||||
//console.log("child stdout:", data.toString());
|
||||
});
|
||||
|
||||
g.rsa_task.stderr.on('data', function(data)
|
||||
|
@ -277,7 +277,7 @@ function connect(hostname, port=22068)
|
|||
|
||||
function rsa_task_send(data)
|
||||
{
|
||||
console.log("Send to child:", JSON.stringify(data));
|
||||
//console.log("Send to child:", JSON.stringify(data));
|
||||
g.rsa_task.send(JSON.stringify(data));
|
||||
}
|
||||
|
||||
|
@ -296,12 +296,12 @@ function connect(hostname, port=22068)
|
|||
// Recieve data in order
|
||||
recieve_ordered(data, function(data)
|
||||
{
|
||||
console.log("RAW: ", {
|
||||
/*console.log("RAW: ", {
|
||||
input: data,
|
||||
sock_new:g.sock_new,
|
||||
raw_encryption_data_upto: g.raw_encryption_data_upto,
|
||||
bsplit_length: bsplit(data, Buffer.from("\n")).length
|
||||
});
|
||||
});*/
|
||||
|
||||
if(g.sock_new != 0)
|
||||
{
|
||||
|
@ -345,7 +345,7 @@ function connect(hostname, port=22068)
|
|||
|
||||
g.rsa_task.on('message', function(message)
|
||||
{
|
||||
console.log(message)
|
||||
//console.log(message)
|
||||
|
||||
// Parse the message from JSON
|
||||
var data = JSON.parse(message);
|
||||
|
@ -375,7 +375,7 @@ function connect(hostname, port=22068)
|
|||
// Set the key
|
||||
g.encryption = make_encryption_key(atob(data['out']));
|
||||
|
||||
console.log("Sending 1:", data['out']);
|
||||
//console.log("Sending 1:", data['out']);
|
||||
|
||||
// Send status
|
||||
socket_write(client, g.encryption, 1);
|
||||
|
|
Loading…
Reference in New Issue