Exemplo n.º 1
0
/* Testing the final vermont workflow */
void test_final_vermont_workflow(){
	int i, j;
	// Enter the absolute or relative path to the signatures thou shalt match with.
	char * signature_directory = "./signatures";

	printf("\nInitializing signaturematcher ... ");
	struct Matcher * signaturematcher = new_matcher(signature_directory);
	printf("Done.\n");

	// Define the flow thou shalt match upon.
	char * flow = "dies ist ein kleiner und doch guter test .üovfisnr0q9832ur0ocdijwaoercú32qruq3222cxjfsopijreif7rq203	iß3+2ai p09u ppppppu4esrrrr4crss8cp0s9ewy";

	int runs = 10000;

	int * results = NULL;
	for (j = 0; j < runs; ++j) {
		results = match_single_flow(signaturematcher, flow, strlen(flow));

		for (i = 0; i < signaturematcher->numOfClasses; ++i) {
			if (results[i] == 1)
			{}//printf("match: %s\n", signaturematcher->signatures[i]->id);
		}
		free(results);
	}

	destruct_matcher(signaturematcher);
}
FrontPayloadSigMatcher::~FrontPayloadSigMatcher()
{
	if (sigmatcher) destruct_matcher(sigmatcher);
}