... | ... |
@@ -87,10 +87,12 @@ static void context_safe(struct cli_bc_ctx *ctx) |
87 | 87 |
ctx->hooks.pedata = &nopedata; |
88 | 88 |
} |
89 | 89 |
|
90 |
+static int cli_bytecode_context_reset(struct cli_bc_ctx *ctx); |
|
90 | 91 |
struct cli_bc_ctx *cli_bytecode_context_alloc(void) |
91 | 92 |
{ |
92 | 93 |
struct cli_bc_ctx *ctx = cli_calloc(1, sizeof(*ctx)); |
93 | 94 |
ctx->bytecode_timeout = 60000; |
95 |
+ cli_bytecode_context_reset(ctx); |
|
94 | 96 |
return ctx; |
95 | 97 |
} |
96 | 98 |
|
... | ... |
@@ -194,6 +196,14 @@ static int cli_bytecode_context_reset(struct cli_bc_ctx *ctx) |
194 | 194 |
ctx->jsnorms = NULL; |
195 | 195 |
ctx->njsnorms = 0; |
196 | 196 |
ctx->jsnormdir = NULL; |
197 |
+ |
|
198 |
+ for (i=0;i<ctx->nmaps;i++) |
|
199 |
+ cli_bcapi_map_done(ctx, i); |
|
200 |
+ free(ctx->maps); |
|
201 |
+ ctx->maps = NULL; |
|
202 |
+ ctx->nmaps = 0; |
|
203 |
+ |
|
204 |
+ ctx->containertype = CL_TYPE_ANY; |
|
197 | 205 |
return CL_SUCCESS; |
198 | 206 |
} |
199 | 207 |
|
... | ... |
@@ -31,6 +31,7 @@ |
31 | 31 |
#include <fcntl.h> |
32 | 32 |
#include <errno.h> |
33 | 33 |
#include <string.h> |
34 |
+#include <math.h> |
|
34 | 35 |
#include "cltypes.h" |
35 | 36 |
#include "clambc.h" |
36 | 37 |
#include "bytecode.h" |
... | ... |
@@ -43,6 +44,9 @@ |
43 | 43 |
#include "disasm.h" |
44 | 44 |
#include "scanners.h" |
45 | 45 |
#include "jsparse/js-norm.h" |
46 |
+#include "hashtab.h" |
|
47 |
+#include "str.h" |
|
48 |
+#include "filetypes.h" |
|
46 | 49 |
|
47 | 50 |
uint32_t cli_bcapi_test1(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b) |
48 | 51 |
{ |
... | ... |
@@ -321,18 +325,34 @@ static inline const char* cli_memmem(const char *haystack, unsigned hlen, |
321 | 321 |
|
322 | 322 |
int32_t cli_bcapi_file_find(struct cli_bc_ctx *ctx, const uint8_t* data, uint32_t len) |
323 | 323 |
{ |
324 |
+ fmap_t *map = ctx->fmap; |
|
325 |
+ if (!map || len <= 0) { |
|
326 |
+ cli_dbgmsg("bcapi_file_find preconditions not met\n"); |
|
327 |
+ return -1; |
|
328 |
+ } |
|
329 |
+ return cli_bcapi_file_find_limit(ctx, data, len, map->len); |
|
330 |
+} |
|
331 |
+ |
|
332 |
+int32_t cli_bcapi_file_find_limit(struct cli_bc_ctx *ctx , const uint8_t* data, uint32_t len, int32_t limit) |
|
333 |
+{ |
|
324 | 334 |
char buf[4096]; |
325 | 335 |
fmap_t *map = ctx->fmap; |
326 | 336 |
uint32_t off = ctx->off; |
327 | 337 |
int n; |
328 | 338 |
|
329 |
- if (!map || len > sizeof(buf)/4 || len <= 0) { |
|
330 |
- cli_dbgmsg("bcapi_file_find preconditions not met\n"); |
|
339 |
+ if (!map || len > sizeof(buf)/4 || len <= 0 || limit <= 0) { |
|
340 |
+ cli_dbgmsg("bcapi_file_find_limit preconditions not met\n"); |
|
331 | 341 |
return -1; |
332 | 342 |
} |
333 | 343 |
for (;;) { |
334 | 344 |
const char *p; |
335 |
- n = fmap_readn(map, buf, off, sizeof(buf)); |
|
345 |
+ int32_t readlen = sizeof(buf); |
|
346 |
+ if (off + readlen > limit) { |
|
347 |
+ readlen = limit - off; |
|
348 |
+ if (readlen < 0) |
|
349 |
+ return -1; |
|
350 |
+ } |
|
351 |
+ n = fmap_readn(map, buf, off, readlen); |
|
336 | 352 |
if ((unsigned)n < len || n < 0) |
337 | 353 |
return -1; |
338 | 354 |
p = cli_memmem(buf, n, data, len); |
... | ... |
@@ -432,7 +452,11 @@ int32_t cli_bcapi_extract_new(struct cli_bc_ctx *ctx, int32_t id) |
432 | 432 |
cli_dbgmsg("bytecode: scanning extracted file %s\n", ctx->tempfile); |
433 | 433 |
cctx = (cli_ctx*)ctx->ctx; |
434 | 434 |
if (cctx) { |
435 |
+ cli_file_t current = cctx->container_type; |
|
436 |
+ if (ctx->containertype != CL_TYPE_ANY) |
|
437 |
+ cctx->container_type = ctx->containertype; |
|
435 | 438 |
res = cli_magic_scandesc(ctx->outfd, cctx); |
439 |
+ cctx->container_type = current; |
|
436 | 440 |
if (res == CL_VIRUS) |
437 | 441 |
ctx->found = 1; |
438 | 442 |
} |
... | ... |
@@ -532,6 +556,12 @@ int32_t cli_bcapi_hashset_done(struct cli_bc_ctx *ctx , int32_t id) |
532 | 532 |
if (!s) |
533 | 533 |
return -1; |
534 | 534 |
cli_hashset_destroy(s); |
535 |
+ if (id == ctx->nhashsets-1) { |
|
536 |
+ ctx->nhashsets--; |
|
537 |
+ s = cli_realloc(ctx->hashsets, ctx->nhashsets*sizeof(*s)); |
|
538 |
+ if (s) |
|
539 |
+ ctx->hashsets = s; |
|
540 |
+ } |
|
535 | 541 |
return 0; |
536 | 542 |
} |
537 | 543 |
|
... | ... |
@@ -894,3 +924,270 @@ int32_t cli_bcapi_jsnorm_done(struct cli_bc_ctx *ctx , int32_t id) |
894 | 894 |
b->from = -1; |
895 | 895 |
return 0; |
896 | 896 |
} |
897 |
+ |
|
898 |
+int32_t cli_bcapi_ilog2(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b) |
|
899 |
+{ |
|
900 |
+ double f; |
|
901 |
+ if (!b) |
|
902 |
+ return 0x7fffffff; |
|
903 |
+ /* log(a/b) is -32..32, so 2^26*32=2^31 covers the entire range of int32 */ |
|
904 |
+ f = (1<<26)*log((double)a / b) / log(2); |
|
905 |
+ return (int32_t)f; |
|
906 |
+} |
|
907 |
+ |
|
908 |
+int32_t cli_bcapi_ipow(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) |
|
909 |
+{ |
|
910 |
+ if (!a && b < 0) |
|
911 |
+ return 0x7fffffff; |
|
912 |
+ return (int32_t)c*pow(a,b); |
|
913 |
+} |
|
914 |
+ |
|
915 |
+int32_t cli_bcapi_iexp(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) |
|
916 |
+{ |
|
917 |
+ double f; |
|
918 |
+ if (!b) |
|
919 |
+ return 0x7fffffff; |
|
920 |
+ f= c*exp((double)a/b); |
|
921 |
+ return (int32_t)f; |
|
922 |
+} |
|
923 |
+ |
|
924 |
+int32_t cli_bcapi_isin(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) |
|
925 |
+{ |
|
926 |
+ double f; |
|
927 |
+ if (!b) |
|
928 |
+ return 0x7fffffff; |
|
929 |
+ f = c*sin((double)a/b); |
|
930 |
+ return (int32_t)f; |
|
931 |
+} |
|
932 |
+ |
|
933 |
+int32_t cli_bcapi_icos(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) |
|
934 |
+{ |
|
935 |
+ double f; |
|
936 |
+ if (!b) |
|
937 |
+ return 0x7fffffff; |
|
938 |
+ f = c*cos((double)a/b); |
|
939 |
+ return (int32_t)f; |
|
940 |
+} |
|
941 |
+ |
|
942 |
+int32_t cli_bcapi_memstr(struct cli_bc_ctx *ctx, const uint8_t* h, int32_t hs, |
|
943 |
+ const uint8_t*n, int32_t ns) |
|
944 |
+{ |
|
945 |
+ const uint8_t *s; |
|
946 |
+ if (!h || !n || hs < 0 || ns < 0) |
|
947 |
+ return -1; |
|
948 |
+ s = cli_memstr(h, hs, n, ns); |
|
949 |
+ if (!s) |
|
950 |
+ return -1; |
|
951 |
+ return s - h; |
|
952 |
+} |
|
953 |
+ |
|
954 |
+int32_t cli_bcapi_hex2ui(struct cli_bc_ctx *ctx, uint32_t ah, uint32_t bh) |
|
955 |
+{ |
|
956 |
+ uint8_t result = 0; |
|
957 |
+ unsigned char in[2]; |
|
958 |
+ in[0] = ah; |
|
959 |
+ in[1] = bh; |
|
960 |
+ |
|
961 |
+ if (cli_hex2str_to(in, &result, 2) == -1) |
|
962 |
+ return -1; |
|
963 |
+ return result; |
|
964 |
+} |
|
965 |
+ |
|
966 |
+int32_t cli_bcapi_atoi(struct cli_bc_ctx *ctx, const uint8_t* str, int32_t len) |
|
967 |
+{ |
|
968 |
+ int32_t number = 0; |
|
969 |
+ const uint8_t *end = str + len; |
|
970 |
+ while (isspace(*str) && str < end) str++; |
|
971 |
+ if (str == end) |
|
972 |
+ return -1;/* all spaces */ |
|
973 |
+ if (*str == '+') str++; |
|
974 |
+ if (str == end) |
|
975 |
+ return -1;/* all spaces and +*/ |
|
976 |
+ if (*str == '-') |
|
977 |
+ return -1;/* only positive numbers */ |
|
978 |
+ if (!isdigit(*str)) |
|
979 |
+ return -1; |
|
980 |
+ while (isdigit(*str) && str < end) { |
|
981 |
+ number = number*10 + (*str - '0'); |
|
982 |
+ } |
|
983 |
+ return number; |
|
984 |
+} |
|
985 |
+ |
|
986 |
+uint32_t cli_bcapi_debug_print_str_start(struct cli_bc_ctx *ctx , const uint8_t* s, uint32_t len) |
|
987 |
+{ |
|
988 |
+ if (!s || len <= 0) |
|
989 |
+ return -1; |
|
990 |
+ cli_dbgmsg("bytecode debug: %.*s", s, len); |
|
991 |
+ return 0; |
|
992 |
+} |
|
993 |
+ |
|
994 |
+uint32_t cli_bcapi_debug_print_str_nonl(struct cli_bc_ctx *ctx , const uint8_t* s, uint32_t len) |
|
995 |
+{ |
|
996 |
+ if (!s || len <= 0) |
|
997 |
+ return -1; |
|
998 |
+ fwrite(s, 1, len, stderr); |
|
999 |
+ return 0; |
|
1000 |
+} |
|
1001 |
+ |
|
1002 |
+uint32_t cli_bcapi_entropy_buffer(struct cli_bc_ctx *ctx , uint8_t* s, int32_t len) |
|
1003 |
+{ |
|
1004 |
+ uint32_t probTable[256]; |
|
1005 |
+ unsigned i; |
|
1006 |
+ double entropy = 0; |
|
1007 |
+ double log2 = log(2); |
|
1008 |
+ |
|
1009 |
+ if (!s || len <= 0) |
|
1010 |
+ return -1; |
|
1011 |
+ memset(probTable, 0, sizeof(probTable)); |
|
1012 |
+ for (i=0;i<len;i++) { |
|
1013 |
+ probTable[s[i]]++; |
|
1014 |
+ } |
|
1015 |
+ for (i=0;i<256;i++) { |
|
1016 |
+ double p; |
|
1017 |
+ if (!probTable[i]) |
|
1018 |
+ continue; |
|
1019 |
+ p = (double)probTable[i] / len; |
|
1020 |
+ entropy += -p*log(p)/log2; |
|
1021 |
+ } |
|
1022 |
+ entropy *= 1<<26; |
|
1023 |
+ return (uint32_t)entropy; |
|
1024 |
+} |
|
1025 |
+ |
|
1026 |
+int32_t cli_bcapi_map_new(struct cli_bc_ctx *ctx, int32_t keysize, int32_t valuesize) |
|
1027 |
+{ |
|
1028 |
+ unsigned n = ctx->nmaps+1; |
|
1029 |
+ struct cli_map *s = cli_realloc(ctx->maps, sizeof(*ctx->maps)*n); |
|
1030 |
+ if (!s) |
|
1031 |
+ return -1; |
|
1032 |
+ ctx->maps = s; |
|
1033 |
+ ctx->nmaps = n; |
|
1034 |
+ s = &s[n-1]; |
|
1035 |
+ cli_map_init(s, keysize, valuesize, 16); |
|
1036 |
+ return n-1; |
|
1037 |
+} |
|
1038 |
+ |
|
1039 |
+static struct cli_map *get_hashtab(struct cli_bc_ctx *ctx, int32_t id) |
|
1040 |
+{ |
|
1041 |
+ if (id < 0 || id >= ctx->nmaps || !ctx->maps) |
|
1042 |
+ return NULL; |
|
1043 |
+ return &ctx->maps[id]; |
|
1044 |
+} |
|
1045 |
+ |
|
1046 |
+int32_t cli_bcapi_map_addkey(struct cli_bc_ctx *ctx , const uint8_t* key, int32_t keysize, int32_t id) |
|
1047 |
+{ |
|
1048 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1049 |
+ if (!s) |
|
1050 |
+ return -1; |
|
1051 |
+ return cli_map_addkey(s, key, keysize); |
|
1052 |
+} |
|
1053 |
+ |
|
1054 |
+int32_t cli_bcapi_map_setvalue(struct cli_bc_ctx *ctx, const uint8_t* value, int32_t valuesize, int32_t id) |
|
1055 |
+{ |
|
1056 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1057 |
+ if (!s) |
|
1058 |
+ return -1; |
|
1059 |
+ return cli_map_setvalue(s, value, valuesize); |
|
1060 |
+} |
|
1061 |
+ |
|
1062 |
+int32_t cli_bcapi_map_remove(struct cli_bc_ctx *ctx , const uint8_t* key, int32_t keysize, int32_t id) |
|
1063 |
+{ |
|
1064 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1065 |
+ if (!s) |
|
1066 |
+ return -1; |
|
1067 |
+ return cli_map_removekey(s, key, keysize); |
|
1068 |
+} |
|
1069 |
+ |
|
1070 |
+int32_t cli_bcapi_map_find(struct cli_bc_ctx *ctx , const uint8_t* key, int32_t keysize, int32_t id) |
|
1071 |
+{ |
|
1072 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1073 |
+ if (!s) |
|
1074 |
+ return -1; |
|
1075 |
+ return cli_map_find(s, key, keysize); |
|
1076 |
+} |
|
1077 |
+ |
|
1078 |
+int32_t cli_bcapi_map_getvaluesize(struct cli_bc_ctx *ctx, int32_t id) |
|
1079 |
+{ |
|
1080 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1081 |
+ if (!s) |
|
1082 |
+ return -1; |
|
1083 |
+ return cli_map_getvalue_size(s); |
|
1084 |
+} |
|
1085 |
+ |
|
1086 |
+uint8_t* cli_bcapi_map_getvalue(struct cli_bc_ctx *ctx , int32_t id, int32_t valuesize) |
|
1087 |
+{ |
|
1088 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1089 |
+ if (!s) |
|
1090 |
+ return NULL; |
|
1091 |
+ if (cli_map_getvalue_size(s) != valuesize) |
|
1092 |
+ return NULL; |
|
1093 |
+ return cli_map_getvalue(s); |
|
1094 |
+} |
|
1095 |
+ |
|
1096 |
+int32_t cli_bcapi_map_done(struct cli_bc_ctx *ctx , int32_t id) |
|
1097 |
+{ |
|
1098 |
+ struct cli_map *s = get_hashtab(ctx, id); |
|
1099 |
+ if (!s) |
|
1100 |
+ return -1; |
|
1101 |
+ cli_map_delete(s); |
|
1102 |
+ if (id == ctx->nmaps-1) { |
|
1103 |
+ ctx->nmaps--; |
|
1104 |
+ s = cli_realloc(ctx->maps, ctx->nmaps*(sizeof(*s))); |
|
1105 |
+ if (s) |
|
1106 |
+ ctx->maps = s; |
|
1107 |
+ } |
|
1108 |
+ return 0; |
|
1109 |
+} |
|
1110 |
+ |
|
1111 |
+uint32_t cli_bcapi_engine_functionality_level(struct cli_bc_ctx *ctx) |
|
1112 |
+{ |
|
1113 |
+ return cl_retflevel(); |
|
1114 |
+} |
|
1115 |
+ |
|
1116 |
+uint32_t cli_bcapi_engine_dconf_level(struct cli_bc_ctx *ctx) |
|
1117 |
+{ |
|
1118 |
+ return CL_FLEVEL_DCONF; |
|
1119 |
+} |
|
1120 |
+ |
|
1121 |
+uint32_t cli_bcapi_engine_scan_options(struct cli_bc_ctx *ctx) |
|
1122 |
+{ |
|
1123 |
+ cli_ctx *cctx = (cli_ctx*)ctx->ctx; |
|
1124 |
+ return cctx->options; |
|
1125 |
+} |
|
1126 |
+ |
|
1127 |
+uint32_t cli_bcapi_engine_db_options(struct cli_bc_ctx *ctx) |
|
1128 |
+{ |
|
1129 |
+ cli_ctx *cctx = (cli_ctx*)ctx->ctx; |
|
1130 |
+ return cctx->engine->dboptions; |
|
1131 |
+} |
|
1132 |
+ |
|
1133 |
+int32_t cli_bcapi_extract_set_container(struct cli_bc_ctx *ctx, uint32_t ftype) |
|
1134 |
+{ |
|
1135 |
+ if (ftype > CL_TYPE_IGNORED) |
|
1136 |
+ return -1; |
|
1137 |
+ ctx->containertype = ftype; |
|
1138 |
+} |
|
1139 |
+ |
|
1140 |
+int32_t cli_bcapi_input_switch(struct cli_bc_ctx *ctx , int32_t extracted_file) |
|
1141 |
+{ |
|
1142 |
+ fmap_t *map; |
|
1143 |
+ if (ctx->extracted_file_input == extracted_file) |
|
1144 |
+ return 0; |
|
1145 |
+ if (!extracted_file) { |
|
1146 |
+ cli_dbgmsg("bytecode api: input switched back to main file\n"); |
|
1147 |
+ ctx->fmap = ctx->save_map; |
|
1148 |
+ ctx->extracted_file_input = 0; |
|
1149 |
+ return 0; |
|
1150 |
+ } |
|
1151 |
+ if (ctx->outfd < 0) |
|
1152 |
+ return -1; |
|
1153 |
+ map = fmap(ctx->outfd, 0, 0); |
|
1154 |
+ if (!map) { |
|
1155 |
+ cli_warnmsg("can't mmap() extracted temporary file %s\n", ctx->tempfile); |
|
1156 |
+ return -1; |
|
1157 |
+ } |
|
1158 |
+ ctx->save_map = ctx->fmap; |
|
1159 |
+ cli_bytecode_context_setfile(ctx, map); |
|
1160 |
+ ctx->extracted_file_input = 1; |
|
1161 |
+ cli_dbgmsg("bytecode api: input switched to extracted file\n"); |
|
1162 |
+ return 0; |
|
1163 |
+} |
... | ... |
@@ -62,6 +62,7 @@ enum FunctionalityLevels { |
62 | 62 |
|
63 | 63 |
#ifdef __CLAMBC__ |
64 | 64 |
|
65 |
+/* --------------- BEGIN GLOBALS -------------------------------------------- */ |
|
65 | 66 |
/** @brief Logical signature match counts |
66 | 67 |
* |
67 | 68 |
* This is a low-level variable, use the Macros in bytecode_local.h instead to |
... | ... |
@@ -82,7 +83,9 @@ extern const uint32_t __clambc_filesize[1]; |
82 | 82 |
|
83 | 83 |
/** Kind of the bytecode */ |
84 | 84 |
const uint16_t __clambc_kind; |
85 |
+/* ---------------- END GLOBALS --------------------------------------------- */ |
|
85 | 86 |
|
87 |
+/* ---------------- BEGIN 0.96 APIs (don't touch) --------------------------- */ |
|
86 | 88 |
/** Test api. |
87 | 89 |
@param a 0xf00dbeef |
88 | 90 |
@param b 0xbeeff00d |
... | ... |
@@ -413,5 +416,234 @@ int32_t jsnorm_process(int32_t id); |
413 | 413 |
* @param id ID of js normalizer to flush */ |
414 | 414 |
int32_t jsnorm_done(int32_t id); |
415 | 415 |
|
416 |
+/* ---------------- END 0.96 APIs (don't touch) --------------------------- */ |
|
417 |
+/* ---------------- BEGIN 0.96.1 APIs ------------------------------------- */ |
|
418 |
+ |
|
419 |
+/** --------------- math -----------------*/ |
|
420 |
+ |
|
421 |
+/** |
|
422 |
+ * Returns 2^26*log2(a/b) |
|
423 |
+ * @param a input |
|
424 |
+ * @param b input |
|
425 |
+ * @return 2^26*log2(a/b) |
|
426 |
+ */ |
|
427 |
+int32_t ilog2(uint32_t a, uint32_t b); |
|
428 |
+ |
|
429 |
+/** |
|
430 |
+ * Returns c*a^b. |
|
431 |
+ * @param a integer |
|
432 |
+ * @param b integer |
|
433 |
+ * @param c integer |
|
434 |
+ * @return c*pow(a,b) |
|
435 |
+ */ |
|
436 |
+int32_t ipow(int32_t a, int32_t b, int32_t c); |
|
437 |
+ |
|
438 |
+/** |
|
439 |
+ * Returns exp(a/b)*c |
|
440 |
+ * @param a integer |
|
441 |
+ * @param b integer |
|
442 |
+ * @param c integer |
|
443 |
+ * @return c*exp(a/b) |
|
444 |
+ */ |
|
445 |
+int32_t iexp(int32_t a, int32_t b, int32_t c); |
|
446 |
+ |
|
447 |
+/** |
|
448 |
+ * Returns c*sin(a/b). |
|
449 |
+ * @param a integer |
|
450 |
+ * @param b integer |
|
451 |
+ * @param c integer |
|
452 |
+ * @return c*sin(a/b) |
|
453 |
+ */ |
|
454 |
+int32_t isin(int32_t a, int32_t b, int32_t c); |
|
455 |
+ |
|
456 |
+/** |
|
457 |
+ * Returns c*cos(a/b). |
|
458 |
+ * @param a integer |
|
459 |
+ * @param b integer |
|
460 |
+ * @param c integer |
|
461 |
+ * @return c*sin(a/b) |
|
462 |
+ */ |
|
463 |
+int32_t icos(int32_t a, int32_t b, int32_t c); |
|
464 |
+ |
|
465 |
+/** --------------- string operations -----------------*/ |
|
466 |
+/** |
|
467 |
+ * Return position of match, -1 otherwise. |
|
468 |
+ * @param haystack buffer to search |
|
469 |
+ * @param haysize size of \p haystack |
|
470 |
+ * @param needle substring to search |
|
471 |
+ * @param needlesize size of needle |
|
472 |
+ * @return location of match, -1 otherwise |
|
473 |
+ */ |
|
474 |
+int32_t memstr(const uint8_t* haystack, int32_t haysize, |
|
475 |
+ const uint8_t* needle, int32_t needlesize); |
|
476 |
+ |
|
477 |
+/** |
|
478 |
+ * Returns hexadecimal characters \p hex1 and \p hex2 converted to 8-bit |
|
479 |
+ * number. |
|
480 |
+ * @param hex1 hexadecimal character |
|
481 |
+ * @param hex2 hexadecimal character |
|
482 |
+ * @return hex1 hex2 converted to 8-bit integer, -1 on error |
|
483 |
+ */ |
|
484 |
+int32_t hex2ui(uint32_t hex1, uint32_t hex2); |
|
485 |
+ |
|
486 |
+/** |
|
487 |
+ * Converts string to positive number. |
|
488 |
+ * @param str buffer |
|
489 |
+ * @param size size of \p str |
|
490 |
+ * @return >0 string converted to number if possible, -1 on error |
|
491 |
+ */ |
|
492 |
+int32_t atoi(const uint8_t* str, int32_t size); |
|
493 |
+ |
|
494 |
+/** |
|
495 |
+ * Prints a debug message with a trailing newline, |
|
496 |
+ * but preceded by 'LibClamAV debug'. |
|
497 |
+ * @param str the string |
|
498 |
+ * @param len length of \p str |
|
499 |
+ * @return 0 |
|
500 |
+ */ |
|
501 |
+uint32_t debug_print_str_start(const uint8_t *str, uint32_t len); |
|
502 |
+ |
|
503 |
+/** |
|
504 |
+ * Prints a debug message with a trailing newline, |
|
505 |
+ * and not preceded by 'LibClamAV debug'. |
|
506 |
+ * @param str the string |
|
507 |
+ * @param len length of \p str |
|
508 |
+ * @return 0 |
|
509 |
+ */ |
|
510 |
+uint32_t debug_print_str_nonl(const uint8_t *str, uint32_t len); |
|
511 |
+ |
|
512 |
+/** |
|
513 |
+ * Returns an approximation for the entropy of \p buffer. |
|
514 |
+ * @param buffer input buffer |
|
515 |
+ * @param size size of buffer |
|
516 |
+ * @return entropy estimation * 2^26 |
|
517 |
+ */ |
|
518 |
+uint32_t entropy_buffer(uint8_t* buffer, int32_t size); |
|
519 |
+ |
|
520 |
+/* ------------------ data structures -------------------- */ |
|
521 |
+/** |
|
522 |
+ * Creates a new map and returns its id. |
|
523 |
+ * @param keysize size of key |
|
524 |
+ * @param valuesize size of value, if 0 then value is allocated separately |
|
525 |
+ * @return ID of new map */ |
|
526 |
+int32_t map_new(int32_t keysize, int32_t valuesize); |
|
527 |
+ |
|
528 |
+/** |
|
529 |
+ * Inserts the specified key/value pair into the map. |
|
530 |
+ * @param id id of table |
|
531 |
+ * @param key key |
|
532 |
+ * @param ksize size of \p key |
|
533 |
+ * @return 0 - if key didn't exist before |
|
534 |
+ 1 - if key existed |
|
535 |
+ -1 - if ksize doesn't match keysize specified at table creation |
|
536 |
+ */ |
|
537 |
+int32_t map_addkey(const uint8_t *key, int32_t ksize, int32_t id); |
|
538 |
+ |
|
539 |
+/** |
|
540 |
+ * Sets the value for the last inserted key with map_addkey. |
|
541 |
+ * @param id id of table |
|
542 |
+ * @param value value |
|
543 |
+ * @param vsize size of \p value |
|
544 |
+ * @return 0 - if update was successful |
|
545 |
+ -1 - if there is no last key |
|
546 |
+ */ |
|
547 |
+int32_t map_setvalue(const uint8_t *value, int32_t vsize, int32_t id); |
|
548 |
+ |
|
549 |
+/** |
|
550 |
+ * Remove an element from the map. |
|
551 |
+ * @param id id of map |
|
552 |
+ * @param key key |
|
553 |
+ * @param ksize size of key |
|
554 |
+ * @return 0 on success, key was present |
|
555 |
+ 1 if key was not present |
|
556 |
+ -1 if ksize doesn't match keysize specified at table creation |
|
557 |
+ */ |
|
558 |
+int32_t map_remove(const uint8_t* key, int32_t ksize, int32_t id); |
|
559 |
+ |
|
560 |
+/** |
|
561 |
+ * Looks up key in map. |
|
562 |
+ * The map remember the last looked up key (so you can retrieve the |
|
563 |
+ * value). |
|
564 |
+ * |
|
565 |
+ * @param id id of map |
|
566 |
+ * @param key key |
|
567 |
+ * @param ksize size of key |
|
568 |
+ * @return 0 - if not found |
|
569 |
+ 1 - if found |
|
570 |
+ -1 - if ksize doesn't match the size specified at table creation |
|
571 |
+ */ |
|
572 |
+int32_t map_find(const uint8_t* key, int32_t ksize, int32_t id); |
|
573 |
+ |
|
574 |
+/** |
|
575 |
+ * Returns the size of value obtained during last map_find. |
|
576 |
+ * @param id id of map. |
|
577 |
+ * @return size of value |
|
578 |
+ */ |
|
579 |
+int32_t map_getvaluesize(int32_t id); |
|
580 |
+ |
|
581 |
+/** |
|
582 |
+ * Returns the value obtained during last map_find. |
|
583 |
+ * @param id id of map. |
|
584 |
+ * @param size size of value (obtained from map_getvaluesize) |
|
585 |
+ * @return value |
|
586 |
+ */ |
|
587 |
+uint8_t* map_getvalue(int32_t id, int32_t size); |
|
588 |
+ |
|
589 |
+/** |
|
590 |
+ * Deallocates the memory used by the specified map. |
|
591 |
+ * Trying to use the map after this will result in an error. |
|
592 |
+ * All maps are automatically deallocated when the bytecode finishes |
|
593 |
+ * execution. |
|
594 |
+ */ |
|
595 |
+int32_t map_done(int32_t id); |
|
596 |
+ |
|
597 |
+/** -------------- file operations --------------------- */ |
|
598 |
+/** Looks for the specified sequence of bytes in the current file, up to the |
|
599 |
+ * specified position. |
|
600 |
+ * @param[in] data the sequence of bytes to look for |
|
601 |
+ * @param len length of \p data, cannot be more than 1024 |
|
602 |
+ * @return offset in the current file if match is found, -1 otherwise */ |
|
603 |
+int32_t file_find_limit(const uint8_t *data, uint32_t len, int32_t maxpos); |
|
604 |
+ |
|
605 |
+/** ------------- engine query ------------------------ */ |
|
606 |
+/** |
|
607 |
+ * Returns the current engine (feature) functionality level. |
|
608 |
+ */ |
|
609 |
+uint32_t engine_functionality_level(void); |
|
610 |
+ |
|
611 |
+/** |
|
612 |
+ * Returns the current engine (dconf) functionality level. |
|
613 |
+ */ |
|
614 |
+uint32_t engine_dconf_level(void); |
|
615 |
+ |
|
616 |
+/** |
|
617 |
+ * Returns the current engine's scan options. |
|
618 |
+ */ |
|
619 |
+uint32_t engine_scan_options(void); |
|
620 |
+ |
|
621 |
+/** |
|
622 |
+ * Returns the current engine's db options. |
|
623 |
+ */ |
|
624 |
+uint32_t engine_db_options(void); |
|
625 |
+ |
|
626 |
+/* ---------------- scan control --------------------------- */ |
|
627 |
+/** |
|
628 |
+ * Sets the container type for the currently extracted file. |
|
629 |
+ * @param container container type (CL_TYPE_*) |
|
630 |
+ * @return current setting for container (CL_TYPE_ANY default) |
|
631 |
+ */ |
|
632 |
+int32_t extract_set_container(uint32_t container); |
|
633 |
+ |
|
634 |
+/** |
|
635 |
+ * Toggles the read/seek API to read from the currently extracted file, and |
|
636 |
+ * back. |
|
637 |
+ * @param extracted_file 1 - switch to reading from extracted file, |
|
638 |
+ 0 - switch back to original input |
|
639 |
+ * @return -1 on error (if no extracted file exists) |
|
640 |
+ 0 on success |
|
641 |
+ */ |
|
642 |
+int32_t input_switch(int32_t extracted_file); |
|
643 |
+ |
|
644 |
+/* ---------------- END 0.96.1 APIs ------------------------------------- */ |
|
416 | 645 |
#endif |
417 | 646 |
#endif |
... | ... |
@@ -78,6 +78,32 @@ int32_t cli_bcapi_bytecode_rt_error(struct cli_bc_ctx *ctx , int32_t); |
78 | 78 |
int32_t cli_bcapi_jsnorm_init(struct cli_bc_ctx *ctx , int32_t); |
79 | 79 |
int32_t cli_bcapi_jsnorm_process(struct cli_bc_ctx *ctx , int32_t); |
80 | 80 |
int32_t cli_bcapi_jsnorm_done(struct cli_bc_ctx *ctx , int32_t); |
81 |
+int32_t cli_bcapi_ilog2(struct cli_bc_ctx *ctx , uint32_t, uint32_t); |
|
82 |
+int32_t cli_bcapi_ipow(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
83 |
+int32_t cli_bcapi_iexp(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
84 |
+int32_t cli_bcapi_isin(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
85 |
+int32_t cli_bcapi_icos(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
86 |
+int32_t cli_bcapi_memstr(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, const uint8_t*, int32_t); |
|
87 |
+int32_t cli_bcapi_hex2ui(struct cli_bc_ctx *ctx , uint32_t, uint32_t); |
|
88 |
+int32_t cli_bcapi_atoi(struct cli_bc_ctx *ctx , const uint8_t*, int32_t); |
|
89 |
+uint32_t cli_bcapi_debug_print_str_start(struct cli_bc_ctx *ctx , const uint8_t*, uint32_t); |
|
90 |
+uint32_t cli_bcapi_debug_print_str_nonl(struct cli_bc_ctx *ctx , const uint8_t*, uint32_t); |
|
91 |
+uint32_t cli_bcapi_entropy_buffer(struct cli_bc_ctx *ctx , uint8_t*, int32_t); |
|
92 |
+int32_t cli_bcapi_map_new(struct cli_bc_ctx *ctx , int32_t, int32_t); |
|
93 |
+int32_t cli_bcapi_map_addkey(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
94 |
+int32_t cli_bcapi_map_setvalue(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
95 |
+int32_t cli_bcapi_map_remove(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
96 |
+int32_t cli_bcapi_map_find(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
97 |
+int32_t cli_bcapi_map_getvaluesize(struct cli_bc_ctx *ctx , int32_t); |
|
98 |
+uint8_t* cli_bcapi_map_getvalue(struct cli_bc_ctx *ctx , int32_t, int32_t); |
|
99 |
+int32_t cli_bcapi_map_done(struct cli_bc_ctx *ctx , int32_t); |
|
100 |
+int32_t cli_bcapi_file_find_limit(struct cli_bc_ctx *ctx , const uint8_t*, uint32_t, int32_t); |
|
101 |
+uint32_t cli_bcapi_engine_functionality_level(struct cli_bc_ctx *ctx ); |
|
102 |
+uint32_t cli_bcapi_engine_dconf_level(struct cli_bc_ctx *ctx ); |
|
103 |
+uint32_t cli_bcapi_engine_scan_options(struct cli_bc_ctx *ctx ); |
|
104 |
+uint32_t cli_bcapi_engine_db_options(struct cli_bc_ctx *ctx ); |
|
105 |
+int32_t cli_bcapi_extract_set_container(struct cli_bc_ctx *ctx , uint32_t); |
|
106 |
+int32_t cli_bcapi_input_switch(struct cli_bc_ctx *ctx , int32_t); |
|
81 | 107 |
|
82 | 108 |
const struct cli_apiglobal cli_globals[] = { |
83 | 109 |
/* Bytecode globals BEGIN */ |
... | ... |
@@ -103,22 +129,24 @@ static uint16_t cli_tmp5[]={32, 16, 16, 32, 32, 32, 16, 16}; |
103 | 103 |
static uint16_t cli_tmp6[]={32}; |
104 | 104 |
static uint16_t cli_tmp7[]={32}; |
105 | 105 |
static uint16_t cli_tmp8[]={32, 32}; |
106 |
-static uint16_t cli_tmp9[]={32, 32, 32, 32}; |
|
107 |
-static uint16_t cli_tmp10[]={32, 32, 32}; |
|
106 |
+static uint16_t cli_tmp9[]={32}; |
|
107 |
+static uint16_t cli_tmp10[]={32, 65, 32, 32}; |
|
108 | 108 |
static uint16_t cli_tmp11[]={65, 32, 32}; |
109 |
-static uint16_t cli_tmp12[]={32}; |
|
110 |
-static uint16_t cli_tmp13[]={32, 65, 32, 32, 32, 32}; |
|
111 |
-static uint16_t cli_tmp14[]={32, 84, 32}; |
|
112 |
-static uint16_t cli_tmp15[]={85}; |
|
113 |
-static uint16_t cli_tmp16[]={32, 32, 32, 32, 32, 32, 32, 32, 32}; |
|
114 |
-static uint16_t cli_tmp17[]={65, 32}; |
|
115 |
-static uint16_t cli_tmp18[]={32, 65, 32}; |
|
116 |
-static uint16_t cli_tmp19[]={32, 89, 32}; |
|
117 |
-static uint16_t cli_tmp20[]={90}; |
|
118 |
-static uint16_t cli_tmp21[]={16, 8, 8, 8, 92, 91}; |
|
119 |
-static uint16_t cli_tmp22[]={8}; |
|
120 |
-static uint16_t cli_tmp23[]={93}; |
|
109 |
+static uint16_t cli_tmp12[]={32, 32, 32}; |
|
110 |
+static uint16_t cli_tmp13[]={32, 65, 32}; |
|
111 |
+static uint16_t cli_tmp14[]={32, 65, 32, 65, 32}; |
|
112 |
+static uint16_t cli_tmp15[]={32, 32, 32, 32}; |
|
113 |
+static uint16_t cli_tmp16[]={32, 65, 32, 32, 32, 32}; |
|
114 |
+static uint16_t cli_tmp17[]={32, 87, 32}; |
|
115 |
+static uint16_t cli_tmp18[]={88}; |
|
116 |
+static uint16_t cli_tmp19[]={32, 32, 32, 32, 32, 32, 32, 32, 32}; |
|
117 |
+static uint16_t cli_tmp20[]={65, 32}; |
|
118 |
+static uint16_t cli_tmp21[]={32, 91, 32}; |
|
119 |
+static uint16_t cli_tmp22[]={92}; |
|
120 |
+static uint16_t cli_tmp23[]={16, 8, 8, 8, 94, 93}; |
|
121 | 121 |
static uint16_t cli_tmp24[]={8}; |
122 |
+static uint16_t cli_tmp25[]={95}; |
|
123 |
+static uint16_t cli_tmp26[]={8}; |
|
122 | 124 |
|
123 | 125 |
const struct cli_bc_type cli_apicall_types[]={ |
124 | 126 |
{DStructType, cli_tmp0, 13, 0, 0}, |
... | ... |
@@ -130,72 +158,100 @@ const struct cli_bc_type cli_apicall_types[]={ |
130 | 130 |
{DArrayType, cli_tmp6, 1, 0, 0}, |
131 | 131 |
{DArrayType, cli_tmp7, 64, 0, 0}, |
132 | 132 |
{DFunctionType, cli_tmp8, 2, 0, 0}, |
133 |
- {DFunctionType, cli_tmp9, 4, 0, 0}, |
|
134 |
- {DFunctionType, cli_tmp10, 3, 0, 0}, |
|
133 |
+ {DFunctionType, cli_tmp9, 1, 0, 0}, |
|
134 |
+ {DFunctionType, cli_tmp10, 4, 0, 0}, |
|
135 | 135 |
{DFunctionType, cli_tmp11, 3, 0, 0}, |
136 |
- {DFunctionType, cli_tmp12, 1, 0, 0}, |
|
137 |
- {DFunctionType, cli_tmp13, 6, 0, 0}, |
|
138 |
- {DFunctionType, cli_tmp14, 3, 0, 0}, |
|
139 |
- {DPointerType, cli_tmp15, 1, 0, 0}, |
|
140 |
- {DStructType, cli_tmp16, 9, 0, 0}, |
|
141 |
- {DFunctionType, cli_tmp17, 2, 0, 0}, |
|
142 |
- {DFunctionType, cli_tmp18, 3, 0, 0}, |
|
143 |
- {DFunctionType, cli_tmp19, 3, 0, 0}, |
|
144 |
- {DPointerType, cli_tmp20, 1, 0, 0}, |
|
145 |
- {DStructType, cli_tmp21, 6, 0, 0}, |
|
146 |
- {DArrayType, cli_tmp22, 29, 0, 0}, |
|
147 |
- {DArrayType, cli_tmp23, 3, 0, 0}, |
|
148 |
- {DArrayType, cli_tmp24, 10, 0, 0} |
|
136 |
+ {DFunctionType, cli_tmp12, 3, 0, 0}, |
|
137 |
+ {DFunctionType, cli_tmp13, 3, 0, 0}, |
|
138 |
+ {DFunctionType, cli_tmp14, 5, 0, 0}, |
|
139 |
+ {DFunctionType, cli_tmp15, 4, 0, 0}, |
|
140 |
+ {DFunctionType, cli_tmp16, 6, 0, 0}, |
|
141 |
+ {DFunctionType, cli_tmp17, 3, 0, 0}, |
|
142 |
+ {DPointerType, cli_tmp18, 1, 0, 0}, |
|
143 |
+ {DStructType, cli_tmp19, 9, 0, 0}, |
|
144 |
+ {DFunctionType, cli_tmp20, 2, 0, 0}, |
|
145 |
+ {DFunctionType, cli_tmp21, 3, 0, 0}, |
|
146 |
+ {DPointerType, cli_tmp22, 1, 0, 0}, |
|
147 |
+ {DStructType, cli_tmp23, 6, 0, 0}, |
|
148 |
+ {DArrayType, cli_tmp24, 29, 0, 0}, |
|
149 |
+ {DArrayType, cli_tmp25, 3, 0, 0}, |
|
150 |
+ {DArrayType, cli_tmp26, 10, 0, 0} |
|
149 | 151 |
}; |
150 | 152 |
|
151 | 153 |
const unsigned cli_apicall_maxtypes=sizeof(cli_apicall_types)/sizeof(cli_apicall_types[0]); |
152 | 154 |
const struct cli_apicall cli_apicalls[]={ |
153 | 155 |
/* Bytecode APIcalls BEGIN */ |
154 |
- {"test1", 10, 0, 0}, |
|
155 |
- {"read", 18, 0, 1}, |
|
156 |
- {"write", 18, 1, 1}, |
|
157 |
- {"seek", 10, 1, 0}, |
|
158 |
- {"setvirusname", 18, 2, 1}, |
|
159 |
- {"debug_print_str", 18, 3, 1}, |
|
156 |
+ {"test1", 12, 0, 0}, |
|
157 |
+ {"read", 13, 0, 1}, |
|
158 |
+ {"write", 13, 1, 1}, |
|
159 |
+ {"seek", 12, 1, 0}, |
|
160 |
+ {"setvirusname", 13, 2, 1}, |
|
161 |
+ {"debug_print_str", 13, 3, 1}, |
|
160 | 162 |
{"debug_print_uint", 8, 0, 2}, |
161 |
- {"disasm_x86", 19, 4, 1}, |
|
162 |
- {"trace_directory", 18, 5, 1}, |
|
163 |
- {"trace_scope", 18, 6, 1}, |
|
164 |
- {"trace_source", 18, 7, 1}, |
|
165 |
- {"trace_op", 18, 8, 1}, |
|
166 |
- {"trace_value", 18, 9, 1}, |
|
167 |
- {"trace_ptr", 18, 10, 1}, |
|
163 |
+ {"disasm_x86", 21, 4, 1}, |
|
164 |
+ {"trace_directory", 13, 5, 1}, |
|
165 |
+ {"trace_scope", 13, 6, 1}, |
|
166 |
+ {"trace_source", 13, 7, 1}, |
|
167 |
+ {"trace_op", 13, 8, 1}, |
|
168 |
+ {"trace_value", 13, 9, 1}, |
|
169 |
+ {"trace_ptr", 13, 10, 1}, |
|
168 | 170 |
{"pe_rawaddr", 8, 1, 2}, |
169 |
- {"file_find", 18, 11, 1}, |
|
171 |
+ {"file_find", 13, 11, 1}, |
|
170 | 172 |
{"file_byteat", 8, 2, 2}, |
171 |
- {"malloc", 17, 0, 3}, |
|
173 |
+ {"malloc", 20, 0, 3}, |
|
172 | 174 |
{"test2", 8, 3, 2}, |
173 |
- {"get_pe_section", 14, 12, 1}, |
|
174 |
- {"fill_buffer", 13, 0, 4}, |
|
175 |
+ {"get_pe_section", 17, 12, 1}, |
|
176 |
+ {"fill_buffer", 16, 0, 4}, |
|
175 | 177 |
{"extract_new", 8, 4, 2}, |
176 | 178 |
{"read_number", 8, 5, 2}, |
177 |
- {"hashset_new", 12, 0, 5}, |
|
178 |
- {"hashset_add", 10, 2, 0}, |
|
179 |
- {"hashset_remove", 10, 3, 0}, |
|
180 |
- {"hashset_contains", 10, 4, 0}, |
|
179 |
+ {"hashset_new", 9, 0, 5}, |
|
180 |
+ {"hashset_add", 12, 2, 0}, |
|
181 |
+ {"hashset_remove", 12, 3, 0}, |
|
182 |
+ {"hashset_contains", 12, 4, 0}, |
|
181 | 183 |
{"hashset_done", 8, 6, 2}, |
182 | 184 |
{"hashset_empty", 8, 7, 2}, |
183 | 185 |
{"buffer_pipe_new", 8, 8, 2}, |
184 | 186 |
{"buffer_pipe_new_fromfile", 8, 9, 2}, |
185 | 187 |
{"buffer_pipe_read_avail", 8, 10, 2}, |
186 | 188 |
{"buffer_pipe_read_get", 11, 0, 6}, |
187 |
- {"buffer_pipe_read_stopped", 10, 5, 0}, |
|
189 |
+ {"buffer_pipe_read_stopped", 12, 5, 0}, |
|
188 | 190 |
{"buffer_pipe_write_avail", 8, 11, 2}, |
189 | 191 |
{"buffer_pipe_write_get", 11, 1, 6}, |
190 |
- {"buffer_pipe_write_stopped", 10, 6, 0}, |
|
192 |
+ {"buffer_pipe_write_stopped", 12, 6, 0}, |
|
191 | 193 |
{"buffer_pipe_done", 8, 12, 2}, |
192 |
- {"inflate_init", 9, 0, 7}, |
|
194 |
+ {"inflate_init", 15, 0, 7}, |
|
193 | 195 |
{"inflate_process", 8, 13, 2}, |
194 | 196 |
{"inflate_done", 8, 14, 2}, |
195 | 197 |
{"bytecode_rt_error", 8, 15, 2}, |
196 | 198 |
{"jsnorm_init", 8, 16, 2}, |
197 | 199 |
{"jsnorm_process", 8, 17, 2}, |
198 |
- {"jsnorm_done", 8, 18, 2} |
|
200 |
+ {"jsnorm_done", 8, 18, 2}, |
|
201 |
+ {"ilog2", 12, 7, 0}, |
|
202 |
+ {"ipow", 15, 1, 7}, |
|
203 |
+ {"iexp", 15, 2, 7}, |
|
204 |
+ {"isin", 15, 3, 7}, |
|
205 |
+ {"icos", 15, 4, 7}, |
|
206 |
+ {"memstr", 14, 0, 8}, |
|
207 |
+ {"hex2ui", 12, 8, 0}, |
|
208 |
+ {"atoi", 13, 13, 1}, |
|
209 |
+ {"debug_print_str_start", 13, 14, 1}, |
|
210 |
+ {"debug_print_str_nonl", 13, 15, 1}, |
|
211 |
+ {"entropy_buffer", 13, 16, 1}, |
|
212 |
+ {"map_new", 12, 9, 0}, |
|
213 |
+ {"map_addkey", 10, 0, 9}, |
|
214 |
+ {"map_setvalue", 10, 1, 9}, |
|
215 |
+ {"map_remove", 10, 2, 9}, |
|
216 |
+ {"map_find", 10, 3, 9}, |
|
217 |
+ {"map_getvaluesize", 8, 19, 2}, |
|
218 |
+ {"map_getvalue", 11, 2, 6}, |
|
219 |
+ {"map_done", 8, 20, 2}, |
|
220 |
+ {"file_find_limit", 10, 4, 9}, |
|
221 |
+ {"engine_functionality_level", 9, 1, 5}, |
|
222 |
+ {"engine_dconf_level", 9, 2, 5}, |
|
223 |
+ {"engine_scan_options", 9, 3, 5}, |
|
224 |
+ {"engine_db_options", 9, 4, 5}, |
|
225 |
+ {"extract_set_container", 8, 21, 2}, |
|
226 |
+ {"input_switch", 8, 22, 2} |
|
199 | 227 |
/* Bytecode APIcalls END */ |
200 | 228 |
}; |
201 | 229 |
const cli_apicall_int2 cli_apicalls0[] = { |
... | ... |
@@ -205,7 +261,10 @@ const cli_apicall_int2 cli_apicalls0[] = { |
205 | 205 |
(cli_apicall_int2)cli_bcapi_hashset_remove, |
206 | 206 |
(cli_apicall_int2)cli_bcapi_hashset_contains, |
207 | 207 |
(cli_apicall_int2)cli_bcapi_buffer_pipe_read_stopped, |
208 |
- (cli_apicall_int2)cli_bcapi_buffer_pipe_write_stopped |
|
208 |
+ (cli_apicall_int2)cli_bcapi_buffer_pipe_write_stopped, |
|
209 |
+ (cli_apicall_int2)cli_bcapi_ilog2, |
|
210 |
+ (cli_apicall_int2)cli_bcapi_hex2ui, |
|
211 |
+ (cli_apicall_int2)cli_bcapi_map_new |
|
209 | 212 |
}; |
210 | 213 |
const cli_apicall_pointer cli_apicalls1[] = { |
211 | 214 |
(cli_apicall_pointer)cli_bcapi_read, |
... | ... |
@@ -220,7 +279,11 @@ const cli_apicall_pointer cli_apicalls1[] = { |
220 | 220 |
(cli_apicall_pointer)cli_bcapi_trace_value, |
221 | 221 |
(cli_apicall_pointer)cli_bcapi_trace_ptr, |
222 | 222 |
(cli_apicall_pointer)cli_bcapi_file_find, |
223 |
- (cli_apicall_pointer)cli_bcapi_get_pe_section |
|
223 |
+ (cli_apicall_pointer)cli_bcapi_get_pe_section, |
|
224 |
+ (cli_apicall_pointer)cli_bcapi_atoi, |
|
225 |
+ (cli_apicall_pointer)cli_bcapi_debug_print_str_start, |
|
226 |
+ (cli_apicall_pointer)cli_bcapi_debug_print_str_nonl, |
|
227 |
+ (cli_apicall_pointer)cli_bcapi_entropy_buffer |
|
224 | 228 |
}; |
225 | 229 |
const cli_apicall_int1 cli_apicalls2[] = { |
226 | 230 |
(cli_apicall_int1)cli_bcapi_debug_print_uint, |
... | ... |
@@ -241,7 +304,11 @@ const cli_apicall_int1 cli_apicalls2[] = { |
241 | 241 |
(cli_apicall_int1)cli_bcapi_bytecode_rt_error, |
242 | 242 |
(cli_apicall_int1)cli_bcapi_jsnorm_init, |
243 | 243 |
(cli_apicall_int1)cli_bcapi_jsnorm_process, |
244 |
- (cli_apicall_int1)cli_bcapi_jsnorm_done |
|
244 |
+ (cli_apicall_int1)cli_bcapi_jsnorm_done, |
|
245 |
+ (cli_apicall_int1)cli_bcapi_map_getvaluesize, |
|
246 |
+ (cli_apicall_int1)cli_bcapi_map_done, |
|
247 |
+ (cli_apicall_int1)cli_bcapi_extract_set_container, |
|
248 |
+ (cli_apicall_int1)cli_bcapi_input_switch |
|
245 | 249 |
}; |
246 | 250 |
const cli_apicall_malloclike cli_apicalls3[] = { |
247 | 251 |
(cli_apicall_malloclike)cli_bcapi_malloc |
... | ... |
@@ -250,13 +317,32 @@ const cli_apicall_ptrbuffdata cli_apicalls4[] = { |
250 | 250 |
(cli_apicall_ptrbuffdata)cli_bcapi_fill_buffer |
251 | 251 |
}; |
252 | 252 |
const cli_apicall_allocobj cli_apicalls5[] = { |
253 |
- (cli_apicall_allocobj)cli_bcapi_hashset_new |
|
253 |
+ (cli_apicall_allocobj)cli_bcapi_hashset_new, |
|
254 |
+ (cli_apicall_allocobj)cli_bcapi_engine_functionality_level, |
|
255 |
+ (cli_apicall_allocobj)cli_bcapi_engine_dconf_level, |
|
256 |
+ (cli_apicall_allocobj)cli_bcapi_engine_scan_options, |
|
257 |
+ (cli_apicall_allocobj)cli_bcapi_engine_db_options |
|
254 | 258 |
}; |
255 | 259 |
const cli_apicall_bufget cli_apicalls6[] = { |
256 | 260 |
(cli_apicall_bufget)cli_bcapi_buffer_pipe_read_get, |
257 |
- (cli_apicall_bufget)cli_bcapi_buffer_pipe_write_get |
|
261 |
+ (cli_apicall_bufget)cli_bcapi_buffer_pipe_write_get, |
|
262 |
+ (cli_apicall_bufget)cli_bcapi_map_getvalue |
|
258 | 263 |
}; |
259 | 264 |
const cli_apicall_int3 cli_apicalls7[] = { |
260 |
- (cli_apicall_int3)cli_bcapi_inflate_init |
|
265 |
+ (cli_apicall_int3)cli_bcapi_inflate_init, |
|
266 |
+ (cli_apicall_int3)cli_bcapi_ipow, |
|
267 |
+ (cli_apicall_int3)cli_bcapi_iexp, |
|
268 |
+ (cli_apicall_int3)cli_bcapi_isin, |
|
269 |
+ (cli_apicall_int3)cli_bcapi_icos |
|
270 |
+}; |
|
271 |
+const cli_apicall_2bufs cli_apicalls8[] = { |
|
272 |
+ (cli_apicall_2bufs)cli_bcapi_memstr |
|
273 |
+}; |
|
274 |
+const cli_apicall_ptrbufid cli_apicalls9[] = { |
|
275 |
+ (cli_apicall_ptrbufid)cli_bcapi_map_addkey, |
|
276 |
+ (cli_apicall_ptrbufid)cli_bcapi_map_setvalue, |
|
277 |
+ (cli_apicall_ptrbufid)cli_bcapi_map_remove, |
|
278 |
+ (cli_apicall_ptrbufid)cli_bcapi_map_find, |
|
279 |
+ (cli_apicall_ptrbufid)cli_bcapi_file_find_limit |
|
261 | 280 |
}; |
262 | 281 |
const unsigned cli_apicall_maxapi = sizeof(cli_apicalls)/sizeof(cli_apicalls[0]); |
... | ... |
@@ -75,5 +75,31 @@ int32_t cli_bcapi_bytecode_rt_error(struct cli_bc_ctx *ctx , int32_t); |
75 | 75 |
int32_t cli_bcapi_jsnorm_init(struct cli_bc_ctx *ctx , int32_t); |
76 | 76 |
int32_t cli_bcapi_jsnorm_process(struct cli_bc_ctx *ctx , int32_t); |
77 | 77 |
int32_t cli_bcapi_jsnorm_done(struct cli_bc_ctx *ctx , int32_t); |
78 |
+int32_t cli_bcapi_ilog2(struct cli_bc_ctx *ctx , uint32_t, uint32_t); |
|
79 |
+int32_t cli_bcapi_ipow(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
80 |
+int32_t cli_bcapi_iexp(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
81 |
+int32_t cli_bcapi_isin(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
82 |
+int32_t cli_bcapi_icos(struct cli_bc_ctx *ctx , int32_t, int32_t, int32_t); |
|
83 |
+int32_t cli_bcapi_memstr(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, const uint8_t*, int32_t); |
|
84 |
+int32_t cli_bcapi_hex2ui(struct cli_bc_ctx *ctx , uint32_t, uint32_t); |
|
85 |
+int32_t cli_bcapi_atoi(struct cli_bc_ctx *ctx , const uint8_t*, int32_t); |
|
86 |
+uint32_t cli_bcapi_debug_print_str_start(struct cli_bc_ctx *ctx , const uint8_t*, uint32_t); |
|
87 |
+uint32_t cli_bcapi_debug_print_str_nonl(struct cli_bc_ctx *ctx , const uint8_t*, uint32_t); |
|
88 |
+uint32_t cli_bcapi_entropy_buffer(struct cli_bc_ctx *ctx , uint8_t*, int32_t); |
|
89 |
+int32_t cli_bcapi_map_new(struct cli_bc_ctx *ctx , int32_t, int32_t); |
|
90 |
+int32_t cli_bcapi_map_addkey(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
91 |
+int32_t cli_bcapi_map_setvalue(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
92 |
+int32_t cli_bcapi_map_remove(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
93 |
+int32_t cli_bcapi_map_find(struct cli_bc_ctx *ctx , const uint8_t*, int32_t, int32_t); |
|
94 |
+int32_t cli_bcapi_map_getvaluesize(struct cli_bc_ctx *ctx , int32_t); |
|
95 |
+uint8_t* cli_bcapi_map_getvalue(struct cli_bc_ctx *ctx , int32_t, int32_t); |
|
96 |
+int32_t cli_bcapi_map_done(struct cli_bc_ctx *ctx , int32_t); |
|
97 |
+int32_t cli_bcapi_file_find_limit(struct cli_bc_ctx *ctx , const uint8_t*, uint32_t, int32_t); |
|
98 |
+uint32_t cli_bcapi_engine_functionality_level(struct cli_bc_ctx *ctx ); |
|
99 |
+uint32_t cli_bcapi_engine_dconf_level(struct cli_bc_ctx *ctx ); |
|
100 |
+uint32_t cli_bcapi_engine_scan_options(struct cli_bc_ctx *ctx ); |
|
101 |
+uint32_t cli_bcapi_engine_db_options(struct cli_bc_ctx *ctx ); |
|
102 |
+int32_t cli_bcapi_extract_set_container(struct cli_bc_ctx *ctx , uint32_t); |
|
103 |
+int32_t cli_bcapi_input_switch(struct cli_bc_ctx *ctx , int32_t); |
|
78 | 104 |
|
79 | 105 |
#endif |
... | ... |
@@ -152,6 +152,7 @@ struct cli_bc_ctx { |
152 | 152 |
uint32_t file_size; |
153 | 153 |
off_t off; |
154 | 154 |
fmap_t *fmap; |
155 |
+ fmap_t *save_map; |
|
155 | 156 |
const char *virname; |
156 | 157 |
struct cli_bc_hooks hooks; |
157 | 158 |
const struct cli_exe_section *sections; |
... | ... |
@@ -183,6 +184,10 @@ struct cli_bc_ctx { |
183 | 183 |
unsigned njsnorms; |
184 | 184 |
char *jsnormdir; |
185 | 185 |
unsigned jsnormwritten; |
186 |
+ struct cli_map *maps; |
|
187 |
+ unsigned nmaps; |
|
188 |
+ unsigned containertype; |
|
189 |
+ unsigned extracted_file_input; |
|
186 | 190 |
}; |
187 | 191 |
struct cli_all_bc; |
188 | 192 |
int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct cli_bc_func *func, const struct cli_bc_inst *inst); |
... | ... |
@@ -1757,9 +1757,19 @@ int cli_bytecode_prepare_jit(struct cli_all_bc *bcs) |
1757 | 1757 |
case 7: |
1758 | 1758 |
dest = (void*)(intptr_t)cli_apicalls7[api->idx]; |
1759 | 1759 |
break; |
1760 |
+ case 8: |
|
1761 |
+ dest = (void*)(intptr_t)cli_apicalls8[api->idx]; |
|
1762 |
+ break; |
|
1763 |
+ case 9: |
|
1764 |
+ dest = (void*)(intptr_t)cli_apicalls9[api->idx]; |
|
1765 |
+ break; |
|
1760 | 1766 |
default: |
1761 | 1767 |
llvm_unreachable("invalid api type"); |
1762 | 1768 |
} |
1769 |
+ if (!dest) { |
|
1770 |
+ std::string reason((Twine("No mapping for builtin api ")+api->name).str()); |
|
1771 |
+ llvm_error_handler(0, reason); |
|
1772 |
+ } |
|
1763 | 1773 |
EE->addGlobalMapping(F, dest); |
1764 | 1774 |
EE->getPointerToFunction(F); |
1765 | 1775 |
apiFuncs[i] = F; |
... | ... |
@@ -348,6 +348,14 @@ const struct cli_element* cli_hashtab_insert(struct cli_hashtable *s, const char |
348 | 348 |
return NULL; |
349 | 349 |
} |
350 | 350 |
|
351 |
+void cli_hashtab_delete(struct cli_hashtable *s,const char* key,const size_t len) |
|
352 |
+{ |
|
353 |
+ struct cli_element *el = cli_hashtab_find(s, key, len); |
|
354 |
+ if (!el) |
|
355 |
+ return; |
|
356 |
+ el->key = DELETED_KEY; |
|
357 |
+} |
|
358 |
+ |
|
351 | 359 |
void cli_hashtab_clear(struct cli_hashtable *s) |
352 | 360 |
{ |
353 | 361 |
size_t i; |
... | ... |
@@ -579,3 +587,136 @@ int cli_hashset_contains_maybe_noalloc(const struct cli_hashset *hs, const uint3 |
579 | 579 |
return 0; |
580 | 580 |
return cli_hashset_contains(hs, key); |
581 | 581 |
} |
582 |
+ |
|
583 |
+int cli_map_init(struct cli_map *m, int32_t keysize, int32_t valuesize, |
|
584 |
+ int32_t capacity) |
|
585 |
+{ |
|
586 |
+ if (keysize <= 0 || valuesize < 0 || capacity <= 0) |
|
587 |
+ return -CL_EARG; |
|
588 |
+ memset(m, 0, sizeof(*m)); |
|
589 |
+ cli_hashtab_init(&m->htab, 16); |
|
590 |
+ m->keysize = keysize; |
|
591 |
+ m->valuesize = valuesize; |
|
592 |
+ m->last_insert = -1; |
|
593 |
+ m->last_find = -1; |
|
594 |
+ return 0; |
|
595 |
+} |
|
596 |
+ |
|
597 |
+int cli_map_addkey(struct cli_map *m, const void *key, int32_t keysize) |
|
598 |
+{ |
|
599 |
+ unsigned n; |
|
600 |
+ struct cli_element *el; |
|
601 |
+ if (m->keysize != keysize) |
|
602 |
+ return -CL_EARG; |
|
603 |
+ el = cli_hashtab_find(&m->htab, key, keysize); |
|
604 |
+ if (el) { |
|
605 |
+ m->last_insert = el->data; |
|
606 |
+ return 0; |
|
607 |
+ } |
|
608 |
+ n = m->nvalues + 1; |
|
609 |
+ if (m->valuesize) { |
|
610 |
+ void *v; |
|
611 |
+ v = cli_realloc(m->u.sized_values, n*m->valuesize); |
|
612 |
+ if (!v) |
|
613 |
+ return -CL_EMEM; |
|
614 |
+ m->u.sized_values = v; |
|
615 |
+ memset((char*)m->u.sized_values + (n-1)*m->valuesize, 0, m->valuesize); |
|
616 |
+ } else { |
|
617 |
+ struct cli_map_value *v; |
|
618 |
+ v = cli_realloc(m->u.unsized_values, n*sizeof(*m->u.unsized_values)); |
|
619 |
+ if (!v) |
|
620 |
+ return -CL_EMEM; |
|
621 |
+ m->u.unsized_values = v; |
|
622 |
+ memset(&m->u.unsized_values[n-1], 0, sizeof(*m->u.unsized_values)); |
|
623 |
+ } |
|
624 |
+ m->nvalues = n; |
|
625 |
+ if (!cli_hashtab_insert(&m->htab, key, keysize, n-1)) |
|
626 |
+ return -CL_EMEM; |
|
627 |
+ m->last_insert = n-1; |
|
628 |
+ return 1; |
|
629 |
+} |
|
630 |
+ |
|
631 |
+int cli_map_removekey(struct cli_map *m, const void *key, int32_t keysize) |
|
632 |
+{ |
|
633 |
+ struct cli_element *el; |
|
634 |
+ if (m->keysize != keysize) |
|
635 |
+ return -CL_EARG; |
|
636 |
+ el = cli_hashtab_find(&m->htab, key, keysize); |
|
637 |
+ if (!el) |
|
638 |
+ return 0; |
|
639 |
+ if (el->data >= m->nvalues || el->data < 0) |
|
640 |
+ return -CL_EARG; |
|
641 |
+ if (!m->valuesize) { |
|
642 |
+ struct cli_map_value *v = &m->u.unsized_values[el->data]; |
|
643 |
+ free(v->value); |
|
644 |
+ v->value = NULL; |
|
645 |
+ v->valuesize = 0; |
|
646 |
+ } else { |
|
647 |
+ char *v = (char*)m->u.sized_values + el->data * m->valuesize; |
|
648 |
+ memset(v, 0, m->valuesize); |
|
649 |
+ } |
|
650 |
+ cli_hashtab_delete(&m->htab, key, keysize); |
|
651 |
+ return 1; |
|
652 |
+} |
|
653 |
+ |
|
654 |
+int cli_map_setvalue(struct cli_map *m, const void* value, int32_t valuesize) |
|
655 |
+{ |
|
656 |
+ if ((m->valuesize && m->valuesize != valuesize) |
|
657 |
+ || m->last_insert >= m->nvalues || m->last_insert < 0) |
|
658 |
+ return -CL_EARG; |
|
659 |
+ if (m->valuesize) { |
|
660 |
+ memcpy((char*)m->u.sized_values + m->last_insert * m->valuesize, |
|
661 |
+ value, valuesize); |
|
662 |
+ } else { |
|
663 |
+ struct cli_map_value *v = &m->u.unsized_values[m->last_insert]; |
|
664 |
+ if (v->value) |
|
665 |
+ free(v->value); |
|
666 |
+ v->value = cli_malloc(valuesize); |
|
667 |
+ if (!v->value) |
|
668 |
+ return -CL_EMEM; |
|
669 |
+ memcpy(v->value, value, valuesize); |
|
670 |
+ v->valuesize = valuesize; |
|
671 |
+ } |
|
672 |
+ return 0; |
|
673 |
+} |
|
674 |
+ |
|
675 |
+int cli_map_find(struct cli_map *m, const void *key, int32_t keysize) |
|
676 |
+{ |
|
677 |
+ struct cli_element *el; |
|
678 |
+ if (m->keysize != keysize) |
|
679 |
+ return -CL_EARG; |
|
680 |
+ el = cli_hashtab_find(&m->htab, key, keysize); |
|
681 |
+ if (!el) |
|
682 |
+ return 0; |
|
683 |
+ m->last_find = el->data; |
|
684 |
+ return 1; |
|
685 |
+} |
|
686 |
+ |
|
687 |
+int cli_map_getvalue_size(struct cli_map *m) |
|
688 |
+{ |
|
689 |
+ if (m->valuesize) |
|
690 |
+ return m->valuesize; |
|
691 |
+ if (m->last_find < 0 || m->last_find >= m->nvalues) |
|
692 |
+ return -CL_EARG; |
|
693 |
+ return m->u.unsized_values[m->last_find].valuesize; |
|
694 |
+} |
|
695 |
+ |
|
696 |
+void* cli_map_getvalue(struct cli_map *m) |
|
697 |
+{ |
|
698 |
+ if (m->last_find < 0 || m->last_find >= m->nvalues) |
|
699 |
+ return NULL; |
|
700 |
+ if (m->valuesize) |
|
701 |
+ return (char*)m->u.sized_values + m->last_find*m->valuesize; |
|
702 |
+ return &m->u.unsized_values[m->valuesize]; |
|
703 |
+} |
|
704 |
+ |
|
705 |
+void cli_map_delete(struct cli_map *m) |
|
706 |
+{ |
|
707 |
+ cli_hashtab_free(&m->htab); |
|
708 |
+ if (!m->valuesize) { |
|
709 |
+ unsigned i; |
|
710 |
+ for (i=0;i<m->nvalues;i++) |
|
711 |
+ free(m->u.unsized_values[i].value); |
|
712 |
+ } |
|
713 |
+ memset(m, 0, sizeof(*m)); |
|
714 |
+} |
... | ... |
@@ -75,8 +75,6 @@ struct cli_hashtable { |
75 | 75 |
STRUCT_PROFILE |
76 | 76 |
}; |
77 | 77 |
|
78 |
- |
|
79 |
- |
|
80 | 78 |
int cli_hashtab_generate_c(const struct cli_hashtable *s,const char* name); |
81 | 79 |
struct cli_element* cli_hashtab_find(const struct cli_hashtable *s, const char* key, const size_t len); |
82 | 80 |
int cli_hashtab_init(struct cli_hashtable *s,size_t capacity); |
... | ... |
@@ -87,6 +85,34 @@ void cli_hashtab_free(struct cli_hashtable *s); |
87 | 87 |
int cli_hashtab_load(FILE* in, struct cli_hashtable *s); |
88 | 88 |
int cli_hashtab_store(const struct cli_hashtable *s,FILE* out); |
89 | 89 |
|
90 |
+/* a hashtable that stores the values too */ |
|
91 |
+struct cli_map_value { |
|
92 |
+ void *value; |
|
93 |
+ int32_t valuesize; |
|
94 |
+}; |
|
95 |
+ |
|
96 |
+struct cli_map { |
|
97 |
+ struct cli_hashtable htab; |
|
98 |
+ union { |
|
99 |
+ struct cli_map_value *unsized_values; |
|
100 |
+ void *sized_values; |
|
101 |
+ } u; |
|
102 |
+ uint32_t nvalues; |
|
103 |
+ int32_t keysize; |
|
104 |
+ int32_t valuesize; |
|
105 |
+ int32_t last_insert; |
|
106 |
+ int32_t last_find; |
|
107 |
+}; |
|
108 |
+int cli_map_init(struct cli_map *m, int32_t keysize, int32_t valuesize, |
|
109 |
+ int32_t capacity); |
|
110 |
+int cli_map_addkey(struct cli_map *m, const void *key, int32_t keysize); |
|
111 |
+int cli_map_removekey(struct cli_map *m, const void *key, int32_t keysize); |
|
112 |
+int cli_map_setvalue(struct cli_map *m, const void* value, int32_t valuesize); |
|
113 |
+int cli_map_find(struct cli_map *m, const void *key, int32_t keysize); |
|
114 |
+int cli_map_getvalue_size(struct cli_map *m); |
|
115 |
+void* cli_map_getvalue(struct cli_map *m); |
|
116 |
+void cli_map_delete(struct cli_map *m); |
|
117 |
+ |
|
90 | 118 |
/* A set of unique keys. */ |
91 | 119 |
struct cli_hashset { |
92 | 120 |
uint32_t* keys; |
... | ... |
@@ -49,6 +49,8 @@ typedef int32_t (*cli_apicall_ptrbuffdata)(struct cli_bc_ctx *, void*, uint32_t, |
49 | 49 |
typedef int32_t (*cli_apicall_allocobj)(struct cli_bc_ctx *); |
50 | 50 |
typedef void* (*cli_apicall_bufget)(struct cli_bc_ctx *, int32_t, uint32_t); |
51 | 51 |
typedef int32_t (*cli_apicall_int3)(struct cli_bc_ctx *, int32_t, int32_t, int32_t); |
52 |
+typedef int32_t (*cli_apicall_2bufs)(struct cli_bc_ctx *, void*, int32_t, void*, int32_t); |
|
53 |
+typedef int32_t (*cli_apicall_ptrbufid)(struct cli_bc_ctx *, void*, int32_t, int32_t); |
|
52 | 54 |
|
53 | 55 |
struct cli_apicall { |
54 | 56 |
const char *name; |
... | ... |
@@ -81,6 +83,8 @@ extern const cli_apicall_ptrbuffdata cli_apicalls4[]; |
81 | 81 |
extern const cli_apicall_allocobj cli_apicalls5[]; |
82 | 82 |
extern const cli_apicall_bufget cli_apicalls6[]; |
83 | 83 |
extern const cli_apicall_int3 cli_apicalls7[]; |
84 |
+extern const cli_apicall_2bufs cli_apicalls8[]; |
|
85 |
+extern const cli_apicall_ptrbufid cli_apicalls9[]; |
|
84 | 86 |
extern const unsigned cli_apicall_maxapi; |
85 | 87 |
extern const unsigned cli_apicall_maxglobal; |
86 | 88 |
|
... | ... |
@@ -1,7 +1,7 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``agafp`clamcoincidencejb:82 |
|
1 |
+ClamBCafhd`bhimkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``amafp`clamcoincidencejb:82 |
|
2 | 2 |
|
3 |
-Tedaaa`aacb`bb`bb`b |
|
4 |
-Eaaaaaabfd|afdgefcgdgac`` |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagahaacb`bb`bb`b |
|
4 |
+Eaaaaaabld|afdgefcgdgac`` |
|
5 | 5 |
G`aa`@` |
6 | 6 |
A`b`bLacb`b`aa`b`b`Fadaa |
7 | 7 |
Bb`b`abbaaHonnkm``odHm``oonnkdaaaaeab`b`Hhgfedcbadb`baboaaaDm``odDmjnmdTcab`babE |
... | ... |
@@ -21,4 +21,4 @@ Sifnfdg`befnfdgbgig`gofifnfdghbibSkgSbgefdgegbgnf`bdgefcgdgachb`chgff`c`cdfbfefe |
21 | 21 |
mgSSifnfdg`bffofofachbegifnfdghcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSifnfdg`bffofofbchbegifnfdgacfcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkc |
22 | 22 |
mgSSifnfdg`bffofofcchbegifnfdgccbcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccic`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSifnfdg`bffofofdchbegifnfdgfcdcoedg`bafib |
23 | 23 |
kgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccicdc`cecacfcbcgccc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSifnfdg`bffofofechbegifnfdghcoedg`baflb`begifnfdgacfcoedg`bbfib |
24 |
-kgSbgefdgegbgnf`bhbaf`bmcmc`b`chgbchc`bfbfb`bbf`bmcmc`b`chgacbcccdcib`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSSS |
|
25 | 24 |
\ No newline at end of file |
25 |
+kgSbgefdgegbgnf`bhbaf`bmcmc`b`chgbchc`bfbfb`bbf`bmcmc`b`chgacbcccdcib`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSS |
... | ... |
@@ -1,7 +1,7 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``ahafp`clamcoincidencejb:66 |
|
1 |
+ClamBCafhd`bhimkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``anafp`clamcoincidencejb:66 |
|
2 | 2 |
|
3 |
-Tedaaa`aabb`bb`baacb`bb`bb`b |
|
4 |
-Ebcaabbcabfd|afdgefcgdgbc``aabgd|afdgefcgdgac`` |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagahaabb`bb`baacb`bb`bb`b |
|
4 |
+Ebcaabbcabld|afdgefcgdgbc``aabmd|afdgefcgdgac`` |
|
5 | 5 |
G`aa`@` |
6 | 6 |
A`b`bLaeb`b`aa`b`b`aa`b`b`Fahac |
7 | 7 |
Bb`b`abbaaHonnkm``odHm``oonnkdaaaaeab`b`HhgfedcbadTaaaaaaab |
... | ... |
@@ -24,4 +24,4 @@ ifff`bhbdgefcgdgbchb`chgff`c`cdfib`babmc`b`chgdf`c`cffibSbgefdgegbgnf`b`chgdfefa |
24 | 24 |
mgSSifnfdg`bffofofachbegifnfdghcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSifnfdg`bffofofbchbegifnfdgacfcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkc |
25 | 25 |
mgSSifnfdg`bffofofcchbegifnfdgccbcoedg`bafibSkgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccic`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSifnfdg`bffofofdchbegifnfdgfcdcoedg`bafib |
26 | 26 |
kgSbgefdgegbgnf`baf`bmcmc`b`chgacgcbchcccicdc`cecacfcbcgccc`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSifnfdg`bffofofechbegifnfdghcoedg`baflb`begifnfdgacfcoedg`bbfib |
27 |
-kgSbgefdgegbgnf`bhbaf`bmcmc`b`chgbchc`bfbfb`bbf`bmcmc`b`chgacbcccdcib`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSSS |
|
28 | 27 |
\ No newline at end of file |
28 |
+kgSbgefdgegbgnf`bhbaf`bmcmc`b`chgbchc`bfbfb`bbf`bmcmc`b`chgacbcccdcib`boc`b`chgff`c`cdf`bjc`b`chgdfefafdfkcSmgSSS |
... | ... |
@@ -1,229 +1,43 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``afbbep`clamcoincidencejb:418 |
|
1 |
+ClamBCafhd`bhimkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``albbep`clamcoincidencejb:418 |
|
2 | 2 |
|
3 |
-Tedaaa` |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagah |
|
4 | 4 |
E`` |
5 | 5 |
G`aa`@` |
6 |
-A`b`bLbabb`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`Fbbbaa |
|
7 |
-Bb`b``b`abb`baa`b`anb`bab`b`agb`bac`b`b`ab`bad`b`ajb`bae`b`aib`baf`b`amb`bag`b`afb`bah`b`adb`bai`b`acb`baj`b`ahb`bak`b`baab`bal`b`alb`bam`b`bbab`ban`b`aob`bao`b`aeb`bb`a`b`akb`bbaaa`aa`b`bbbaa`baaabb`bbcaa`bbaacb`bbdaa`bcaadb`bbeaa`bdaaeb`bbfaa`beaafb`bbgaa`bfaagb`bbhaa`bgaahb`bbiaa`bhaaib`bbjaa`biaajb`bbkaa`bjaakb`bblaa`bkaalb`bbmaa`blaamb`bbnaa`bmaanb`bboaa`bnaaob`bb`ba`boab`aTcab`bb`bE |
|
8 |
-A`b`bLb`cah`aa`b`b`ah`aa`b`b`ah`aa`b`b`ah`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`Fbaebab |
|
9 |
-Bah``bbb`bAaaAaaaaaaeaah`AbaTaaaaabaa |
|
10 |
-Bb`bab`babca@dTcab`bab |
|
11 |
-Bahac`bbb`bAaaBooaaaadeaahac@aTaaadadac |
|
12 |
-Bb`bae`babca@dTcab`bae |
|
13 |
-Bahaf`bbb`bBooaBooaaaageaahafBnoaTaaagafae |
|
14 |
-Bb`bah`babca@dTcab`bah |
|
15 |
-Bahai`bbb`bBooaAaaaaajeaahai@aTaaajahag |
|
16 |
-Bb`bak`babca@dTcab`bak |
|
17 |
-Bb`aal`bbbmaAabAabaaameab`aalAbbTaaamajai |
|
18 |
-Bb`ban`babca@dTcab`ban |
|
19 |
-Bb`aao`bbbmaAabDoooobaab`aeab`aao@bTaab`aalak |
|
20 |
-Bb`bbaa`babca@dTcab`bbaa |
|
21 |
-Bb`abba`bbbmaDoooobDoooobaabcaeab`abbaDnooobTaabcaanam |
|
22 |
-Bb`bbda`babca@dTcab`bbda |
|
23 |
-Bb`abea`bbbmaDoooobAabaabfaeab`abea@bTaabfab`aao |
|
24 |
-Bb`bbga`babca@dTcab`bbga |
|
25 |
-Bb`bbha`bbbnaAadAadaabiaeab`bbhaAbdTaabiabbabaa |
|
26 |
-Bb`bbja`babca@dTcab`bbja |
|
27 |
-Bb`bbka`bbbnaAadHoooooooodaablaeab`bbka@dTaablabdabca |
|
28 |
-Bb`bbma`babca@dTcab`bbma |
|
29 |
-Bb`bbna`bbbnaHoooooooodHoooooooodaaboaeab`bbnaHnooooooodTaaboabfabea |
|
30 |
-Bb`bb`b`babca@dTcab`bb`b |
|
31 |
-Bb`bbab`bbbnaHoooooooodAadaabbbeab`bbab@dTaabbbbhabga |
|
32 |
-Bb`bbcb`babca@dTcab`bbcb |
|
33 |
-Bb`dbdb`bbboaAahAahaabebeab`dbdbAbhTaabebbjabia |
|
34 |
-Bb`bbfb`babca@dTcab`bbfb |
|
35 |
-Bb`dbgb`bbboaAahPoooooooooooooooohaabhbeab`dbgb@hTaabhbblabka |
|
36 |
-Bb`bbib`babca@dTcab`bbib |
|
37 |
-Bb`dbjb`bbboaPoooooooooooooooohPoooooooooooooooohaabkbeab`dbjbPnooooooooooooooohTaabkbbnabma |
|
38 |
-Bb`bblb`babca@dTcab`bblb |
|
39 |
-Bb`dbmb`bbboaPoooooooooooooooohAahaabnbeab`dbmb@hTaabnbb`bboa |
|
40 |
-Bb`bbob`babca@dTcab`bbob |
|
6 |
+A`b`bL`Faaaa |
|
7 |
+BTcab`bHeeeeeeemdE |
|
8 |
+A`b`bL`Faaaa |
|
41 | 9 |
BTcab`bAadE |
42 |
-A`b`bLalah`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`Fbeaai |
|
43 |
-Bah``bbbdbBjeaAoaaaaaeaah`AjaTaaaaabaa |
|
44 |
-Bb`bab`babca@dTcab`bab |
|
45 |
-Bb`aac`bbbabDlkjebD```obaaadeab`aacD```ebTaaadadac |
|
46 |
-Bb`bae`babca@dTcab`bae |
|
47 |
-Bb`baf`bbbbbHdcbalkjedG``````odaaageab`bafG``````jdTaaagafae |
|
48 |
-Bb`bah`babca@dTcab`bah |
|
49 |
-Bb`dai`bbbcbPdcbahgfedcbalkjehG``````ohaaajeab`daiG``````fhTaaajahag |
|
50 |
-Bb`bak`babca@dTcab`bak |
|
10 |
+A`b`bL`Faaaa |
|
51 | 11 |
BTcab`bE````ddE |
52 |
-A`b`bLafah`aa`b`b`ah`aa`b`b`Fakae |
|
53 |
-Bah``bbbhbBnoaAaaaaaaeaah`BooaTaaaaabaa |
|
54 |
-Bb`bab`babca@dTcab`bab |
|
55 |
-Bahac`bbbhbBngaAaaaaadeaahacBocaTaaadadac |
|
56 |
-Bb`bae`babca@dTcab`bae |
|
12 |
+A`b`bL`Faaaa |
|
57 | 13 |
BTcab`bE````adE |
58 |
-A`b`bLaob`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`Fbjaak |
|
59 |
-Bb`b``bdbbeHoooooooodAbd@dAddaaaaeab`b`CijbdTaaaaabaa |
|
60 |
-Bb`bab`babca@dTcab`bab |
|
61 |
-Bb`bac`bdbbeHoooooooodHoooooooodAadHoooooooodaaadeab`bacCbbcdTaaadadac |
|
62 |
-Bb`bae`babca@dTcab`bae |
|
63 |
-Bb`baf`bdbbeHooooooood@dAcdHnooooooodaaageab`bafCcjbdTaaagafae |
|
64 |
-Bb`bah`babca@dTcab`bah |
|
65 |
-Bb`bai`bdbbeHooooooood@dAcd@daaajeab`baiCcnbdTaaajahag |
|
66 |
-Bb`bak`babca@dTcab`bak |
|
67 |
-Bb`bal`bdbbeHooooooood@d@dHoooooooodaaameab`balBkbdTaaamajai |
|
68 |
-Bb`ban`babca@dTcab`ban |
|
14 |
+A`b`bL`Faaaa |
|
69 | 15 |
BTcab`bH```````ddE |
70 |
-A`b`bLagah`aa`b`b`ah`ah`aa`b`b`Falae |
|
71 |
-Bah``bbblbBnoaAadaaaaeaah`BogaTaaaaabaa |
|
72 |
-Bb`bab`babca@dTcab`bab |
|
73 |
-Bahac`bbb`bBnoaAeaahad`bbblbacAadaaaeeaahadAaaTaaaeadac |
|
74 |
-Bb`baf`babca@dTcab`baf |
|
16 |
+A`b`bL`Faaaa |
|
75 | 17 |
BTcab`bD```ddE |
76 |
-A`b`bLb`cah`aa`b`b`ah`aa`b`b`ah`aa`b`b`ah`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`Fbaebab |
|
77 |
-Bah``bbb`cBooaAaaaaaaeaah`BooaTaaaaabaa |
|
78 |
-Bb`bab`babca@dTcab`bab |
|
79 |
-Bahac`bbb`cBooaBooaaaadeaahacAaaTaaadadac |
|
80 |
-Bb`bae`babca@dTcab`bae |
|
81 |
-Bahaf`bbb`cAaaAaaaaageaahafAaaTaaagafae |
|
82 |
-Bb`bah`babca@dTcab`bah |
|
83 |
-Bahai`bbb`cBaaaBcbaaaajeaahaiBceaTaaajahag |
|
84 |
-Bb`bak`babca@dTcab`bak |
|
85 |
-Bb`aal`bbbmbDoooobAabaaameab`aalDoooobTaaamajai |
|
86 |
-Bb`ban`babca@dTcab`ban |
|
87 |
-Bb`aao`bbbmbDoooobDoooobaab`aeab`aaoAabTaab`aalak |
|
88 |
-Bb`bbaa`babca@dTcab`bbaa |
|
89 |
-Bb`abba`bbbmbAabAabaabcaeab`abbaAabTaabcaanam |
|
90 |
-Bb`bbda`babca@dTcab`bbda |
|
91 |
-Bb`abea`bbbmbBckbCgfcbaabfaeab`abeaDe`afbTaabfab`aao |
|
92 |
-Bb`bbga`babca@dTcab`bbga |
|
93 |
-Bb`bbha`bbbnbHoooooooodAadaabiaeab`bbhaHoooooooodTaabiabbabaa |
|
94 |
-Bb`bbja`babca@dTcab`bbja |
|
95 |
-Bb`bbka`bbbnbHoooooooodHoooooooodaablaeab`bbkaAadTaablabdabca |
|
96 |
-Bb`bbma`babca@dTcab`bbma |
|
97 |
-Bb`bbna`bbbnbAadAadaaboaeab`bbnaAadTaaboabfabea |
|
98 |
-Bb`bb`b`babca@dTcab`bb`b |
|
99 |
-Bb`bbab`bbbnbE`emkbdEhnmdmdaabbbeab`bbabH`h`jlgbgdTaabbbbhabga |
|
100 |
-Bb`bbcb`babca@dTcab`bbcb |
|
101 |
-Bb`dbdb`bbbobPoooooooooooooooohAahaabebeab`dbdbPoooooooooooooooohTaabebbjabia |
|
102 |
-Bb`bbfb`babca@dTcab`bbfb |
|
103 |
-Bb`dbgb`bbbobPoooooooooooooooohPoooooooooooooooohaabhbeab`dbgbAahTaabhbblabka |
|
104 |
-Bb`bbib`babca@dTcab`bbib |
|
105 |
-Bb`dbjb`bbbobAahAahaabkbeab`dbjbAahTaabkbbnabma |
|
106 |
-Bb`bblb`babca@dTcab`bblb |
|
107 |
-Bb`dbmb`bbbobImaghnanbdhIogjdckg`bhaabnbeab`dbmbPcfifjghokjjemflghTaabnbb`bboa |
|
108 |
-Bb`bbob`babca@dTcab`bbob |
|
18 |
+A`b`bL`Faaaa |
|
109 | 19 |
BTcab`bB`adE |
110 |
-A`b`bLalah`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`Fbeaai |
|
111 |
-Bah``bbbdcBjeaAoaaaaaeaah`BoeaTaaaaabaa |
|
112 |
-Bb`bab`babca@dTcab`bab |
|
113 |
-Bb`aac`bbbacDlkjebD```obaaadeab`aacDlkjobTaaadadac |
|
114 |
-Bb`bae`babca@dTcab`bae |
|
115 |
-Bb`baf`bbbbcHdcbalkjedG``````odaaageab`bafHdcbalkoedTaaagafae |
|
116 |
-Bb`bah`babca@dTcab`bah |
|
117 |
-Bb`dai`bbbccPdcbahgfedcbalkjehG``````ohaaajeab`daiPdcbahgoedcbalkjehTaaajahag |
|
118 |
-Bb`bak`babca@dTcab`bak |
|
20 |
+A`b`bL`Faaaa |
|
119 | 21 |
BTcab`bF`````adE |
120 |
-A`b`bLaoah`aa`b`b`ah`aa`b`b`ah`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`Fbjaak |
|
121 |
-Bah``bbb`dBooaAaaaaaaeaah`@aTaaaaabaa |
|
122 |
-Bb`bab`babca@dTcab`bab |
|
123 |
-Bahac`bbbldBooaAaaaaadeaahac@aTaaadadac |
|
124 |
-Bb`bae`babca@dTcab`bae |
|
125 |
-Bahaf`bbb`dAaaBooaaaageaahaf@aTaaagafae |
|
126 |
-Bb`bah`babca@dTcab`bah |
|
127 |
-Bb`aai`bbbmcDinmobAgbaaajeab`aaiDmooobTaaajahag |
|
128 |
-Bb`bak`babca@dTcab`bak |
|
129 |
-Bb`aal`bbbidDinmobAgbaaameab`aalAfbTaaamajai |
|
130 |
-Bb`ban`babca@dTcab`ban |
|
22 |
+A`b`bL`Faaaa |
|
131 | 23 |
BTcab`bC``ddE |
132 |
-A`b`bLbfaah`aa`b`b`ah`aa`b`b`ah`aa`b`b`ah`aa`b`b`ah`ah`aa`b`b`ah`aa`b`b`b`a`aa`b`b`Fbebao |
|
133 |
-Bah``bbbhcAaaBooaaaaaeaah`BooaTaaaaabaa |
|
134 |
-Bb`bab`babca@dTcab`bab |
|
135 |
-Bahac`bbbhcBooaAaaaaadeaahacBooaTaaadadac |
|
136 |
-Bb`bae`babca@dTcab`bae |
|
137 |
-Bahaf`bbbhcBooaBooaaaageaahafAaaTaaagafae |
|
138 |
-Bb`bah`babca@dTcab`bah |
|
139 |
-Bahai`bbbhcAaaAaaaaajeaahaiAaaTaaajahag |
|
140 |
-Bb`bak`babca@dTcab`bak |
|
141 |
-Bahal`bbb`bBnoaAeaaham`bbbhcAfaalaaaneaahamAbaTaaanajai |
|
142 |
-Bb`bao`babca@dTcab`bao |
|
143 |
-Bahb`a`bbbhcalAbaaabaaeaahb`aAaaTaabaaalak |
|
144 |
-Bb`bbba`babca@dTcab`bbba |
|
145 |
-Bb`abca`bbbecDjnmobAgbaabdaeab`abcaDdkoobTaabdaanam |
|
146 |
-Bb`bbea`babca@dTcab`bbea |
|
24 |
+A`b`bL`Faaaa |
|
147 | 25 |
BTcab`bC``adE |
148 |
-A`b`bLafb`b`aa`b`b`b`b`aa`b`b`Fakae |
|
149 |
-Bb`b``bcbaeAddAedAfdaaaaeab`b`AedTaaaaabaa |
|
150 |
-Bb`bab`babca@dTcab`bab |
|
151 |
-Bb`bac`bcbae@dAedAfdaaadeab`bacAfdTaaadadac |
|
152 |
-Bb`bae`babca@dTcab`bae |
|
26 |
+A`b`bL`Faaaa |
|
153 | 27 |
BTcab`bH```````hdE |
154 |
-A`b`bLaib`a`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`Fb`aag |
|
155 |
-Bb`a``babfaBloaaaaaeab`a`DlooobTaaaaabaa |
|
156 |
-Bb`bab`babca@dTcab`bab |
|
157 |
-Bb`bac`babdaDjooobaaadeab`bacHjooooooodTaaadadac |
|
158 |
-Bb`bae`babca@dTcab`bae |
|
159 |
-Bb`daf`babeaHjooooooodaaageab`dafPjooooooooooooooohTaaagafae |
|
160 |
-Bb`bah`babca@dTcab`bah |
|
28 |
+A`b`bL`Faaaa |
|
161 | 29 |
BTcab`bG``````adE |
162 |
-A`b`bLalah`aa`b`b`ah`aa`b`b`ah`aa`b`b`b`a`aa`b`b`Fbeaai |
|
163 |
-Bah``bbblcAaaAadaaaaeaah`AbaTaaaaabaa |
|
164 |
-Bb`bab`babca@dTcab`bab |
|
165 |
-Bahac`bbblcAaa@daaadeaahacAaaTaaadadac |
|
166 |
-Bb`bae`babca@dTcab`bae |
|
167 |
-Bahaf`bbblcBnoaAbdaaageaahafBhoaTaaagafae |
|
168 |
-Bb`bah`babca@dTcab`bah |
|
169 |
-Bb`aai`bbbicDnojobAbdaaajeab`aaiDhoknbTaaajahag |
|
170 |
-Bb`bak`babca@dTcab`bak |
|
30 |
+A`b`bL`Faaaa |
|
171 | 31 |
BTcab`bD```adE |
172 |
-A`b`bLbdbah`aa`b`b`ah`aa`b`b`ah`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`b`d`aa`b`b`Fbmcbia |
|
173 |
-Bah``bbbddBooaAaaaaaaeaah`BnoaTaaaaabaa |
|
174 |
-Bb`bab`babca@dTcab`bab |
|
175 |
-Bahac`bbbddAaaBooaaaadeaahacAbaTaaadadac |
|
176 |
-Bb`bae`babca@dTcab`bae |
|
177 |
-Bahaf`bbbddAaaAaaaaageaahaf@aTaaagafae |
|
178 |
-Bb`bah`babca@dTcab`bah |
|
179 |
-Bb`aai`bbbadDoooobAabaaajeab`aaiDnooobTaaajahag |
|
180 |
-Bb`bak`babca@dTcab`bak |
|
181 |
-Bb`aal`bbbadAabDoooobaaameab`aalAbbTaaamajai |
|
182 |
-Bb`ban`babca@dTcab`ban |
|
183 |
-Bb`aao`bbbadAabAabaab`aeab`aao@bTaab`aalak |
|
184 |
-Bb`bbaa`babca@dTcab`bbaa |
|
185 |
-Bb`bbba`bbbbdHoooooooodAadaabcaeab`bbbaHnooooooodTaabcaanam |
|
186 |
-Bb`bbda`babca@dTcab`bbda |
|
187 |
-Bb`bbea`bbbbdAadHoooooooodaabfaeab`bbeaAbdTaabfab`aao |
|
188 |
-Bb`bbga`babca@dTcab`bbga |
|
189 |
-Bb`bbha`bbbbdAadAadaabiaeab`bbha@dTaabiabbabaa |
|
190 |
-Bb`bbja`babca@dTcab`bbja |
|
191 |
-Bb`dbka`bbbcdPoooooooooooooooohAahaablaeab`dbkaPnooooooooooooooohTaablabdabca |
|
192 |
-Bb`bbma`babca@dTcab`bbma |
|
193 |
-Bb`dbna`bbbcdAahPoooooooooooooooohaaboaeab`dbnaAbhTaaboabfabea |
|
194 |
-Bb`bb`b`babca@dTcab`bb`b |
|
195 |
-Bb`dbab`bbbcdAahAahaabbbeab`dbab@hTaabbbbhabga |
|
196 |
-Bb`bbcb`babca@dTcab`bbcb |
|
32 |
+A`b`bL`Faaaa |
|
197 | 33 |
BTcab`bAddE |
198 |
-A`b`bLaiah`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`Fb`aag |
|
199 |
-Bah``babgaDmnnobaaaaeaah`BmnaTaaaaabaa |
|
200 |
-Bb`bab`babca@dTcab`bab |
|
201 |
-Bb`aac`babhaHmnnomjnmdaaadeab`aacDmnnobTaaadadac |
|
202 |
-Bb`bae`babca@dTcab`bae |
|
203 |
-Bb`baf`babiaPonnkmnnomjnmonnkhaaageab`bafHonnkmnnodTaaagafae |
|
204 |
-Bb`bah`babca@dTcab`bah |
|
34 |
+A`b`bL`Faaaa |
|
205 | 35 |
BTcab`bH```````adE |
206 |
-A`b`bLacb`a`aa`b`b`Fafac |
|
207 |
-Bb`a``bbbedDjnmobAgbaaaaeab`a`DfddbbTaaaaabaa |
|
208 |
-Bb`bab`babca@dTcab`bab |
|
36 |
+A`b`bL`Faaaa |
|
209 | 37 |
BTcab`bB`ddE |
210 |
-A`b`bLalah`aa`b`b`b`a`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`Fbeaai |
|
211 |
-Bah``bbb`eBjeaB`oaaaaaeaah`BjjaTaaaaabaa |
|
212 |
-Bb`bab`babca@dTcab`bab |
|
213 |
-Bb`aac`bbbmdDjejebD``oobaaadeab`aacDjeejbTaaadadac |
|
214 |
-Bb`bae`babca@dTcab`bae |
|
215 |
-Bb`baf`bbbndHjejejejedH``oooooodaaageab`bafHjeejejejdTaaagafae |
|
216 |
-Bb`bah`babca@dTcab`bah |
|
217 |
-Bb`dai`bbbodPjejejejejejejejehP``oooooooooooooohaaajeab`daiPjeejejejejejejejhTaaajahag |
|
218 |
-Bb`bak`babca@dTcab`bak |
|
38 |
+A`b`bL`Faaaa |
|
219 | 39 |
BTcab`bF`````ddE |
220 |
-A`b`bLaib`a`aa`b`b`b`b`aa`b`b`b`d`aa`b`b`Fb`aag |
|
221 |
-Bb`a``bablaBloaaaaaeab`a`BlobTaaaaabaa |
|
222 |
-Bb`bab`babca@dTcab`bab |
|
223 |
-Bb`bac`babjaDlooobaaadeab`bacDlooodTaaadadac |
|
224 |
-Bb`bae`babca@dTcab`bae |
|
225 |
-Bb`daf`babkaHlooooooodaaageab`dafHlooooooohTaaagafae |
|
226 |
-Bb`bah`babca@dTcab`bah |
|
40 |
+A`b`bL`Faaaa |
|
227 | 41 |
BTcab`bG``````ddE |
228 | 42 |
Aab`bLaab`b`b`b`Fabaa |
229 | 43 |
Bb`baae`Aad`Tcab`baaE |
... | ... |
@@ -447,4 +261,4 @@ ifff`bhbdgefcgdgoeifcfmf`goehbmbaclbmbaclbaclbmbacib`babmc`b`chgccbcbcibSbgefdge |
447 | 447 |
bgefdgegbgnf`bffafiflfhb`cibkcSifff`bhbdgefcgdgoeifcfmf`goehbmbaclb`clbcclb`cib`babmc`b`chgbcefccibSbgefdgegbgnf`bffafiflfhb`cibkcSifff`bhbdgefcgdgoeifcfmf`goehbmbaclb`clb`clbmbacib`babmc`b`chgbcbfib |
448 | 448 |
bgefdgegbgnf`bffafiflfhb`cibkcSbgefdgegbgnf`b`chgdc`c`c`c`c`c`c`ckcSmgSSifnfdg`bdgefcgdgoecgeflfefcfdgoehbifnfdg`baflb`bifnfdg`bbflb`bifnfdg`bcfibSkgSbgefdgegbgnf`baf`boc`bbf`bjc`bcfkc |
449 | 449 |
mgSSifnfdg`bdgefcgdgoecgeflfefcfdghbfgofifdfibSkgSifffhbdgefcgdgoecgeflfefcfdgoehbdclb`beclb`bfcib`babmc`becibSbgefdgegbgnf`bffafiflfhb`cibkcSifffhbdgefcgdgoecgeflfefcfdgoehb`clb`beclb`bfcib`babmc`bfcib |
450 |
-bgefdgegbgnf`bffafiflfhb`cibkcSbgefdgegbgnf`b`chghc`c`c`c`c`c`c`ckcSmgSSS |
|
451 | 450 |
\ No newline at end of file |
451 |
+bgefdgegbgnf`bffafiflfhb`cibkcSbgefdgegbgnf`b`chghc`c`c`c`c`c`c`ckcSmgSS |
... | ... |
@@ -1,10 +1,10 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``afabp`clamcoincidencejb:23 |
|
1 |
+ClamBCafhd`bhimkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``alabp`clamcoincidencejb:40 |
|
2 | 2 |
|
3 |
-Tedaaa` |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagah |
|
4 | 4 |
E`` |
5 | 5 |
G`aa`@` |
6 |
-A`b`bLaab`b`Fabaa |
|
7 |
-Bb`b``baab@dTcab`b`E |
|
6 |
+A`b`bL`Faaaa |
|
7 |
+BTcab`b@dE |
|
8 | 8 |
Aab`bLaab`b`b`b`Fabaa |
9 | 9 |
Bb`baae`Aad`Tcab`baaE |
10 |
-Sifnfdg`bdfiffg`chbifnfdg`bhgibSkgSbgefdgegbgnf`bacobhgkcSmgSSifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSbgefdgegbgnf`bdfiffg`chb`cibkcSmgSSS |
|
11 | 10 |
\ No newline at end of file |
11 |
+Sifnfdg`bdfiffg`chbifnfdg`bhgibSkgSbgefdgegbgnf`bacobhgkcSmgSSifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSbgefdgegbgnf`bdfiffg`chb`cibkcSmgSS |
... | ... |
@@ -1,9 +1,9 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``afaap`clamcoincidencejb:14 |
|
1 |
+ClamBCafhd`bhimkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``alaap`clamcoincidencejb:40 |
|
2 | 2 |
|
3 |
-Tedaaa` |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagah |
|
4 | 4 |
E`` |
5 | 5 |
G`aa`@` |
6 | 6 |
A`b`bL`Fabab |
7 | 7 |
BTbaaa |
8 | 8 |
BTbaaaE |
9 |
-Sifnfdg`befnfdgbgig`gofifnfdghbibSkgSgghfiflfefhbacibkgmgSbgefdgegbgnf`b`ckcSmgSS |
|
10 | 9 |
\ No newline at end of file |
10 |
+Sifnfdg`befnfdgbgig`gofifnfdghbibSkgSgghfiflfefhbacibkgmgSbgefdgegbgnf`b`ckcSmgS |
... | ... |
@@ -1,11 +1,13 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```c``a```|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``bhaaap`clamcoincidencejb:309 |
|
1 |
+ClamBCafhd`bhimkd|afefdfggifnf```c``a```|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``bbaaap`clamcoincidencejb:107 |
|
2 | 2 |
Test.{A,B};Target:1;(((0|1|2)=42,2)|(3=10));EP+0:aabb;ffff;aaccee;f00d;dead |
3 |
-Tedebgeebfeebeeebdeebceebbeeb`eebadebcdaaa`aacb`bbadb`bcajahbaeahbaeahbaeahbaeahbaecaab`bdb`db`bdagahdajahdabbaddabahdaeah |
|
4 |
-Eaeaaaebod|amcgefdgfgifbgegcgnfafmfef`` |
|
5 |
-Gd```hbja`@`bgeBdeBefBcgBdg@`bfeBad@`bfeBbd@`bee@Ab@Ac`b`aAa`bdeBedB`eBkbB`cBjcBafBafBbfBbf@`bgeBffBffBffBff@`bgeBffB`cB`cBdf@`bceBafBafBcfBcfBefBef@`bgeBdfBefBafBdf@`b`aC``a`b`e@@@Aa@Ac@Ab@Ad`bad@Ab`bad@Ac`bad@Af`bad@Ag`bad@Ah`bad@Ai`bad@Aj`bad@D```h`bcdB`aD```h`bcdAlD```h`bcdAhD```h`bcdAdD```h`bcd@D```h` |
|
6 |
-A`b`bLaeb`b`aa`aa`bad`b`b`Fahac |
|
7 |
-Bb`b`gbBea`aaaagab`b`AadTaaaaaaab |
|
8 |
-Baaabeab`b`AbdbadacoaabAm`An`b`badabbaeac@dTcab`b@d |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagahebaeebkdebcdebadaacb`bbadb`bdb`db`b |
|
4 |
+Eaeaaaeb`e|amcgefdgfgifbgegcgnfafmfef`` |
|
5 |
+Gd```hai`@`b`aC``a`bkdBdeBefBcgBdgBnbBbd@`bkdBdeBefBcgBdgBnbBad@`bcdB`aD```h`bad@Ab`bad@Ab`bad@Ac`bad@Ac` |
|
6 |
+A`b`bLaeb`b`aa`aa`b`b`b`b`Fajae |
|
7 |
+Bb`b`gbAd`aaaagab`b`AadTaaaaaaad |
|
8 |
+Baaabeab`b`AbdTaaababac |
|
9 |
+Bb`bacabbaeAh`AfdTcab`b@d |
|
10 |
+Bb`badabbaeAf`AfdTcab`b@d |
|
9 | 11 |
BTcab`b@dE |
10 | 12 |
Sobjb`bieofeg`bafbgef`bofnflfig`baflflfofggefdf`bdgof`bcgefdg`bdghfefcgef`bfgifbgegcgnfafmfefcg`bafcg`bffofegnfdf`bjbobSfeidbeeecendadmdedoe`ebeedfdidhehbbbdeefcgdgbbib |
11 | 13 |
feidbeeecendadmdedcehbbbadbblb`bbbbdbbibSdeadbegdeddehbacibSSceidgdndaddeeebeedceoeddedcdldoebdedgdidndSddedcdldadbeedoeceidgdndaddeeebeedhbmfafgfifcfibSddedcdldadbeedoeceidgdndaddeeebeedhbjgefbgofib |
... | ... |
@@ -18,4 +20,5 @@ mfafdgcfhfefcghbceifgfnfafdgegbgefcgnbjgefbgofibkb`bmfafdgcfhfefcghbceifgfnfafdg |
18 | 18 |
obob`bdehfef`bafbfoffgef`bcc`bcgifgfnfafdgegbgefcg`bhfaffgef`bmfafdgcfhfefdf`baf`bdgofdgaflf`bofff`bdcbc`bdgifmfefcglb`bafnfdf`bafdg`blfefafcgdgSobob`bbc`bofff`bdghfefmf`bhfaffgef`bmfafdgcfhfefdf |
19 | 19 |
bgefdgegbgnf`bdgbgegefkcSmgSobob`bidff`bdghfef`bcfhfefcfkf`bcgifgfnfafdgegbgef`bmfafdgcfhfefcg`bac`c`bdgifmfefcg`bggef`bcgdgiflflf`bhfaffgef`baf`bmfafdgcfhfSifff`bhbcfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbcfhfefcfkfib`bmcmc`bac`cib |
20 | 20 |
bgefdgegbgnf`bdgbgegefkcSobob`bndof`bmfafdgcfhfSbgefdgegbgnf`bffaflfcgefkcSmgSSifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSegnfcgifgfnfefdf`bcfofegnfdg`bmc`bcfofegnfdgoemfafdgcfhfhbceifgfnfafdgegbgefcgnbcfhfefcfkfbcibkc |
21 |
-ifff`bhbcfofegnfdg`bncmc`bbcibSffofegnfdffeifbgegcghbcfofegnfdg`bmcmc`bbc`boc`bbbadbb`bjc`bbbbdbbibkcSbgefdgegbgnf`b`ckcSmgSS |
|
22 | 21 |
\ No newline at end of file |
22 |
+ifff`bhbcfofegnfdg`bncmc`bbcibSobobi`ffofegnfdffeifbgegcghbcfofegnfdg`bmcmc`bbc`boc`bbbadbb`bjc`bbbbdbbibkcSifff`bhbcfofegnfdg`bmcmc`bbcibSffofegnfdffeifbgegcghbbbadbbibkc |
|
23 |
+eflfcgefSffofegnfdffeifbgegcghbbbbdbbibkcSbgefdgegbgnf`b`ckcSmgS |
... | ... |
@@ -1,8 +1,8 @@ |
1 |
-ClamBCafhflhhgjkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbac`cmbacbcmbgfdcfcacefafefic``afaap`clamcoincidencejb:20 |
|
1 |
+ClamBCafhe`bhimkd|afefdfggifnf```````|bhacflfafmfbfcfmb`cnbacacmbdcbcmbgfbchccffcffaccc``alaap`clamcoincidencejb:40 |
|
2 | 2 |
|
3 |
-Tedaaa` |
|
3 |
+Teddaaahdabahdacahdadahdaeahdafahdagah |
|
4 | 4 |
E`` |
5 | 5 |
G`aa`@` |
6 | 6 |
A`b`bL`Faaaa |
7 | 7 |
BTcab`bHm``odcbadE |
8 |
-Sifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSbgefdgegbgnf`b`chgacbcccdcff`c`cdfkcSmgSS |
|
9 | 8 |
\ No newline at end of file |
9 |
+Sifnfdg`befnfdgbgig`gofifnfdghbfgofifdfibSkgSbgefdgegbgnf`b`chgacbcccdcff`c`cdfkcSmgS |