netkitty 0.0.34 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +91 -2
- package/README.zh-CN.md +89 -0
- package/dist/analysis.d.ts +4 -0
- package/dist/{CodecHeaderExports.js → analysis.js} +4 -1
- package/dist/capture.d.ts +5 -0
- package/dist/capture.js +21 -0
- package/dist/codec.d.ts +5 -0
- package/dist/codec.js +21 -0
- package/dist/iface.d.ts +4 -0
- package/dist/iface.js +20 -0
- package/dist/pcap.d.ts +10 -0
- package/dist/pcap.js +27 -0
- package/dist/replay.d.ts +5 -0
- package/dist/replay.js +21 -0
- package/package.json +65 -57
- package/.eslintrc.json +0 -53
- package/.idea/codeStyles/Project.xml +0 -18
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -11
- package/.idea/modules.xml +0 -8
- package/.idea/netkitty.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/assets/NetKitty.png +0 -0
- package/binding.gyp +0 -5
- package/cpp/nodepcap/deps/include/Packet32.h +0 -429
- package/cpp/nodepcap/deps/include/pcap/bluetooth.h +0 -56
- package/cpp/nodepcap/deps/include/pcap/bpf.h +0 -292
- package/cpp/nodepcap/deps/include/pcap/can_socketcan.h +0 -56
- package/cpp/nodepcap/deps/include/pcap/compiler-tests.h +0 -163
- package/cpp/nodepcap/deps/include/pcap/dlt.h +0 -1514
- package/cpp/nodepcap/deps/include/pcap/funcattrs.h +0 -325
- package/cpp/nodepcap/deps/include/pcap/ipnet.h +0 -43
- package/cpp/nodepcap/deps/include/pcap/namedb.h +0 -84
- package/cpp/nodepcap/deps/include/pcap/nflog.h +0 -94
- package/cpp/nodepcap/deps/include/pcap/pcap-inttypes.h +0 -101
- package/cpp/nodepcap/deps/include/pcap/pcap.h +0 -1219
- package/cpp/nodepcap/deps/include/pcap/sll.h +0 -149
- package/cpp/nodepcap/deps/include/pcap/socket.h +0 -84
- package/cpp/nodepcap/deps/include/pcap/usb.h +0 -143
- package/cpp/nodepcap/deps/include/pcap/vlan.h +0 -46
- package/cpp/nodepcap/deps/include/pcap-bpf.h +0 -45
- package/cpp/nodepcap/deps/include/pcap-namedb.h +0 -40
- package/cpp/nodepcap/deps/include/pcap.h +0 -43
- package/cpp/nodepcap/deps/lib/ARM64/Packet.lib +0 -0
- package/cpp/nodepcap/deps/lib/Packet.lib +0 -0
- package/cpp/nodepcap/deps/lib/wpcap.lib +0 -0
- package/cpp/nodepcap/deps/lib/x64/Packet.lib +0 -0
- package/cpp/nodepcap/deps/lib/x64/wpcap.lib +0 -0
- package/cpp/nodepcap/nodepcap.gypi +0 -104
- package/cpp/nodepcap/src/binding.cc +0 -14
- package/cpp/nodepcap/src/capture.cc +0 -400
- package/cpp/nodepcap/src/capture.h +0 -53
- package/cpp/nodepcap/src/utils.cc +0 -218
- package/cpp/nodepcap/src/utils.h +0 -13
- package/dist/CodecExports.d.ts +0 -34
- package/dist/CodecExports.d.ts.map +0 -1
- package/dist/CodecExports.js +0 -23
- package/dist/CodecHeaderExports.d.ts +0 -2
- package/dist/CodecHeaderExports.d.ts.map +0 -1
- package/dist/HelperExports.d.ts +0 -11
- package/dist/HelperExports.d.ts.map +0 -1
- package/dist/HelperExports.js +0 -72
- package/dist/NetworkExports.d.ts +0 -13
- package/dist/NetworkExports.d.ts.map +0 -1
- package/dist/NetworkExports.js +0 -13
- package/dist/PcapExports.d.ts +0 -30
- package/dist/PcapExports.d.ts.map +0 -1
- package/dist/PcapExports.js +0 -33
- package/dist/errors/ActionNotFoundError.d.ts +0 -5
- package/dist/errors/ActionNotFoundError.d.ts.map +0 -1
- package/dist/errors/ActionNotFoundError.js +0 -12
- package/dist/errors/CodecSchemaValidateError.d.ts +0 -5
- package/dist/errors/CodecSchemaValidateError.d.ts.map +0 -1
- package/dist/errors/CodecSchemaValidateError.js +0 -12
- package/dist/errors/DeviceNotFoundError.d.ts +0 -5
- package/dist/errors/DeviceNotFoundError.d.ts.map +0 -1
- package/dist/errors/DeviceNotFoundError.js +0 -12
- package/dist/errors/NoAvailableCodecError.d.ts +0 -5
- package/dist/errors/NoAvailableCodecError.d.ts.map +0 -1
- package/dist/errors/NoAvailableCodecError.js +0 -12
- package/dist/errors/NpcapLoadError.d.ts +0 -5
- package/dist/errors/NpcapLoadError.d.ts.map +0 -1
- package/dist/errors/NpcapLoadError.js +0 -12
- package/dist/errors/SocketDownError.d.ts +0 -5
- package/dist/errors/SocketDownError.d.ts.map +0 -1
- package/dist/errors/SocketDownError.js +0 -12
- package/dist/errors/UnknownPipeMessageTypeError.d.ts +0 -5
- package/dist/errors/UnknownPipeMessageTypeError.d.ts.map +0 -1
- package/dist/errors/UnknownPipeMessageTypeError.js +0 -12
- package/dist/errors/common/ErrorCode.d.ts +0 -31
- package/dist/errors/common/ErrorCode.d.ts.map +0 -1
- package/dist/errors/common/ErrorCode.js +0 -33
- package/dist/lib/GeneratePipeAddress.d.ts +0 -7
- package/dist/lib/GeneratePipeAddress.d.ts.map +0 -1
- package/dist/lib/GeneratePipeAddress.js +0 -23
- package/dist/lib/GetBinding.d.ts +0 -2
- package/dist/lib/GetBinding.d.ts.map +0 -1
- package/dist/lib/GetBinding.js +0 -6
- package/dist/lib/GetCaptureTemporaryDirectory.d.ts +0 -7
- package/dist/lib/GetCaptureTemporaryDirectory.d.ts.map +0 -1
- package/dist/lib/GetCaptureTemporaryDirectory.js +0 -15
- package/dist/lib/GetDeviceCaptureTemporaryFilename.d.ts +0 -8
- package/dist/lib/GetDeviceCaptureTemporaryFilename.d.ts.map +0 -1
- package/dist/lib/GetDeviceCaptureTemporaryFilename.js +0 -18
- package/dist/lib/codec/Codec.d.ts +0 -32
- package/dist/lib/codec/Codec.d.ts.map +0 -1
- package/dist/lib/codec/Codec.js +0 -183
- package/dist/lib/codec/PacketHeaders.d.ts +0 -22
- package/dist/lib/codec/PacketHeaders.d.ts.map +0 -1
- package/dist/lib/codec/PacketHeaders.js +0 -47
- package/dist/lib/codec/abstracts/BaseHeader.d.ts +0 -217
- package/dist/lib/codec/abstracts/BaseHeader.d.ts.map +0 -1
- package/dist/lib/codec/abstracts/BaseHeader.js +0 -356
- package/dist/lib/codec/headers/ARP.d.ts +0 -10
- package/dist/lib/codec/headers/ARP.d.ts.map +0 -1
- package/dist/lib/codec/headers/ARP.js +0 -224
- package/dist/lib/codec/headers/EthernetII.d.ts +0 -10
- package/dist/lib/codec/headers/EthernetII.d.ts.map +0 -1
- package/dist/lib/codec/headers/EthernetII.js +0 -81
- package/dist/lib/codec/headers/Goose.d.ts +0 -104
- package/dist/lib/codec/headers/Goose.d.ts.map +0 -1
- package/dist/lib/codec/headers/Goose.js +0 -975
- package/dist/lib/codec/headers/ICMP.d.ts +0 -15
- package/dist/lib/codec/headers/ICMP.d.ts.map +0 -1
- package/dist/lib/codec/headers/ICMP.js +0 -147
- package/dist/lib/codec/headers/ICMPv6.d.ts +0 -15
- package/dist/lib/codec/headers/ICMPv6.d.ts.map +0 -1
- package/dist/lib/codec/headers/ICMPv6.js +0 -128
- package/dist/lib/codec/headers/IEC104_I_Frame.d.ts +0 -10
- package/dist/lib/codec/headers/IEC104_I_Frame.d.ts.map +0 -1
- package/dist/lib/codec/headers/IEC104_I_Frame.js +0 -6411
- package/dist/lib/codec/headers/IEC104_S_Frame.d.ts +0 -10
- package/dist/lib/codec/headers/IEC104_S_Frame.d.ts.map +0 -1
- package/dist/lib/codec/headers/IEC104_S_Frame.js +0 -105
- package/dist/lib/codec/headers/IEC104_U_Frame.d.ts +0 -10
- package/dist/lib/codec/headers/IEC104_U_Frame.d.ts.map +0 -1
- package/dist/lib/codec/headers/IEC104_U_Frame.js +0 -155
- package/dist/lib/codec/headers/IEC61850SampledValues.d.ts +0 -13
- package/dist/lib/codec/headers/IEC61850SampledValues.d.ts.map +0 -1
- package/dist/lib/codec/headers/IEC61850SampledValues.js +0 -370
- package/dist/lib/codec/headers/IPv4.d.ts +0 -16
- package/dist/lib/codec/headers/IPv4.d.ts.map +0 -1
- package/dist/lib/codec/headers/IPv4.js +0 -339
- package/dist/lib/codec/headers/IPv6.d.ts +0 -10
- package/dist/lib/codec/headers/IPv6.d.ts.map +0 -1
- package/dist/lib/codec/headers/IPv6.js +0 -177
- package/dist/lib/codec/headers/IPv6HopByHopOptions.d.ts +0 -71
- package/dist/lib/codec/headers/IPv6HopByHopOptions.d.ts.map +0 -1
- package/dist/lib/codec/headers/IPv6HopByHopOptions.js +0 -497
- package/dist/lib/codec/headers/RawData.d.ts +0 -11
- package/dist/lib/codec/headers/RawData.d.ts.map +0 -1
- package/dist/lib/codec/headers/RawData.js +0 -36
- package/dist/lib/codec/headers/TCP.d.ts +0 -16
- package/dist/lib/codec/headers/TCP.d.ts.map +0 -1
- package/dist/lib/codec/headers/TCP.js +0 -899
- package/dist/lib/codec/headers/TLS_Alert.d.ts +0 -10
- package/dist/lib/codec/headers/TLS_Alert.d.ts.map +0 -1
- package/dist/lib/codec/headers/TLS_Alert.js +0 -624
- package/dist/lib/codec/headers/TLS_ApplicationData.d.ts +0 -10
- package/dist/lib/codec/headers/TLS_ApplicationData.d.ts.map +0 -1
- package/dist/lib/codec/headers/TLS_ApplicationData.js +0 -155
- package/dist/lib/codec/headers/TLS_ChangeCipherSpec.d.ts +0 -10
- package/dist/lib/codec/headers/TLS_ChangeCipherSpec.d.ts.map +0 -1
- package/dist/lib/codec/headers/TLS_ChangeCipherSpec.js +0 -154
- package/dist/lib/codec/headers/TLS_Handshake.d.ts +0 -10
- package/dist/lib/codec/headers/TLS_Handshake.d.ts.map +0 -1
- package/dist/lib/codec/headers/TLS_Handshake.js +0 -339
- package/dist/lib/codec/headers/TLS_Heartbeat.d.ts +0 -10
- package/dist/lib/codec/headers/TLS_Heartbeat.d.ts.map +0 -1
- package/dist/lib/codec/headers/TLS_Heartbeat.js +0 -206
- package/dist/lib/codec/headers/UDP.d.ts +0 -16
- package/dist/lib/codec/headers/UDP.d.ts.map +0 -1
- package/dist/lib/codec/headers/UDP.js +0 -192
- package/dist/lib/codec/headers/VLAN_802dot1Q.d.ts +0 -10
- package/dist/lib/codec/headers/VLAN_802dot1Q.d.ts.map +0 -1
- package/dist/lib/codec/headers/VLAN_802dot1Q.js +0 -82
- package/dist/lib/codec/lib/FlexibleObject.d.ts +0 -28
- package/dist/lib/codec/lib/FlexibleObject.d.ts.map +0 -1
- package/dist/lib/codec/lib/FlexibleObject.js +0 -102
- package/dist/lib/codec/lib/GetBERIntegerLengthFromBuffer.d.ts +0 -7
- package/dist/lib/codec/lib/GetBERIntegerLengthFromBuffer.d.ts.map +0 -1
- package/dist/lib/codec/lib/GetBERIntegerLengthFromBuffer.js +0 -16
- package/dist/lib/codec/lib/ProcessPacketPostHandlers.d.ts +0 -14
- package/dist/lib/codec/lib/ProcessPacketPostHandlers.d.ts.map +0 -1
- package/dist/lib/codec/lib/ProcessPacketPostHandlers.js +0 -53
- package/dist/lib/codec/lib/SortPostHandlers.d.ts +0 -8
- package/dist/lib/codec/lib/SortPostHandlers.d.ts.map +0 -1
- package/dist/lib/codec/lib/SortPostHandlers.js +0 -11
- package/dist/lib/codec/lib/StringContentEncodingEnum.d.ts +0 -11
- package/dist/lib/codec/lib/StringContentEncodingEnum.d.ts.map +0 -1
- package/dist/lib/codec/lib/StringContentEncodingEnum.js +0 -14
- package/dist/lib/codec/types/CodecData.d.ts +0 -7
- package/dist/lib/codec/types/CodecData.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecData.js +0 -2
- package/dist/lib/codec/types/CodecDecodeResult.d.ts +0 -11
- package/dist/lib/codec/types/CodecDecodeResult.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecDecodeResult.js +0 -2
- package/dist/lib/codec/types/CodecEncodeInput.d.ts +0 -9
- package/dist/lib/codec/types/CodecEncodeInput.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecEncodeInput.js +0 -2
- package/dist/lib/codec/types/CodecEncodeResult.d.ts +0 -6
- package/dist/lib/codec/types/CodecEncodeResult.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecEncodeResult.js +0 -2
- package/dist/lib/codec/types/CodecErrorInfo.d.ts +0 -6
- package/dist/lib/codec/types/CodecErrorInfo.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecErrorInfo.js +0 -2
- package/dist/lib/codec/types/CodecModule.d.ts +0 -3
- package/dist/lib/codec/types/CodecModule.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecModule.js +0 -2
- package/dist/lib/codec/types/CodecModuleConstructor.d.ts +0 -3
- package/dist/lib/codec/types/CodecModuleConstructor.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecModuleConstructor.js +0 -2
- package/dist/lib/codec/types/CodecSchema.d.ts +0 -7
- package/dist/lib/codec/types/CodecSchema.d.ts.map +0 -1
- package/dist/lib/codec/types/CodecSchema.js +0 -2
- package/dist/lib/codec/types/HeaderTreeNode.d.ts +0 -5
- package/dist/lib/codec/types/HeaderTreeNode.d.ts.map +0 -1
- package/dist/lib/codec/types/HeaderTreeNode.js +0 -2
- package/dist/lib/codec/types/PostHandlerItem.d.ts +0 -5
- package/dist/lib/codec/types/PostHandlerItem.d.ts.map +0 -1
- package/dist/lib/codec/types/PostHandlerItem.js +0 -2
- package/dist/lib/helper/BufferToHex.d.ts +0 -2
- package/dist/lib/helper/BufferToHex.d.ts.map +0 -1
- package/dist/lib/helper/BufferToHex.js +0 -6
- package/dist/lib/helper/BufferToIP.d.ts +0 -13
- package/dist/lib/helper/BufferToIP.d.ts.map +0 -1
- package/dist/lib/helper/BufferToIP.js +0 -21
- package/dist/lib/helper/BufferToNumber.d.ts +0 -10
- package/dist/lib/helper/BufferToNumber.d.ts.map +0 -1
- package/dist/lib/helper/BufferToNumber.js +0 -22
- package/dist/lib/helper/HexToBuffer.d.ts +0 -8
- package/dist/lib/helper/HexToBuffer.d.ts.map +0 -1
- package/dist/lib/helper/HexToBuffer.js +0 -27
- package/dist/lib/helper/HexToNumber.d.ts +0 -10
- package/dist/lib/helper/HexToNumber.d.ts.map +0 -1
- package/dist/lib/helper/HexToNumber.js +0 -39
- package/dist/lib/helper/IPToBuffer.d.ts +0 -13
- package/dist/lib/helper/IPToBuffer.d.ts.map +0 -1
- package/dist/lib/helper/IPToBuffer.js +0 -28
- package/dist/lib/helper/NumberToBERBuffer.d.ts +0 -10
- package/dist/lib/helper/NumberToBERBuffer.d.ts.map +0 -1
- package/dist/lib/helper/NumberToBERBuffer.js +0 -22
- package/dist/lib/helper/NumberToBERHex.d.ts +0 -10
- package/dist/lib/helper/NumberToBERHex.d.ts.map +0 -1
- package/dist/lib/helper/NumberToBERHex.js +0 -27
- package/dist/lib/helper/NumberToBuffer.d.ts +0 -10
- package/dist/lib/helper/NumberToBuffer.d.ts.map +0 -1
- package/dist/lib/helper/NumberToBuffer.js +0 -22
- package/dist/lib/helper/NumberToHex.d.ts +0 -10
- package/dist/lib/helper/NumberToHex.d.ts.map +0 -1
- package/dist/lib/helper/NumberToHex.js +0 -26
- package/dist/lib/nodepcap/Capture.d.ts +0 -81
- package/dist/lib/nodepcap/Capture.d.ts.map +0 -1
- package/dist/lib/nodepcap/Capture.js +0 -323
- package/dist/lib/nodepcap/GetNetworkInterfaces.d.ts +0 -7
- package/dist/lib/nodepcap/GetNetworkInterfaces.d.ts.map +0 -1
- package/dist/lib/nodepcap/GetNetworkInterfaces.js +0 -22
- package/dist/lib/nodepcap/interfaces/IBindingCapture.d.ts +0 -16
- package/dist/lib/nodepcap/interfaces/IBindingCapture.d.ts.map +0 -1
- package/dist/lib/nodepcap/interfaces/IBindingCapture.js +0 -2
- package/dist/lib/nodepcap/interfaces/IBindingCaptureOptions.d.ts +0 -5
- package/dist/lib/nodepcap/interfaces/IBindingCaptureOptions.d.ts.map +0 -1
- package/dist/lib/nodepcap/interfaces/IBindingCaptureOptions.js +0 -2
- package/dist/lib/nodepcap/interfaces/ICaptureOptions.d.ts +0 -23
- package/dist/lib/nodepcap/interfaces/ICaptureOptions.d.ts.map +0 -1
- package/dist/lib/nodepcap/interfaces/ICaptureOptions.js +0 -2
- package/dist/lib/nodepcap/interfaces/INetworkInterface.d.ts +0 -5
- package/dist/lib/nodepcap/interfaces/INetworkInterface.d.ts.map +0 -1
- package/dist/lib/nodepcap/interfaces/INetworkInterface.js +0 -2
- package/dist/lib/nodepcap/lib/BindingCapture.d.ts +0 -15
- package/dist/lib/nodepcap/lib/BindingCapture.d.ts.map +0 -1
- package/dist/lib/nodepcap/lib/BindingCapture.js +0 -35
- package/dist/lib/nodepcap/lib/GetNodePcapBinding.d.ts +0 -2
- package/dist/lib/nodepcap/lib/GetNodePcapBinding.d.ts.map +0 -1
- package/dist/lib/nodepcap/lib/GetNodePcapBinding.js +0 -55
- package/dist/lib/nodepcap/lib/GetNodePcapBindingCapture.d.ts +0 -3
- package/dist/lib/nodepcap/lib/GetNodePcapBindingCapture.d.ts.map +0 -1
- package/dist/lib/nodepcap/lib/GetNodePcapBindingCapture.js +0 -18
- package/dist/lib/nodepcap/workers/CaptureWorker.d.ts +0 -2
- package/dist/lib/nodepcap/workers/CaptureWorker.d.ts.map +0 -1
- package/dist/lib/nodepcap/workers/CaptureWorker.js +0 -25
- package/dist/lib/pcap/PCAPGenerator.d.ts +0 -34
- package/dist/lib/pcap/PCAPGenerator.d.ts.map +0 -1
- package/dist/lib/pcap/PCAPGenerator.js +0 -101
- package/dist/lib/pcap/PcapParser.d.ts +0 -27
- package/dist/lib/pcap/PcapParser.d.ts.map +0 -1
- package/dist/lib/pcap/PcapParser.js +0 -149
- package/dist/lib/pcap/PcapReader.d.ts +0 -112
- package/dist/lib/pcap/PcapReader.d.ts.map +0 -1
- package/dist/lib/pcap/PcapReader.js +0 -263
- package/dist/lib/pcap/PcapWriter.d.ts +0 -29
- package/dist/lib/pcap/PcapWriter.d.ts.map +0 -1
- package/dist/lib/pcap/PcapWriter.js +0 -86
- package/dist/lib/pcap/interfaces/IPcapPacketInfo.d.ts +0 -13
- package/dist/lib/pcap/interfaces/IPcapPacketInfo.d.ts.map +0 -1
- package/dist/lib/pcap/interfaces/IPcapPacketInfo.js +0 -2
- package/dist/lib/pipe/PipeClient.d.ts +0 -35
- package/dist/lib/pipe/PipeClient.d.ts.map +0 -1
- package/dist/lib/pipe/PipeClient.js +0 -71
- package/dist/lib/pipe/PipeClientSocket.d.ts +0 -39
- package/dist/lib/pipe/PipeClientSocket.d.ts.map +0 -1
- package/dist/lib/pipe/PipeClientSocket.js +0 -82
- package/dist/lib/pipe/PipeMessage.d.ts +0 -27
- package/dist/lib/pipe/PipeMessage.d.ts.map +0 -1
- package/dist/lib/pipe/PipeMessage.js +0 -61
- package/dist/lib/pipe/PipeMessageHandler.d.ts +0 -16
- package/dist/lib/pipe/PipeMessageHandler.d.ts.map +0 -1
- package/dist/lib/pipe/PipeMessageHandler.js +0 -95
- package/dist/lib/pipe/PipeServer.d.ts +0 -25
- package/dist/lib/pipe/PipeServer.d.ts.map +0 -1
- package/dist/lib/pipe/PipeServer.js +0 -59
- package/dist/lib/schema/ProtocolFieldJSONSchema.d.ts +0 -35
- package/dist/lib/schema/ProtocolFieldJSONSchema.d.ts.map +0 -1
- package/dist/lib/schema/ProtocolFieldJSONSchema.js +0 -2
- package/dist/lib/schema/ProtocolFieldJSONSchemaDefinition.d.ts +0 -3
- package/dist/lib/schema/ProtocolFieldJSONSchemaDefinition.d.ts.map +0 -1
- package/dist/lib/schema/ProtocolFieldJSONSchemaDefinition.js +0 -2
- package/dist/lib/schema/ProtocolJSONSchema.d.ts +0 -32
- package/dist/lib/schema/ProtocolJSONSchema.d.ts.map +0 -1
- package/dist/lib/schema/ProtocolJSONSchema.js +0 -2
- package/dist/tests/Test.spec.d.ts +0 -2
- package/dist/tests/Test.spec.d.ts.map +0 -1
- package/dist/tests/Test.spec.js +0 -25
- package/dist/tests/units/CaptureTest.spec.d.ts +0 -2
- package/dist/tests/units/CaptureTest.spec.d.ts.map +0 -1
- package/dist/tests/units/CaptureTest.spec.js +0 -32
- package/dist/tests/units/Codec.spec.d.ts +0 -2
- package/dist/tests/units/Codec.spec.d.ts.map +0 -1
- package/dist/tests/units/Codec.spec.js +0 -86
- package/dist/tests/units/ReadPCAP.spec.d.ts +0 -2
- package/dist/tests/units/ReadPCAP.spec.d.ts.map +0 -1
- package/dist/tests/units/ReadPCAP.spec.js +0 -14
- package/src/CodecExports.ts +0 -33
- package/src/CodecHeaderExports.ts +0 -1
- package/src/HelperExports.ts +0 -78
- package/src/NetworkExports.ts +0 -12
- package/src/PcapExports.ts +0 -32
- package/src/errors/ActionNotFoundError.ts +0 -6
- package/src/errors/CodecSchemaValidateError.ts +0 -6
- package/src/errors/DeviceNotFoundError.ts +0 -6
- package/src/errors/NoAvailableCodecError.ts +0 -6
- package/src/errors/NpcapLoadError.ts +0 -6
- package/src/errors/SocketDownError.ts +0 -6
- package/src/errors/UnknownPipeMessageTypeError.ts +0 -6
- package/src/errors/common/ErrorCode.ts +0 -30
- package/src/lib/GeneratePipeAddress.ts +0 -17
- package/src/lib/GetBinding.ts +0 -3
- package/src/lib/GetCaptureTemporaryDirectory.ts +0 -12
- package/src/lib/GetDeviceCaptureTemporaryFilename.ts +0 -13
- package/src/lib/codec/Codec.ts +0 -164
- package/src/lib/codec/PacketHeaders.ts +0 -23
- package/src/lib/codec/abstracts/BaseHeader.ts +0 -435
- package/src/lib/codec/headers/ARP.ts +0 -220
- package/src/lib/codec/headers/EthernetII.ts +0 -79
- package/src/lib/codec/headers/Goose.ts +0 -1003
- package/src/lib/codec/headers/ICMP.ts +0 -151
- package/src/lib/codec/headers/ICMPv6.ts +0 -128
- package/src/lib/codec/headers/IEC104_I_Frame.ts +0 -7373
- package/src/lib/codec/headers/IEC104_S_Frame.ts +0 -97
- package/src/lib/codec/headers/IEC104_U_Frame.ts +0 -139
- package/src/lib/codec/headers/IEC61850SampledValues.ts +0 -361
- package/src/lib/codec/headers/IPv4.ts +0 -331
- package/src/lib/codec/headers/IPv6.ts +0 -176
- package/src/lib/codec/headers/IPv6HopByHopOptions.ts +0 -532
- package/src/lib/codec/headers/RawData.ts +0 -38
- package/src/lib/codec/headers/TCP.ts +0 -934
- package/src/lib/codec/headers/TLS_Alert.ts +0 -539
- package/src/lib/codec/headers/TLS_ApplicationData.ts +0 -145
- package/src/lib/codec/headers/TLS_ChangeCipherSpec.ts +0 -146
- package/src/lib/codec/headers/TLS_Handshake.ts +0 -313
- package/src/lib/codec/headers/TLS_Heartbeat.ts +0 -188
- package/src/lib/codec/headers/UDP.ts +0 -182
- package/src/lib/codec/headers/VLAN_802dot1Q.ts +0 -79
- package/src/lib/codec/lib/FlexibleObject.ts +0 -100
- package/src/lib/codec/lib/GetBERIntegerLengthFromBuffer.ts +0 -12
- package/src/lib/codec/lib/ProcessPacketPostHandlers.ts +0 -53
- package/src/lib/codec/lib/SortPostHandlers.ts +0 -10
- package/src/lib/codec/lib/StringContentEncodingEnum.ts +0 -10
- package/src/lib/codec/types/CodecData.ts +0 -7
- package/src/lib/codec/types/CodecDecodeResult.ts +0 -11
- package/src/lib/codec/types/CodecEncodeInput.ts +0 -9
- package/src/lib/codec/types/CodecEncodeResult.ts +0 -6
- package/src/lib/codec/types/CodecErrorInfo.ts +0 -5
- package/src/lib/codec/types/CodecModule.ts +0 -3
- package/src/lib/codec/types/CodecModuleConstructor.ts +0 -3
- package/src/lib/codec/types/CodecSchema.ts +0 -7
- package/src/lib/codec/types/HeaderTreeNode.ts +0 -5
- package/src/lib/codec/types/PostHandlerItem.ts +0 -4
- package/src/lib/helper/BufferToHex.ts +0 -3
- package/src/lib/helper/BufferToIP.ts +0 -19
- package/src/lib/helper/BufferToNumber.ts +0 -31
- package/src/lib/helper/HexToBuffer.ts +0 -22
- package/src/lib/helper/HexToNumber.ts +0 -25
- package/src/lib/helper/IPToBuffer.ts +0 -25
- package/src/lib/helper/NumberToBERBuffer.ts +0 -21
- package/src/lib/helper/NumberToBERHex.ts +0 -17
- package/src/lib/helper/NumberToBuffer.ts +0 -21
- package/src/lib/helper/NumberToHex.ts +0 -15
- package/src/lib/nodepcap/Capture.ts +0 -304
- package/src/lib/nodepcap/GetNetworkInterfaces.ts +0 -18
- package/src/lib/nodepcap/interfaces/IBindingCapture.ts +0 -27
- package/src/lib/nodepcap/interfaces/IBindingCaptureOptions.ts +0 -4
- package/src/lib/nodepcap/interfaces/ICaptureOptions.ts +0 -24
- package/src/lib/nodepcap/interfaces/INetworkInterface.ts +0 -4
- package/src/lib/nodepcap/lib/BindingCapture.ts +0 -46
- package/src/lib/nodepcap/lib/GetNodePcapBinding.ts +0 -17
- package/src/lib/nodepcap/lib/GetNodePcapBindingCapture.ts +0 -15
- package/src/lib/nodepcap/workers/CaptureWorker.ts +0 -30
- package/src/lib/pcap/PCAPGenerator.ts +0 -123
- package/src/lib/pcap/PcapParser.ts +0 -170
- package/src/lib/pcap/PcapReader.ts +0 -306
- package/src/lib/pcap/PcapWriter.ts +0 -98
- package/src/lib/pcap/interfaces/IPcapPacketInfo.ts +0 -12
- package/src/lib/pipe/PipeClient.ts +0 -91
- package/src/lib/pipe/PipeClientSocket.ts +0 -99
- package/src/lib/pipe/PipeMessage.ts +0 -74
- package/src/lib/pipe/PipeMessageHandler.ts +0 -91
- package/src/lib/pipe/PipeServer.ts +0 -74
- package/src/lib/schema/ProtocolFieldJSONSchema.ts +0 -45
- package/src/lib/schema/ProtocolFieldJSONSchemaDefinition.ts +0 -3
- package/src/lib/schema/ProtocolJSONSchema.ts +0 -37
- package/src/tests/Test.spec.ts +0 -22
- package/src/tests/units/CaptureTest.spec.ts +0 -31
- package/src/tests/units/Codec.spec.ts +0 -102
- package/src/tests/units/ReadPCAP.spec.ts +0 -13
- package/test.pcap +0 -0
- package/tsconfig.json +0 -42
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ProtocolJSONSchema } from '../../schema/ProtocolJSONSchema';
|
|
2
|
-
import { BaseHeader } from '../abstracts/BaseHeader';
|
|
3
|
-
export declare class TLS_Alert extends BaseHeader {
|
|
4
|
-
SCHEMA: ProtocolJSONSchema;
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
nickname: string;
|
|
8
|
-
match(): boolean;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=TLS_Alert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TLS_Alert.d.ts","sourceRoot":"","sources":["../../../../src/lib/codec/headers/TLS_Alert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAA;AAiDlD,qBAAa,SAAU,SAAQ,UAAU;IAC9B,MAAM,EAAE,kBAAkB,CA0dhC;IACM,EAAE,EAAE,MAAM,CAAc;IACxB,IAAI,EAAE,MAAM,CAA6C;IACzD,QAAQ,EAAE,MAAM,CAAc;IAE9B,KAAK,IAAI,OAAO;CAQ1B"}
|
|
@@ -1,624 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TLS_Alert = void 0;
|
|
4
|
-
const BaseHeader_1 = require("../abstracts/BaseHeader");
|
|
5
|
-
const BufferToNumber_1 = require("../../helper/BufferToNumber");
|
|
6
|
-
const NumberToBuffer_1 = require("../../helper/NumberToBuffer");
|
|
7
|
-
var TLSver;
|
|
8
|
-
(function (TLSver) {
|
|
9
|
-
TLSver["SSL_3_0"] = "SSL3.0";
|
|
10
|
-
TLSver["TLS_1_0"] = "TLS1.0";
|
|
11
|
-
TLSver["TLS_1_1"] = "TLS1.1";
|
|
12
|
-
TLSver["TLS_1_2"] = "TLS1.2";
|
|
13
|
-
TLSver["TLS_1_3"] = "TLS1.3";
|
|
14
|
-
})(TLSver || (TLSver = {}));
|
|
15
|
-
var Description_type;
|
|
16
|
-
(function (Description_type) {
|
|
17
|
-
Description_type["code_0"] = "Close notify";
|
|
18
|
-
Description_type["code_10"] = "Unexpected message";
|
|
19
|
-
Description_type["code_20"] = "Bad record MAC";
|
|
20
|
-
Description_type["code_21"] = "Decryption failed";
|
|
21
|
-
Description_type["code_22"] = "Record overflow";
|
|
22
|
-
Description_type["code_30"] = "Decompression failure";
|
|
23
|
-
Description_type["code_40"] = "Handshake failure";
|
|
24
|
-
Description_type["code_41"] = "No certificate";
|
|
25
|
-
Description_type["code_42"] = "Bad certificate";
|
|
26
|
-
Description_type["code_43"] = "Unsupported certificate";
|
|
27
|
-
Description_type["code_44"] = "Certificate revoked";
|
|
28
|
-
Description_type["code_45"] = "Certificate expired";
|
|
29
|
-
Description_type["code_46"] = "Certificate unknown";
|
|
30
|
-
Description_type["code_47"] = "Illegal parameter";
|
|
31
|
-
Description_type["code_48"] = "Unknown CA (Certificate authority)";
|
|
32
|
-
Description_type["code_49"] = "Access denied";
|
|
33
|
-
Description_type["code_50"] = "Decode error";
|
|
34
|
-
Description_type["code_51"] = "Decrypt error";
|
|
35
|
-
Description_type["code_60"] = "Export restriction";
|
|
36
|
-
Description_type["code_70"] = "Protocol version";
|
|
37
|
-
Description_type["code_71"] = "Insufficient security";
|
|
38
|
-
Description_type["code_80"] = "Internal error";
|
|
39
|
-
Description_type["code_86"] = "Inappropriate fallback";
|
|
40
|
-
Description_type["code_90"] = "User canceled";
|
|
41
|
-
Description_type["code_100"] = "No renegotiation";
|
|
42
|
-
Description_type["code_110"] = "Unsupported extension";
|
|
43
|
-
Description_type["code_111"] = "Certificate unobtainable";
|
|
44
|
-
Description_type["code_112"] = "Unrecognized name";
|
|
45
|
-
Description_type["code_113"] = "Bad certificate status response";
|
|
46
|
-
Description_type["code_114"] = "Bad certificate hash value\t ";
|
|
47
|
-
Description_type["code_115"] = "Unknown PSK identity (used in TLS-PSK and TLS-SRP)";
|
|
48
|
-
Description_type["code_116"] = "Certificate required";
|
|
49
|
-
Description_type["code_120"] = "No application protocol";
|
|
50
|
-
Description_type["code_255"] = "No application protocol";
|
|
51
|
-
})(Description_type || (Description_type = {}));
|
|
52
|
-
class TLS_Alert extends BaseHeader_1.BaseHeader {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(...arguments);
|
|
55
|
-
this.SCHEMA = {
|
|
56
|
-
type: 'object',
|
|
57
|
-
properties: {
|
|
58
|
-
contentType: {
|
|
59
|
-
type: 'integer',
|
|
60
|
-
label: 'Content Type',
|
|
61
|
-
minimum: 0,
|
|
62
|
-
maximum: 65535,
|
|
63
|
-
decode: () => {
|
|
64
|
-
this.instance.contentType.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(0, 1)));
|
|
65
|
-
},
|
|
66
|
-
encode: () => {
|
|
67
|
-
const contentTyppe = this.instance.contentType.getValue(0, (nodePath) => this.recordError(nodePath, 'Not found'));
|
|
68
|
-
this.writeBytes(0, (0, NumberToBuffer_1.UInt8ToBuffer)(contentTyppe));
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
version: {
|
|
72
|
-
type: 'string',
|
|
73
|
-
label: 'Legacy Version',
|
|
74
|
-
minimum: 0,
|
|
75
|
-
maximum: 65535,
|
|
76
|
-
decode: () => {
|
|
77
|
-
this.instance.version.setValue((0, BufferToNumber_1.BufferToUInt16)(this.readBytes(1, 2)));
|
|
78
|
-
const version = this.instance.version.getValue(0, (nodePath) => this.recordError(nodePath, 'Not Found'));
|
|
79
|
-
switch (version) {
|
|
80
|
-
case 768:
|
|
81
|
-
{
|
|
82
|
-
this.instance.version.setValue(TLSver.SSL_3_0);
|
|
83
|
-
}
|
|
84
|
-
break;
|
|
85
|
-
case 769:
|
|
86
|
-
{
|
|
87
|
-
this.instance.version.setValue(TLSver.TLS_1_0);
|
|
88
|
-
}
|
|
89
|
-
break;
|
|
90
|
-
case 770:
|
|
91
|
-
{
|
|
92
|
-
this.instance.version.setValue(TLSver.TLS_1_1);
|
|
93
|
-
}
|
|
94
|
-
break;
|
|
95
|
-
case 771:
|
|
96
|
-
{
|
|
97
|
-
this.instance.version.setValue(TLSver.TLS_1_2);
|
|
98
|
-
}
|
|
99
|
-
break;
|
|
100
|
-
case 772:
|
|
101
|
-
{
|
|
102
|
-
this.instance.version.setValue(TLSver.TLS_1_3);
|
|
103
|
-
}
|
|
104
|
-
break;
|
|
105
|
-
default: {
|
|
106
|
-
this.instance.version.setValue('0');
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
encode: () => {
|
|
111
|
-
const version = this.instance.version.getValue('0', (nodePath) => this.recordError(nodePath, 'Not found'));
|
|
112
|
-
switch (version) {
|
|
113
|
-
case TLSver.SSL_3_0:
|
|
114
|
-
{
|
|
115
|
-
const version = (0, NumberToBuffer_1.UInt16ToBuffer)(768);
|
|
116
|
-
this.writeBytes(1, version);
|
|
117
|
-
}
|
|
118
|
-
break;
|
|
119
|
-
case TLSver.TLS_1_0:
|
|
120
|
-
{
|
|
121
|
-
const version = (0, NumberToBuffer_1.UInt16ToBuffer)(769);
|
|
122
|
-
this.writeBytes(1, version);
|
|
123
|
-
}
|
|
124
|
-
break;
|
|
125
|
-
case TLSver.TLS_1_1:
|
|
126
|
-
{
|
|
127
|
-
const version = (0, NumberToBuffer_1.UInt16ToBuffer)(770);
|
|
128
|
-
this.writeBytes(1, version);
|
|
129
|
-
}
|
|
130
|
-
break;
|
|
131
|
-
case TLSver.TLS_1_2:
|
|
132
|
-
{
|
|
133
|
-
const version = (0, NumberToBuffer_1.UInt16ToBuffer)(771);
|
|
134
|
-
this.writeBytes(1, version);
|
|
135
|
-
}
|
|
136
|
-
break;
|
|
137
|
-
case TLSver.TLS_1_3:
|
|
138
|
-
{
|
|
139
|
-
const version = (0, NumberToBuffer_1.UInt16ToBuffer)(772);
|
|
140
|
-
this.writeBytes(1, version);
|
|
141
|
-
}
|
|
142
|
-
break;
|
|
143
|
-
default: {
|
|
144
|
-
this.writeBytes(1, (0, NumberToBuffer_1.UInt16ToBuffer)(0));
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
length: {
|
|
150
|
-
type: 'integer',
|
|
151
|
-
label: 'Legacy Version',
|
|
152
|
-
minimum: 0,
|
|
153
|
-
maximum: 255,
|
|
154
|
-
decode: () => {
|
|
155
|
-
this.instance.length.setValue((0, BufferToNumber_1.BufferToUInt16)(this.readBytes(3, 2)));
|
|
156
|
-
},
|
|
157
|
-
encode: () => {
|
|
158
|
-
const length = (0, NumberToBuffer_1.UInt16ToBuffer)(this.instance.length.getValue(0, (nodePath) => this.recordError(nodePath, 'Not found')));
|
|
159
|
-
this.writeBytes(3, length);
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
levelType: {
|
|
163
|
-
type: 'string',
|
|
164
|
-
label: 'Alert Level Type ',
|
|
165
|
-
minimum: 0,
|
|
166
|
-
maximum: 255,
|
|
167
|
-
decode: () => {
|
|
168
|
-
this.instance.levelType.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(5, 1)));
|
|
169
|
-
const type = this.instance.levelType.getValue(0, (nodePath) => this.recordError(nodePath, 'Not found'));
|
|
170
|
-
switch (type) {
|
|
171
|
-
case 1:
|
|
172
|
-
{
|
|
173
|
-
this.instance.levelType.setValue('Warning');
|
|
174
|
-
}
|
|
175
|
-
break;
|
|
176
|
-
case 2:
|
|
177
|
-
{
|
|
178
|
-
this.instance.levelType.setValue('Fatal');
|
|
179
|
-
}
|
|
180
|
-
break;
|
|
181
|
-
default: {
|
|
182
|
-
this.instance.levelType.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(5, 1)));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
encode: () => {
|
|
187
|
-
const type = this.instance.levelType.getValue('0', (nodePath) => this.recordError(nodePath, 'Not found'));
|
|
188
|
-
switch (type) {
|
|
189
|
-
case 'Warning':
|
|
190
|
-
{
|
|
191
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(1);
|
|
192
|
-
this.writeBytes(5, type);
|
|
193
|
-
}
|
|
194
|
-
break;
|
|
195
|
-
case 'Fatal':
|
|
196
|
-
{
|
|
197
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(2);
|
|
198
|
-
this.writeBytes(5, type);
|
|
199
|
-
}
|
|
200
|
-
break;
|
|
201
|
-
default: {
|
|
202
|
-
const type1 = parseInt(type, 10);
|
|
203
|
-
this.writeBytes(5, (0, NumberToBuffer_1.UInt8ToBuffer)(type1));
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
descriptionType: {
|
|
209
|
-
type: 'string',
|
|
210
|
-
label: 'Alert Description Types',
|
|
211
|
-
minimum: 0,
|
|
212
|
-
maximum: 255,
|
|
213
|
-
decode: () => {
|
|
214
|
-
this.instance.descriptionType.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(6, 1)));
|
|
215
|
-
const type = this.instance.descriptionType.getValue(0, (nodePath) => this.recordError(nodePath, 'Not found'));
|
|
216
|
-
switch (type) {
|
|
217
|
-
case 0:
|
|
218
|
-
{
|
|
219
|
-
this.instance.descriptionType.setValue(Description_type.code_0);
|
|
220
|
-
}
|
|
221
|
-
break;
|
|
222
|
-
case 10:
|
|
223
|
-
{
|
|
224
|
-
this.instance.descriptionType.setValue(Description_type.code_10);
|
|
225
|
-
}
|
|
226
|
-
break;
|
|
227
|
-
case 20:
|
|
228
|
-
{
|
|
229
|
-
this.instance.descriptionType.setValue(Description_type.code_20);
|
|
230
|
-
}
|
|
231
|
-
break;
|
|
232
|
-
case 21:
|
|
233
|
-
{
|
|
234
|
-
this.instance.descriptionType.setValue(Description_type.code_21);
|
|
235
|
-
}
|
|
236
|
-
break;
|
|
237
|
-
case 22:
|
|
238
|
-
{
|
|
239
|
-
this.instance.descriptionType.setValue(Description_type.code_22);
|
|
240
|
-
}
|
|
241
|
-
break;
|
|
242
|
-
case 30:
|
|
243
|
-
{
|
|
244
|
-
this.instance.descriptionType.setValue(Description_type.code_30);
|
|
245
|
-
}
|
|
246
|
-
break;
|
|
247
|
-
case 40:
|
|
248
|
-
{
|
|
249
|
-
this.instance.descriptionType.setValue(Description_type.code_40);
|
|
250
|
-
}
|
|
251
|
-
break;
|
|
252
|
-
case 41:
|
|
253
|
-
{
|
|
254
|
-
this.instance.descriptionType.setValue(Description_type.code_41);
|
|
255
|
-
}
|
|
256
|
-
break;
|
|
257
|
-
case 42:
|
|
258
|
-
{
|
|
259
|
-
this.instance.descriptionType.setValue(Description_type.code_42);
|
|
260
|
-
}
|
|
261
|
-
break;
|
|
262
|
-
case 43:
|
|
263
|
-
{
|
|
264
|
-
this.instance.descriptionType.setValue(Description_type.code_43);
|
|
265
|
-
}
|
|
266
|
-
break;
|
|
267
|
-
case 44:
|
|
268
|
-
{
|
|
269
|
-
this.instance.descriptionType.setValue(Description_type.code_44);
|
|
270
|
-
}
|
|
271
|
-
break;
|
|
272
|
-
case 45:
|
|
273
|
-
{
|
|
274
|
-
this.instance.descriptionType.setValue(Description_type.code_45);
|
|
275
|
-
}
|
|
276
|
-
break;
|
|
277
|
-
case 46:
|
|
278
|
-
{
|
|
279
|
-
this.instance.descriptionType.setValue(Description_type.code_46);
|
|
280
|
-
}
|
|
281
|
-
break;
|
|
282
|
-
case 47:
|
|
283
|
-
{
|
|
284
|
-
this.instance.descriptionType.setValue(Description_type.code_47);
|
|
285
|
-
}
|
|
286
|
-
break;
|
|
287
|
-
case 48:
|
|
288
|
-
{
|
|
289
|
-
this.instance.descriptionType.setValue(Description_type.code_48);
|
|
290
|
-
}
|
|
291
|
-
break;
|
|
292
|
-
case 49:
|
|
293
|
-
{
|
|
294
|
-
this.instance.descriptionType.setValue(Description_type.code_49);
|
|
295
|
-
}
|
|
296
|
-
break;
|
|
297
|
-
case 50:
|
|
298
|
-
{
|
|
299
|
-
this.instance.descriptionType.setValue(Description_type.code_50);
|
|
300
|
-
}
|
|
301
|
-
break;
|
|
302
|
-
case 51:
|
|
303
|
-
{
|
|
304
|
-
this.instance.descriptionType.setValue(Description_type.code_51);
|
|
305
|
-
}
|
|
306
|
-
break;
|
|
307
|
-
case 60:
|
|
308
|
-
{
|
|
309
|
-
this.instance.descriptionType.setValue(Description_type.code_60);
|
|
310
|
-
}
|
|
311
|
-
break;
|
|
312
|
-
case 70:
|
|
313
|
-
{
|
|
314
|
-
this.instance.descriptionType.setValue(Description_type.code_70);
|
|
315
|
-
}
|
|
316
|
-
break;
|
|
317
|
-
case 71:
|
|
318
|
-
{
|
|
319
|
-
this.instance.descriptionType.setValue(Description_type.code_71);
|
|
320
|
-
}
|
|
321
|
-
break;
|
|
322
|
-
case 80:
|
|
323
|
-
{
|
|
324
|
-
this.instance.descriptionType.setValue(Description_type.code_80);
|
|
325
|
-
}
|
|
326
|
-
break;
|
|
327
|
-
case 86:
|
|
328
|
-
{
|
|
329
|
-
this.instance.descriptionType.setValue(Description_type.code_86);
|
|
330
|
-
}
|
|
331
|
-
break;
|
|
332
|
-
case 90:
|
|
333
|
-
{
|
|
334
|
-
this.instance.descriptionType.setValue(Description_type.code_90);
|
|
335
|
-
}
|
|
336
|
-
break;
|
|
337
|
-
case 100:
|
|
338
|
-
{
|
|
339
|
-
this.instance.descriptionType.setValue(Description_type.code_100);
|
|
340
|
-
}
|
|
341
|
-
break;
|
|
342
|
-
case 110:
|
|
343
|
-
{
|
|
344
|
-
this.instance.descriptionType.setValue(Description_type.code_110);
|
|
345
|
-
}
|
|
346
|
-
break;
|
|
347
|
-
case 111:
|
|
348
|
-
{
|
|
349
|
-
this.instance.descriptionType.setValue(Description_type.code_111);
|
|
350
|
-
}
|
|
351
|
-
break;
|
|
352
|
-
case 112:
|
|
353
|
-
{
|
|
354
|
-
this.instance.descriptionType.setValue(Description_type.code_112);
|
|
355
|
-
}
|
|
356
|
-
break;
|
|
357
|
-
case 113:
|
|
358
|
-
{
|
|
359
|
-
this.instance.descriptionType.setValue(Description_type.code_113);
|
|
360
|
-
}
|
|
361
|
-
break;
|
|
362
|
-
case 114:
|
|
363
|
-
{
|
|
364
|
-
this.instance.descriptionType.setValue(Description_type.code_114);
|
|
365
|
-
}
|
|
366
|
-
break;
|
|
367
|
-
case 115:
|
|
368
|
-
{
|
|
369
|
-
this.instance.descriptionType.setValue(Description_type.code_115);
|
|
370
|
-
}
|
|
371
|
-
break;
|
|
372
|
-
case 116:
|
|
373
|
-
{
|
|
374
|
-
this.instance.descriptionType.setValue(Description_type.code_116);
|
|
375
|
-
}
|
|
376
|
-
break;
|
|
377
|
-
case 120:
|
|
378
|
-
{
|
|
379
|
-
this.instance.descriptionType.setValue(Description_type.code_120);
|
|
380
|
-
}
|
|
381
|
-
break;
|
|
382
|
-
case 255:
|
|
383
|
-
{
|
|
384
|
-
this.instance.descriptionType.setValue(Description_type.code_255);
|
|
385
|
-
}
|
|
386
|
-
break;
|
|
387
|
-
default: {
|
|
388
|
-
this.instance.descriptionType.setValue((0, BufferToNumber_1.BufferToUInt8)(this.readBytes(6, 1)));
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
},
|
|
392
|
-
encode: () => {
|
|
393
|
-
const type = this.instance.descriptionType.getValue('0', (nodePath) => this.recordError(nodePath, 'Not found'));
|
|
394
|
-
switch (type) {
|
|
395
|
-
case Description_type.code_0:
|
|
396
|
-
{
|
|
397
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(0);
|
|
398
|
-
this.writeBytes(6, type);
|
|
399
|
-
}
|
|
400
|
-
break;
|
|
401
|
-
case Description_type.code_10:
|
|
402
|
-
{
|
|
403
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(10);
|
|
404
|
-
this.writeBytes(6, type);
|
|
405
|
-
}
|
|
406
|
-
break;
|
|
407
|
-
case Description_type.code_20:
|
|
408
|
-
{
|
|
409
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(20);
|
|
410
|
-
this.writeBytes(6, type);
|
|
411
|
-
}
|
|
412
|
-
break;
|
|
413
|
-
case Description_type.code_21:
|
|
414
|
-
{
|
|
415
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(21);
|
|
416
|
-
this.writeBytes(6, type);
|
|
417
|
-
}
|
|
418
|
-
break;
|
|
419
|
-
case Description_type.code_22:
|
|
420
|
-
{
|
|
421
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(22);
|
|
422
|
-
this.writeBytes(6, type);
|
|
423
|
-
}
|
|
424
|
-
break;
|
|
425
|
-
case Description_type.code_30:
|
|
426
|
-
{
|
|
427
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(30);
|
|
428
|
-
this.writeBytes(6, type);
|
|
429
|
-
}
|
|
430
|
-
break;
|
|
431
|
-
case Description_type.code_40:
|
|
432
|
-
{
|
|
433
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(40);
|
|
434
|
-
this.writeBytes(6, type);
|
|
435
|
-
}
|
|
436
|
-
break;
|
|
437
|
-
case Description_type.code_41:
|
|
438
|
-
{
|
|
439
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(41);
|
|
440
|
-
this.writeBytes(6, type);
|
|
441
|
-
}
|
|
442
|
-
break;
|
|
443
|
-
case Description_type.code_42:
|
|
444
|
-
{
|
|
445
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(42);
|
|
446
|
-
this.writeBytes(6, type);
|
|
447
|
-
}
|
|
448
|
-
break;
|
|
449
|
-
case Description_type.code_43:
|
|
450
|
-
{
|
|
451
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(43);
|
|
452
|
-
this.writeBytes(6, type);
|
|
453
|
-
}
|
|
454
|
-
break;
|
|
455
|
-
case Description_type.code_44:
|
|
456
|
-
{
|
|
457
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(44);
|
|
458
|
-
this.writeBytes(6, type);
|
|
459
|
-
}
|
|
460
|
-
break;
|
|
461
|
-
case Description_type.code_45:
|
|
462
|
-
{
|
|
463
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(45);
|
|
464
|
-
this.writeBytes(6, type);
|
|
465
|
-
}
|
|
466
|
-
break;
|
|
467
|
-
case Description_type.code_46:
|
|
468
|
-
{
|
|
469
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(46);
|
|
470
|
-
this.writeBytes(6, type);
|
|
471
|
-
}
|
|
472
|
-
break;
|
|
473
|
-
case Description_type.code_47:
|
|
474
|
-
{
|
|
475
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(47);
|
|
476
|
-
this.writeBytes(6, type);
|
|
477
|
-
}
|
|
478
|
-
break;
|
|
479
|
-
case Description_type.code_48:
|
|
480
|
-
{
|
|
481
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(48);
|
|
482
|
-
this.writeBytes(6, type);
|
|
483
|
-
}
|
|
484
|
-
break;
|
|
485
|
-
case Description_type.code_49:
|
|
486
|
-
{
|
|
487
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(49);
|
|
488
|
-
this.writeBytes(6, type);
|
|
489
|
-
}
|
|
490
|
-
break;
|
|
491
|
-
case Description_type.code_50:
|
|
492
|
-
{
|
|
493
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(50);
|
|
494
|
-
this.writeBytes(6, type);
|
|
495
|
-
}
|
|
496
|
-
break;
|
|
497
|
-
case Description_type.code_51:
|
|
498
|
-
{
|
|
499
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(51);
|
|
500
|
-
this.writeBytes(6, type);
|
|
501
|
-
}
|
|
502
|
-
break;
|
|
503
|
-
case Description_type.code_60:
|
|
504
|
-
{
|
|
505
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(60);
|
|
506
|
-
this.writeBytes(6, type);
|
|
507
|
-
}
|
|
508
|
-
break;
|
|
509
|
-
case Description_type.code_70:
|
|
510
|
-
{
|
|
511
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(70);
|
|
512
|
-
this.writeBytes(6, type);
|
|
513
|
-
}
|
|
514
|
-
break;
|
|
515
|
-
case Description_type.code_71:
|
|
516
|
-
{
|
|
517
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(71);
|
|
518
|
-
this.writeBytes(6, type);
|
|
519
|
-
}
|
|
520
|
-
break;
|
|
521
|
-
case Description_type.code_80:
|
|
522
|
-
{
|
|
523
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(80);
|
|
524
|
-
this.writeBytes(6, type);
|
|
525
|
-
}
|
|
526
|
-
break;
|
|
527
|
-
case Description_type.code_86:
|
|
528
|
-
{
|
|
529
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(86);
|
|
530
|
-
this.writeBytes(6, type);
|
|
531
|
-
}
|
|
532
|
-
break;
|
|
533
|
-
case Description_type.code_90:
|
|
534
|
-
{
|
|
535
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(90);
|
|
536
|
-
this.writeBytes(6, type);
|
|
537
|
-
}
|
|
538
|
-
break;
|
|
539
|
-
case Description_type.code_100:
|
|
540
|
-
{
|
|
541
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(100);
|
|
542
|
-
this.writeBytes(6, type);
|
|
543
|
-
}
|
|
544
|
-
break;
|
|
545
|
-
case Description_type.code_110:
|
|
546
|
-
{
|
|
547
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(110);
|
|
548
|
-
this.writeBytes(6, type);
|
|
549
|
-
}
|
|
550
|
-
break;
|
|
551
|
-
case Description_type.code_111:
|
|
552
|
-
{
|
|
553
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(111);
|
|
554
|
-
this.writeBytes(6, type);
|
|
555
|
-
}
|
|
556
|
-
break;
|
|
557
|
-
case Description_type.code_112:
|
|
558
|
-
{
|
|
559
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(112);
|
|
560
|
-
this.writeBytes(6, type);
|
|
561
|
-
}
|
|
562
|
-
break;
|
|
563
|
-
case Description_type.code_113:
|
|
564
|
-
{
|
|
565
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(113);
|
|
566
|
-
this.writeBytes(6, type);
|
|
567
|
-
}
|
|
568
|
-
break;
|
|
569
|
-
case Description_type.code_114:
|
|
570
|
-
{
|
|
571
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(114);
|
|
572
|
-
this.writeBytes(6, type);
|
|
573
|
-
}
|
|
574
|
-
break;
|
|
575
|
-
case Description_type.code_115:
|
|
576
|
-
{
|
|
577
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(115);
|
|
578
|
-
this.writeBytes(6, type);
|
|
579
|
-
}
|
|
580
|
-
break;
|
|
581
|
-
case Description_type.code_116:
|
|
582
|
-
{
|
|
583
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(116);
|
|
584
|
-
this.writeBytes(6, type);
|
|
585
|
-
}
|
|
586
|
-
break;
|
|
587
|
-
case Description_type.code_120:
|
|
588
|
-
{
|
|
589
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(120);
|
|
590
|
-
this.writeBytes(6, type);
|
|
591
|
-
}
|
|
592
|
-
break;
|
|
593
|
-
case Description_type.code_255:
|
|
594
|
-
{
|
|
595
|
-
const type = (0, NumberToBuffer_1.UInt8ToBuffer)(255);
|
|
596
|
-
this.writeBytes(6, type);
|
|
597
|
-
}
|
|
598
|
-
break;
|
|
599
|
-
default: {
|
|
600
|
-
const type1 = parseInt(type, 10);
|
|
601
|
-
const type2 = (0, NumberToBuffer_1.UInt8ToBuffer)(type1);
|
|
602
|
-
this.writeBytes(6, type2);
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
};
|
|
609
|
-
this.id = 'tls-alert';
|
|
610
|
-
this.name = 'Transport Layer Security(Alert Protocol)';
|
|
611
|
-
this.nickname = 'TLS-Alert';
|
|
612
|
-
}
|
|
613
|
-
match() {
|
|
614
|
-
if (!this.prevCodecModule)
|
|
615
|
-
return false;
|
|
616
|
-
const type = (0, BufferToNumber_1.BufferToInt8)(this.readBytes(0, 1));
|
|
617
|
-
if (type != 21)
|
|
618
|
-
return false;
|
|
619
|
-
const version = (0, BufferToNumber_1.BufferToUInt16)(this.readBytes(1, 2));
|
|
620
|
-
const validVersions = [768, 769, 770, 771, 772];
|
|
621
|
-
return validVersions.includes(version);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
exports.TLS_Alert = TLS_Alert;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ProtocolJSONSchema } from '../../schema/ProtocolJSONSchema';
|
|
2
|
-
import { BaseHeader } from '../abstracts/BaseHeader';
|
|
3
|
-
export declare class TLS_ApplicationData extends BaseHeader {
|
|
4
|
-
SCHEMA: ProtocolJSONSchema;
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
nickname: string;
|
|
8
|
-
match(): boolean;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=TLS_ApplicationData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TLS_ApplicationData.d.ts","sourceRoot":"","sources":["../../../../src/lib/codec/headers/TLS_ApplicationData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAC,UAAU,EAAC,MAAM,yBAAyB,CAAA;AAclD,qBAAa,mBAAoB,SAAQ,UAAU;IACxC,MAAM,EAAE,kBAAkB,CAmHhC;IACM,EAAE,EAAE,MAAM,CAAgB;IAC1B,IAAI,EAAE,MAAM,CAAwD;IACpE,QAAQ,EAAE,MAAM,CAAgB;IAEhC,KAAK,IAAI,OAAO;CAQ1B"}
|