diff --git a/Dockerfile b/Dockerfile index d7e4be0..c1cf0d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,11 @@ WORKDIR /usr/src/app COPY package*.json ./ RUN npm install -RUN apk update -RUN apk add tcpdump +# remove development dependencies +RUN npm prune --production + +# Install required apk-packages & delete cache +RUN apk update && apk add tcpdump && rm -rf /var/cache/apk/* # Bundle app source COPY ./src/ . diff --git a/src/dto/Packet.js b/src/dto/Packet.js index 712daea..e30a983 100644 --- a/src/dto/Packet.js +++ b/src/dto/Packet.js @@ -1,20 +1,20 @@ const PacketType = { - Beacon: 'Beacon', - ProbeRequest: 'ProbeRequest', - ProbeResponse: 'ProbeResponse', - Data: 'Data', - RequestToSend: 'RequestToSend', - ClearToSend: 'ClearToSend', - Acknowledgment: 'Acknowledgment', - BlockAcknowledgment: 'BlockAcknowledgment', - NoData: 'NoData', - Authentication: 'Authentication', - AssociationRequest: 'AssociationRequest', - AssociationResponse: 'AssociationResponse', - Disassociation: 'Disassociation', - Handshake: 'Handshake', - Unknown: 'Unknown' -} + Beacon: "Beacon", + ProbeRequest: "ProbeRequest", + ProbeResponse: "ProbeResponse", + Data: "Data", + RequestToSend: "RequestToSend", + ClearToSend: "ClearToSend", + Acknowledgment: "Acknowledgment", + BlockAcknowledgment: "BlockAcknowledgment", + NoData: "NoData", + Authentication: "Authentication", + AssociationRequest: "AssociationRequest", + AssociationResponse: "AssociationResponse", + Disassociation: "Disassociation", + Handshake: "Handshake", + Unknown: "Unknown" +}; const FlagType = { MoreFragments: "MoreFragments", @@ -23,7 +23,7 @@ const FlagType = { MoreData: "MoreData", Protected: "Protected", Order: "Order" -} +}; class Packet{ timestampMicros; @@ -58,9 +58,9 @@ class ProbeRequestPacket extends PacketWithSSID{} class ProbeResponsePacket extends PacketWithSSID{} const AuthenticationType = { - OpenSystem_1: 'OpenSystem_1', - OpenSystem_2: 'OpenSystem_2', - Unknown: 'Unknown', + OpenSystem_1: "OpenSystem_1", + OpenSystem_2: "OpenSystem_2", + Unknown: "Unknown", } class AuthenticationPacket extends Packet{ authenticationType; @@ -77,10 +77,10 @@ class DisassociationPacket extends Packet{ const HandshakeStage = { - 1: '1', - 2: '2', - 3: '3', - 4: '4' + 1: "1", + 2: "2", + 3: "3", + 4: "4" } class HandshakePacket extends Packet{ handshakeStage;