{"_id":"@tdole/removegre","_rev":"28-7acc5dc9ef4a263dea9459392d2c5dd5","name":"@tdole/removegre","dist-tags":{"latest":"1.4.2"},"versions":{"1.2.6":{"name":"@tdole/removegre","version":"1.2.6","descrtiption":"Remove GRE header from pcap packet and take care of ip fragmentation","main":"removeGRE.js","dependencies":{"@tdole/np_libpcap":"^1.6.2","@tdole/pcapdecoder":"^1.4.13","opts":"^2.0.2"},"author":{"name":"Michel Verbraak"},"license":"CC","bin":{"removeGRE":"removeGRE.js"},"gitHead":"4ef25b346156e7434cea83578b2ef39f0ddbaf94","description":"Remove the GRE header from pcap packets and respect ip fragmentation. Only the payload of packets with GRE headers will be saved to the output file.","_id":"@tdole/removegre@1.2.6","_nodeVersion":"18.14.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-ykCgyMbqMNum5CQnUA1DDscJbrKXNbTkNRhqIron/i5S24xUg4KgS76GhBPVkVywop87p8SG5jSbZM7XaV2stw==","shasum":"90f918b207170b3d7fa4794ef662dd741ff251aa","tarball":"https://registry.npmjs.org/@tdole/removegre/-/removegre-1.2.6.tgz","fileCount":3,"unpackedSize":8230,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtlTC9UdORZL2l066qmPtLTh8sqKBCbsdBF6h9qFks9QIhAP9RkhxajA9pSqCT+AHcmuXeWPJ5D5N0tQLw5E0VyGvs"}]},"_npmUser":{"name":"npmtdole","email":"michelv@dnpa.nl"},"directories":{},"maintainers":[{"name":"npmtdole","email":"michelv@dnpa.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/removegre_1.2.6_1687343035700_0.9973561376005211"},"_hasShrinkwrap":false},"1.3.1":{"name":"@tdole/removegre","version":"1.3.1","descrtiption":"Remove GRE header from pcap packet and take care of ip fragmentation","main":"removeGRE.js","dependencies":{"@tdole/np_libpcap":"^2.2.1","@tdole/pcapdecoder":"^3.13.0","opts":"^2.0.2"},"author":{"name":"Michel Verbraak"},"license":"CC","bin":{"removeGRE":"removeGRE.js"},"gitHead":"a47870ca4740974c03bbbb362437dd6972b3c06e","description":"Remove the GRE header from pcap packets and respect ip fragmentation. Only the payload of packets with GRE headers will be saved to the output file.","_id":"@tdole/removegre@1.3.1","_nodeVersion":"18.14.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-RShuSERKbEF7NDoPX/rukvgwzotZF/N1g/MzHxpOSF6Yt+fGDY3IA5qSZQWD5UCvPA0uVZVxh38VHDEaJqflPA==","shasum":"1966f8612aaff8a6d199fb1cf0fa39f2c96b799f","tarball":"https://registry.npmjs.org/@tdole/removegre/-/removegre-1.3.1.tgz","fileCount":4,"unpackedSize":8997,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+iJ/KMVn4Mv1Px9YgEN/4L/DAEEHKzjfG6dEYdbcbJAIhAMP3LXyrLkmhT6wNfcAGbmlaV4MJ3i08sF86kPjP7Lt6"}]},"_npmUser":{"name":"npmtdole","email":"michelv@dnpa.nl"},"directories":{},"maintainers":[{"name":"npmtdole","email":"michelv@dnpa.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/removegre_1.3.1_1715164814070_0.7404665535626913"},"_hasShrinkwrap":false},"1.4.1":{"name":"@tdole/removegre","version":"1.4.1","descrtiption":"Remove GRE header from pcap packet and take care of ip fragmentation","main":"removeGRE.js","dependencies":{"@tdole/np_libpcap":"^2.3.1","@tdole/pcapdecoder":"^3.13.1","opts":"^2.0.2"},"author":{"name":"Michel Verbraak"},"license":"CC","bin":{"removeGRE":"removeGRE.js"},"gitHead":"499dd2862bd7e568e3dde9d32fae7124f4309769","description":"Remove the GRE header from pcap packets and respect ip fragmentation. Only the payload of packets with GRE headers will be saved to the output file.","_id":"@tdole/removegre@1.4.1","_nodeVersion":"18.14.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-3V0X7vs75BXSI5k21s9wVcjbYyU5liBtmmtDIXLNds3IiC8NZVhp02ZhkiiVys3+e+YXAJ8GTsBqpdSq1fCc0A==","shasum":"b6e8ff7b3c54b6181b2e188c184d805f49a99b65","tarball":"https://registry.npmjs.org/@tdole/removegre/-/removegre-1.4.1.tgz","fileCount":3,"unpackedSize":8648,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsGTDtMSzAR1SdwewR4igDSQNEY0XnQKRv1TTDCGvQCwIhAPT/u15LLhPUhlcrosvhkcziXWo78WmDMyR9OsLXPzG3"}]},"_npmUser":{"name":"npmtdole","email":"michelv@dnpa.nl"},"directories":{},"maintainers":[{"name":"npmtdole","email":"michelv@dnpa.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/removegre_1.4.1_1715171216989_0.396695768077151"},"_hasShrinkwrap":false},"1.4.2":{"name":"@tdole/removegre","version":"1.4.2","descrtiption":"Remove GRE header from pcap packet and take care of ip fragmentation","main":"removeGRE.js","dependencies":{"@tdole/np_libpcap":"^2.2.1","@tdole/pcapdecoder":"^3.13.1","opts":"^2.0.2"},"author":{"name":"Michel Verbraak"},"license":"CC","bin":{"removeGRE":"removeGRE.js"},"gitHead":"48a6b7cf4c1fd660c919694b53cc70a7fc4c18c1","description":"Remove the GRE header from pcap packets and respect ip fragmentation. Only the payload of packets with GRE headers will be saved to the output file.","_id":"@tdole/removegre@1.4.2","_nodeVersion":"18.14.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-Vj2dp1foNOrPCs+75+vEu0SMfNYmHkFdKelAIqeEZR5Vyb4huIhRFcqCQI2bp8tqBlPXq0ObUu+FyN8m5khdWg==","shasum":"1d198e2880f84ece8d6d08295ddb5a547961364e","tarball":"https://registry.npmjs.org/@tdole/removegre/-/removegre-1.4.2.tgz","fileCount":3,"unpackedSize":8648,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHlZElK1RgFf7cH+FSv+h/xKalwVE2Yym7dYB7wd/ub3AiBp3k9lR1W84UJH3m3smv1bXdKL0bNJgvSCCUGRoaEDog=="}]},"_npmUser":{"name":"npmtdole","email":"michelv@dnpa.nl"},"directories":{},"maintainers":[{"name":"npmtdole","email":"michelv@dnpa.nl"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/removegre_1.4.2_1715171625080_0.8941363173256218"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-07T14:31:48.329Z","1.0.1":"2022-02-07T14:31:48.550Z","modified":"2024-05-08T12:33:45.393Z","1.0.2":"2022-02-08T06:27:01.693Z","1.0.3":"2022-02-08T06:51:24.864Z","1.0.4":"2022-02-08T06:52:49.886Z","1.0.5":"2022-02-08T07:03:58.108Z","1.1.0":"2022-02-08T13:32:22.439Z","1.1.1":"2022-02-08T14:05:48.890Z","1.1.2":"2022-02-14T07:47:56.500Z","1.1.4":"2022-09-15T07:36:09.377Z","1.2.4":"2022-10-11T10:46:28.261Z","1.2.5":"2022-11-02T08:19:10.952Z","1.2.6":"2023-06-21T10:23:55.881Z","1.3.1":"2024-05-08T10:40:14.201Z","1.4.0":"2024-05-08T12:25:46.457Z","1.4.1":"2024-05-08T12:26:57.128Z","1.4.2":"2024-05-08T12:33:45.226Z"},"maintainers":[{"name":"npmtdole","email":"michelv@dnpa.nl"}],"description":"Remove the GRE header from pcap packets and respect ip fragmentation. Only the payload of packets with GRE headers will be saved to the output file.","author":{"name":"Michel Verbraak"},"license":"CC","readme":"# removeGRE\n\nRemove the GRE header from pcap packets and respect ip fragmentation. Only the payload of packets with GRE headers will be saved to the output file.\n\nCurrently we only process IP protocol 47 as GRE type. See https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml.\n\nBecause original pcap packets can be transported over GRE which it self is transported over ip it can happen that the new packet size will be bigger than the specifief MTU, most of the time 1500 bytes, so the original pcpa packet payload is then fragmented over two new ip packets.\n\nMost of the tools used to remove the GRE header only remove the first 38 bytes of the pcap packet but do not respect the ip fragmentation information resulting in broken data.\n\n**Example (non fragmented ip)**\n\n**Before**\n```\npcap-packet-header\n |-> ethernet header (14 bytes)\n       |-> ip header  (20 bytes)\n              |-> GRE header (4 bytes)\n                     |-> ethernet header (original packet, 14 bytes)\n                             |-> ip header (original packet, 20 bytes)\n                                   |-> TCP/UDP/ICMP packet (original packet, xx bytes)\n```\n\n**After**\n```\npcap-packet-header\n    |-> ethernet header (original packet, 14 bytes)\n            |-> ip header (original packet, 20 bytes)\n                |-> TCP/UDP/ICMP packet (original packet, xx bytes)\n```\n\n**Example (fragmented ip)**\n\n**Before**\n```\npcap-packet-header (fragment part 1)\n |-> ethernet header (14 bytes)\n       |-> ip header (20 bytes, flag \"More fragments\" is set)\n              |-> GRE header (4 bytes)\n                     |-> ethernet header (original packet, 14 bytes)\n                             |-> ip header (original packet, 20 bytes, flag \"Don't fragment\" set)\n                                   |-> TCP/UDP/ICMP packet (original packet, only first 1428 bytes of original 1466 bytes)\npcap-packet-header (fragment part 2)\n |-> ethernet header (14 bytes)\n       |-> ip header (20 bytes, flag \"Fragment offset\" is set)\n              |-> GRE header (4 bytes)\n                     |-> data (rest of TCP/UDP/ICMP payload original packet, 38 bytes)\n```\n\n**After**\n```\npcap-packet-header\n    |-> ethernet header (original packet, 14 bytes)\n            |-> ip header (original packet, 20 bytes)\n                |-> TCP/UDP/ICMP packet (original packet, 1466 bytes)\n```\n\n# Installation:\n\nRequirements:\n* NodeJS (v14.6.0 or higher)\n\n*Remove the file '.npmrc' if you are not working in the Dutch National Police network.*\n\nThis programm also exists on the online NPM repository. Install from there with '`npm install @todle/removegre -g`'. This will install de program '`removeGRE`' globally.\n\nTo install the checkedout git repository version use the command '`npm install -g`' will install the program '`removeGRE`' globally. \n\n# Usage:\n```bash\nnode ./removeGRE.js [options]\nShow this help message\n    --help\nPath to pcap file to write to\n    -o, --output <value> (required)\nPath to pcap file to read\n    -i, --input <value> (required)\n```\n\n# Examples:\n```bash\n./removeGRE.js -i file_with_gre.pcap -o file_without_gre.pcap\n\ncat file_with_gre.pcap | ./removeGRE.js -i - -o - > file_wihtout_gre.pcap\n```","readmeFilename":"readme.md"}