diff --git a/browser.js b/browser.js index b5193bb..47ab2ac 100644 --- a/browser.js +++ b/browser.js @@ -6,3 +6,5 @@ var pcapFile = log2pcap.encodePcap([ ]) console.log(pcapFile); + +console.log('log2pcap done'); diff --git a/example.js b/example.js index 744ee4a..4317dc9 100644 --- a/example.js +++ b/example.js @@ -1,3 +1,4 @@ +const log2pcap = require("."); const fs = require("fs"); var pcapFile = log2pcap.encodePcap([ {srcIp:"127.0.0.1", srcPort: 5060, dstIp: "127.0.0.2", dstPort: 5080, proto: 17, data: Buffer.from("HELLO")}, diff --git a/index.js b/index.js index 4ed4da6..13d9129 100644 --- a/index.js +++ b/index.js @@ -1,11 +1,12 @@ -/* +/* log2pcap exporter (c) qxip bv 2023 */ -const generator = require('pcap-generator'); +const ip = require('ip-packet'); const tcp = require('tcp-packet'); const udp = require('udp-packet'); +const generator = require('pcap-generator'); function encodePcap(packetArray) { const pcapData = [];