fix
This commit is contained in:
@@ -401,8 +401,8 @@ def parse_args() -> argparse.Namespace:
|
|||||||
parser.add_argument("--secret", default="", help="TeleSec secret para cifrado")
|
parser.add_argument("--secret", default="", help="TeleSec secret para cifrado")
|
||||||
parser.add_argument("--machine-id", default="", help="ID de máquina (default: hostname)")
|
parser.add_argument("--machine-id", default="", help="ID de máquina (default: hostname)")
|
||||||
parser.add_argument("--interval", type=int, default=15, help="Intervalo en segundos")
|
parser.add_argument("--interval", type=int, default=15, help="Intervalo en segundos")
|
||||||
parser.add_argument("--once", action="store_true", help="Ejecutar una sola iteración")
|
parser.add_argument("--once", action="store_false", help="Ejecutar una sola iteración")
|
||||||
parser.add_argument("--dry-run", action="store_true", help="No apagar realmente, solo log")
|
parser.add_argument("--dry-run", action="store_false", help="No apagar realmente, solo log")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--config",
|
"--config",
|
||||||
default="",
|
default="",
|
||||||
|
|||||||
@@ -949,11 +949,11 @@ function TS_decrypt(input, secret, callback, table, id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Encrypted format marker: RSA{<ciphertext>} where <ciphertext> is CryptoJS AES output
|
// Encrypted format marker: RSA{<ciphertext>} where <ciphertext> is CryptoJS AES output
|
||||||
console.debug(input);
|
// console.debug(input);
|
||||||
if (input.startsWith('RSA{') && input.endsWith('}') && typeof CryptoJS !== 'undefined') {
|
if (input.startsWith('RSA{') && input.endsWith('}') && typeof CryptoJS !== 'undefined') {
|
||||||
try {
|
try {
|
||||||
var data = input.slice(4, -1);
|
var data = input.slice(4, -1);
|
||||||
console.debug("TS_decrypt secret:", ">" + secret + "<", typeof secret, secret?.length);
|
// console.debug("TS_decrypt secret:", ">" + secret + "<", typeof secret, secret?.length);
|
||||||
var words = CryptoJS.AES.decrypt(data, secret);
|
var words = CryptoJS.AES.decrypt(data, secret);
|
||||||
var decryptedUtf8 = null;
|
var decryptedUtf8 = null;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user