mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
openssl v1.1 interface changes - this is beta!
This commit is contained in:
parent
f50e14a904
commit
8671dbd31a
9 changed files with 123 additions and 56 deletions
|
@ -335,13 +335,13 @@ int start_snmp(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
// xor initVect with salt
|
||||
for (i = 0; i < 8; i++)
|
||||
initVect[i] ^= privacy_params[i];
|
||||
des_key_sched((C_Block *) key, symcbc);
|
||||
des_ncbc_encrypt(snmpv3_get2 + 2, buf, sizeof(snmpv3_get2) - 2, symcbc, (C_Block *) (initVect), DES_ENCRYPT);
|
||||
DES_key_sched((const_DES_cblock *) key, &symcbc);
|
||||
DES_ncbc_encrypt(snmpv3_get2 + 2, buf, sizeof(snmpv3_get2) - 2, &symcbc, (const_DES_cblock *) (initVect), DES_ENCRYPT);
|
||||
|
||||
#endif
|
||||
|
||||
/* for (i = 0; i <= sizeof(snmpv3_get2) - 8; i += 8) {
|
||||
des_ncbc_encrypt(snmpv3_get2 + i, buf + i, 8, (C_Block*)(initVect), DES_ENCRYPT);
|
||||
DES_ncbc_encrypt(snmpv3_get2 + i, buf + i, 8, (const_DES_cblock*)(initVect), DES_ENCRYPT);
|
||||
}
|
||||
// last part of buffer
|
||||
if (buffer_len % 8) {
|
||||
|
@ -351,7 +351,7 @@ int start_snmp(int s, char *ip, int port, unsigned char options, char *miscptr,
|
|||
memset(tmp_buf, 0, 8);
|
||||
for (unsigned int l = start; l < buffer_len; l++)
|
||||
*tmp_buf_ptr++ = buffer[l];
|
||||
des_ncbc_encrypt(tmp_buf, buf + start, 1, symcbc, (C_Block*)(initVect), DES_ENCRYPT);
|
||||
DES_ncbc_encrypt(tmp_buf, buf + start, 1, &symcbc, (const_DES_cblock*)(initVect), DES_ENCRYPT);
|
||||
*out_buffer_len = buffer_len + 8 - (buffer_len % 8);
|
||||
} else
|
||||
*out_buffer_len = buffer_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue