Skip to content

Commit

Permalink
asfadsf
Browse files Browse the repository at this point in the history
Signed-off-by: jason taylor <[email protected]>
  • Loading branch information
jmtaylor90 committed Aug 23, 2023
1 parent 5717554 commit 00b67c1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/detect-smb-version.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ static void DetectSmbVersionFree(DetectEngineCtx *de_ctx, void *ptr)
}

/**
* \brief Creates a SigMatch for the "dce_opnum" keyword being sent as argument,
* and appends it to the rs_dcerpc_opnum_matchSignature(s).
* \brief Creates a SigMatch for the "smb_version" keyword being sent as argument,
* and appends it to the rs_smb_version_match Signature(s).
*
* \param de_ctx Pointer to the detection engine context.
* \param s Pointer to signature for the current Signature being parsed
Expand All @@ -104,6 +104,7 @@ static void DetectSmbVersionFree(DetectEngineCtx *de_ctx, void *ptr)
static int DetectSmbVersionSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg)
{
SCLogDebug("smb_version: DetectSmbVersionSetup");
SCLogDebug("smb_version keyword argument value is: %s", arg);

if (DetectSignatureSetAppProto(s, ALPROTO_SMB) < 0)
return -1;
Expand All @@ -128,7 +129,7 @@ static int DetectSmbVersionSetup(DetectEngineCtx *de_ctx, Signature *s, const ch

sm->type = DETECT_SMB_VERSION;
sm->ctx = dod;

SigMatchAppendSMToList(s, sm, g_smb_version_list_id);
return 0;
}
Expand All @@ -147,16 +148,14 @@ void DetectSmbVersionRegister(void)
sigmatch_table[DETECT_SMB_VERSION].Free = DetectSmbVersionFree;
sigmatch_table[DETECT_SMB_VERSION].desc = "smb keyword to match on SMB version";

/*
DetectAppLayerInspectEngineRegister2(
BUFFER_NAME, ALPROTO_SMB, SIG_FLAG_TOSERVER, 0, DetectEngineInspectSmbVersion,
/* DetectAppLayerInspectEngineRegister2(
BUFFER_NAME, ALPROTO_SMB, SIG_FLAG_TOSERVER, 0, DetectSmbVersionMatchRust,
NULL);
DetectAppLayerInspectEngineRegister2(
BUFFER_NAME, ALPROTO_SMB, SIG_FLAG_TOCLIENT, 0, DetectEngineInspectSmbVersion,
DetectAppLayerInspectEngineRegister2(
BUFFER_NAME, ALPROTO_SMB, SIG_FLAG_TOCLIENT, 0, DetectSmbVersionMatchRust,
NULL);
*/

*/
g_smb_version_list_id = DetectBufferTypeRegister(BUFFER_NAME);

SCLogDebug("registering " BUFFER_NAME " rule option");
Expand Down

0 comments on commit 00b67c1

Please sign in to comment.