From 5b9665e8b9066fabbd899ac5b4676491324aa21f Mon Sep 17 00:00:00 2001 From: Windham Wong Date: Thu, 19 Oct 2017 16:07:01 +0100 Subject: [PATCH] fix bugs --- src/core/config/Categories.js | 2 +- src/core/config/modules/Packets.js | 2 +- src/core/operations/Packets.js | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/config/Categories.js b/src/core/config/Categories.js index 640f864b..aa1dcb53 100755 --- a/src/core/config/Categories.js +++ b/src/core/config/Categories.js @@ -303,7 +303,7 @@ const Categories = [ ops: [ "From Tcpdump", "HTTP gzip Decrypt", - "Strip TCP Headers", + "Strip TCP Headers", ] }, { diff --git a/src/core/config/modules/Packets.js b/src/core/config/modules/Packets.js index 97586d00..1d441ca4 100644 --- a/src/core/config/modules/Packets.js +++ b/src/core/config/modules/Packets.js @@ -14,7 +14,7 @@ let OpModules = typeof self === "undefined" ? {} : self.OpModules || {}; OpModules.Packets = { "From Tcpdump": Packets.runFromTcpdump, - "Strip TCP Headers": Packets.stripPacketHeader + "Strip TCP Headers": Packets.stripPacketHeader }; export default OpModules; diff --git a/src/core/operations/Packets.js b/src/core/operations/Packets.js index 181abece..602e049d 100644 --- a/src/core/operations/Packets.js +++ b/src/core/operations/Packets.js @@ -31,26 +31,26 @@ const Packets = { } return output; }, - - - /** + + + /** * @constant * @default */ STRIP_ETHERNET_HEADER: true, - + /** * @constant * @default */ STRIP_IP_HEADER: true, - + /** * @constant * @default */ STRIP_TCP_HEADER: true, - + /** * Strip TCP Headersoperation. * @@ -65,13 +65,13 @@ const Packets = { stripTCP = args[2]; if (stripEthernet) { - output = output.replace(/^(([0-9a-f]{4} ){6,8}0800 )/igm,''); + output = output.replace(/^(([0-9a-f]{4} ){6,8}0800 )/igm, ""); } if (stripIP) { - output = output.replace(/^((45[0-9a-f]{2} ([0-9a-f]{4} ){9}))/igm,''); + output = output.replace(/^((45[0-9a-f]{2} ([0-9a-f]{4} ){9}))/igm, ""); } if (stripTCP) { - output = output.replace(/^([0-9a-f]{4} ){6}((80[0-9a-f]{2} ([0-9a-f]{4} ?){9})|(50[0-9a-f]{2} ([0-9a-f]{4} ?){3}))/igm,''); + output = output.replace(/^([0-9a-f]{4} ){6}((80[0-9a-f]{2} ([0-9a-f]{4} ?){9})|(50[0-9a-f]{2} ([0-9a-f]{4} ?){3}))/igm, ""); } return output;