Go to the source code of this file.
◆ KEY_MAX_LEN
#define KEY_MAX_LEN 26000 |
◆ PRIVKEY_SEARCH_MIN_LENGTH
#define PRIVKEY_SEARCH_MIN_LENGTH (1 + 1 + 4 + 1) |
◆ check_fields()
Definition at line 44 of file privkey-find.c.
45 #define KEY_MAX_LEN 26000
58 ptr = ptr + field_len;
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void start
static const ut8 * parse_next_field(const ut8 *start, ut32 *len)
References KEY_MAX_LEN, parse_next_field(), and start.
Referenced by rz_search_privkey_update().
◆ parse_next_field()
◆ rz_search_privkey_update()
Definition at line 71 of file privkey-find.c.
72 int i,
k,
max, index, t;
75 const size_t old_nhits =
s->nhits;
76 const ut8 rsa_versionmarker[] = { 0x02, 0x01, 0x00, 0x02 };
77 const ut8 ecc_versionmarker[] = { 0x02, 0x01, 0x01, 0x04 };
78 const ut8 safecurves_versionmarker[] = { 0x02, 0x01, 0x00, 0x30 };
84 rz_list_foreach (
s->kws,
iter, kw) {
87 if (memcmp(
buf +
i, rsa_versionmarker,
sizeof(rsa_versionmarker)) &&
88 memcmp(
buf +
i, ecc_versionmarker,
sizeof(ecc_versionmarker)) &&
89 memcmp(
buf +
i, safecurves_versionmarker,
sizeof(safecurves_versionmarker))) {
100 for (
k =
i - 2;
k >=
i -
max;
k--) {
101 if (
buf[
k] == 0x30) {
115 return s->nhits - old_nhits;
static int check_fields(const ut8 *start)
#define PRIVKEY_SEARCH_MIN_LENGTH
RZ_API int rz_search_hit_new(RzSearch *s, RzSearchKeyword *kw, ut64 addr)
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
References check_fields(), from, i, k, rz_search_keyword_t::keyword_length, len, max, parse_next_field(), PRIVKEY_SEARCH_MIN_LENGTH, rz_search_hit_new(), and s.
Referenced by rz_search_set_mode().