RC4(&pcd->rc4_recv_key, len, indata, outdata);
}
-void (*crypt_function_recv)(unsigned long len, const unsigned char *indata, unsigned char *outdata);
-void (*crypt_function_send)(unsigned long len, const unsigned char *indata, unsigned char *outdata);
-
-
static void append_str(char **data, const char* append)
{
if (*data) {
/* concat args */
for (i = 0; i < pcd->conf.inputs_num; i++)
append_str(&command, pcd->conf.inputs[i]);
- crypt_function_recv = NULL;
- crypt_function_send = NULL;
/* get the host info */
PARA_NOTICE_LOG("getting host info of %s\n",
pcd->conf.hostname_arg);
goto out;
RC4_set_key(&pcd->rc4_send_key, RC4_KEY_LEN, rc4_buf);
RC4_set_key(&pcd->rc4_recv_key, RC4_KEY_LEN, rc4_buf + RC4_KEY_LEN);
- PARA_INFO_LOG("rc4 encrytion activated: %x:%x:%x:%x\n",
+ PARA_INFO_LOG("rc4 encryption activated: %x:%x:%x:%x\n",
rc4_buf[0], rc4_buf[1], rc4_buf[2], rc4_buf[3]);
- crypt_function_recv = rc4_recv;
- crypt_function_send = rc4_send;
+ enable_crypt(pcd->fd, rc4_recv, rc4_send);
}
/* send command */
PARA_INFO_LOG("--> %s\n", command);