From d6135a02e9713e887b8a14f3131b50eb03139be5 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Thu, 25 Nov 2021 00:18:21 +0100 Subject: [PATCH] Fixed regex --- src/streamHandler/PacketStreamFactory.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/streamHandler/PacketStreamFactory.js b/src/streamHandler/PacketStreamFactory.js index 0a5b980..1819e69 100644 --- a/src/streamHandler/PacketStreamFactory.js +++ b/src/streamHandler/PacketStreamFactory.js @@ -94,12 +94,12 @@ class PacketStreamFactory extends Transform{ case PacketType.AssociationResponse: newPacket = new AssociationResponsePacket(); - newPacket.associationIsSuccessful = data.match(/(?<=(^|\s)Assoc\sResponse\s.{0,30})Successful(?=\s|$)/img) ? true : false; + newPacket.associationIsSuccessful = data.match(/(?<=(^|\s)Assoc\sResponse\s.{0,30})Successful(?=\s|$)/i) ? true : false; break; case PacketType.Disassociation: newPacket = new DisassociationPacket(); - newPacket.disassociationReason = data.match(/(?<=(^|\s)Disassociation:\s).*?(?=\sBSS|$)/img)?.[0] ?? null; + newPacket.disassociationReason = data.match(/(?<=(^|\s)Disassociation:\s).*$/i)?.[0] ?? null; break; } if(newPacket) packet = Object.assign(newPacket, packet); // Use new, more specific, packet and copy old data over