From 2ea86eea2122ee5346bbaa462c05b986fdf1e395 Mon Sep 17 00:00:00 2001 From: "Hui Cao (huica)" Date: Thu, 29 Sep 2016 16:29:57 -0400 Subject: [PATCH] Merge pull request #647 in SNORT/snort3 from obfuscation_updates to master Squashed commit of the following: commit 95db4800e1963f5f20d7a7493e850070561379f4 Author: Victor Roemer Date: Thu Sep 29 12:06:23 2016 -0400 Fix mysteriously disabling obfuscation and offset. --- src/ips_options/ips_sd_pattern.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ips_options/ips_sd_pattern.cc b/src/ips_options/ips_sd_pattern.cc index 7cce0a0d2..e1d889bc6 100644 --- a/src/ips_options/ips_sd_pattern.cc +++ b/src/ips_options/ips_sd_pattern.cc @@ -206,10 +206,9 @@ static int hs_match(unsigned int /*id*/, unsigned long long from, if ( !ctx->packet->obfuscator ) ctx->packet->obfuscator = new Obfuscator(); - uint32_t off = ctx->buf - ctx->start; // FIXIT-L Make configurable or don't show any PII partials (0 for user defined??) - len = len > 4 ? len - 4 : len; - ctx->packet->obfuscator->push(off, len); + uint32_t off = ctx->buf + from - ctx->start; + ctx->packet->obfuscator->push(off, len - 4); } return 0; @@ -300,8 +299,6 @@ bool SdPatternModule::begin(const char*, int, SnortConfig*) bool SdPatternModule::set(const char*, Value& v, SnortConfig* sc) { - config.obfuscate_pii = false; - if ( v.is("~pattern") ) { config.pii = v.get_string(); -- 2.47.2