Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani committed Aug 26, 2023
1 parent 79b5e4d commit 6cd5ec4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ var pcapFile = log2pcap.encodePcap([
])

console.log(pcapFile);

console.log('log2pcap done');
1 change: 1 addition & 0 deletions example.js
Original file line number Diff line number Diff line change
@@ -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")},
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -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 = [];
Expand Down

0 comments on commit 6cd5ec4

Please sign in to comment.