Go to the documentation of this file.
29 static void DetectBase64DataRegisterTests(
void);
36 "Content match base64 decoded data.";
38 "/rules/base64-keywords.html#base64-data";
42 DetectBase64DataRegisterTests;
55 SCLogError(
"\"base64_data\" keyword seen without preceding base64_decode.");
65 static int g_file_data_buffer_id = 0;
67 static int DetectBase64DataSetupTest01(
void)
74 "alert smtp any any -> any any (msg:\"DetectBase64DataSetupTest\"; "
75 "base64_decode; base64_data; content:\"content\"; sid:1; rev:1;)");
91 static int DetectBase64DataSetupTest04(
void)
98 "alert tcp any any -> any any (msg:\"some b64thing\"; flow:established,from_server; "
99 "file_data; content:\"sometext\"; fast_pattern; base64_decode:relative; base64_data; "
100 "content:\"foobar\"; nocase; tag:session,120,seconds; sid:1111111; rev:1;)");
107 static void DetectBase64DataRegisterTests(
void)
111 UtRegisterTest(
"DetectBase64DataSetupTest01", DetectBase64DataSetupTest01);
112 UtRegisterTest(
"DetectBase64DataSetupTest04", DetectBase64DataSetupTest04);
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
struct SigMatch_ * smlists[DETECT_SM_LIST_MAX]
SigTableElmt * sigmatch_table
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
SigMatch * SCDetectGetLastSMFromLists(const Signature *s,...)
Returns the sm with the largest index (added latest) from the lists passed to us.
main detection engine ctx
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Signature * DetectEngineAppendSig(DetectEngineCtx *, const char *)
Parse and append a Signature into the Detection Engine Context signature list.
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define FAIL_IF_NOT(expr)
Fail a test if expression evaluates to false.
int DetectBufferTypeGetByName(const char *name)
#define PASS
Pass the test.
@ DETECT_SM_LIST_BASE64_DATA
SignatureInitData * init_data
void DetectBase64DataRegister(void)
#define SCLogError(...)
Macro used to log ERROR messages.
a single match condition for a signature
DetectEngineCtx * DetectEngineCtxInit(void)
void(* RegisterTests)(void)