{"_id":"@altalabs/ushark","name":"@altalabs/ushark","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@altalabs/ushark","version":"0.0.1","description":"Wireshark dissection for Nodejs","main":"index.js","scripts":{"install":"node-pre-gyp install --fallback-to-build"},"author":{"name":"altafinance"},"license":"GPL-2.0-or-later","dependencies":{"@mapbox/node-pre-gyp":"^1.0.10","@mmomtchev/node-pre-gyp-github":"^2.0.6","pcap":"^3.1.0"},"devDependencies":{"node-addon-api":"^5.0.0"},"gypfile":true,"binary":{"module_name":"ushark","module_path":"./lib/binding/napi-v{napi_build_version}","remote_path":"{version}","package_name":"{platform}-{arch}-napi-v{napi_build_version}.tar.gz","host":"https://github.com/altafinance/ushark/releases/download/","napi_versions":[6]},"repository":{"type":"git","url":"git+https://github.com/altafinance/ushark.git"},"bugs":{"url":"https://github.com/altafinance/ushark/issues"},"homepage":"https://github.com/altafinance/ushark","keywords":["wireshark","tshark","dpi"],"gitHead":"3673ffc72ee7f5e6225ce893285940cd9d993c4b","_id":"@altalabs/ushark@0.0.1","_nodeVersion":"19.2.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-rPkbpvBYiV8ri3ugI4XitPoOKC0BoM5puPKCWOBkLqspkX3YDsXhSc5tI9C8wfSk1/6aNVSI0MoT+Nxv0DPLAQ==","shasum":"88b8990e76b6878beff565ec9b167b9396b376ff","tarball":"https://registry.npmjs.org/@altalabs/ushark/-/ushark-0.0.1.tgz","fileCount":13,"unpackedSize":29459,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsx8/eRPVYJXYyVtuuV3nu+Qx1ULXYH8baiNxsZMWz0AiBxf2+PwqDILEIZONn0U22VMk9YJex5dhZKVf9POKDbSA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkwUwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZ7RAAnc192zZjh3T1Eb2ectWdKsh4/AoHibTYBbu2PypjNBVwv/uK\r\n0AT3QQoBzzXObDVRrIwkOYklPfVGLvkHG2S+MersO+GGueqpbRRvNMErRcLM\r\nMTzEPrsfHxjiOCeFyr2o+L4+whCuqndD3Cl/5npmz2hqnqWM7pR1Fb4XcgfP\r\nSKuj07ynxtKmdAVRZOs4Z9NjxJEu95NvPulhvj05h+gTHfCQ6AaNT05BwApN\r\n98KhqZtvT2gBFj41ckMgBu1J46D0ek9qn6EHgR3fmJZ/55QWrDETOhhcoqKf\r\nUqXu64+Otfae790pKY9KGuOKbtM1+GCxNXi1xGugHh4ZvjWjJZv3Qq5rBQnV\r\nVHvcbsCSVm/+9La1VvvEPJMp4HshSrPvUz7p3iMOrt44/Is/yrN1k9aWhN+m\r\nwRYlJWbAqgDoffmGkm+LmCaqd3FI/rKit6KEY2/3H31ZhcW1aiIVRdFkaR0v\r\nX1UhhBYwdn8cFaWEUN2BidQvR863D/U1lvSfGd6B3/O5BmvJhUiH/bNUI1nw\r\n1W2TbnRtmtWfJynA+ZGoxL/lIecfJMGuMKpRJuP50aRQlhqgP1327vss0AiF\r\n7MOFP/rcLbTlUk/QaZbPoMus604Be7ieLmJGHmvIvnr/WFnBnPFVrptx9YVP\r\nDremS4TIm6p2aD3n/ma1z3GVPTFJf5Aral8=\r\n=jV5T\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"emanuele-f","email":"black.silver@hotmail.it"},"directories":{},"maintainers":[{"name":"emanuele-f","email":"black.silver@hotmail.it"},{"name":"jonluca","email":"jonluca.decaro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ushark_0.0.1_1670579504330_0.4724596086375641"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-09T09:51:44.271Z","0.0.1":"2022-12-09T09:51:44.508Z","modified":"2022-12-09T09:51:44.772Z"},"maintainers":[{"name":"emanuele-f","email":"black.silver@hotmail.it"},{"name":"jonluca","email":"jonluca.decaro@gmail.com"}],"description":"Wireshark dissection for Nodejs","homepage":"https://github.com/altafinance/ushark","keywords":["wireshark","tshark","dpi"],"repository":{"type":"git","url":"git+https://github.com/altafinance/ushark.git"},"author":{"name":"altafinance"},"bugs":{"url":"https://github.com/altafinance/ushark/issues"},"license":"GPL-2.0-or-later","readme":"Ushark is a native module which brings the Wireshark dissection to Nodejs apps.\n\nInternally ushark uses the unofficial Wireshark API and it's linked against its static libraries.\n\n## Using ushark\n\nUshark currently supports:\n\n- linux x64 - built for Ubuntu 22.04\n- darwin-arm64 - built for macOS 12\n\nThe ushark module can be installed as a normal node module. `node-pre-gyp-github` installs the pre-built binaries for the specific OS and architecture.\nTo build and run on unsupported platforms, see \"Building the Wireshark libs\" and \"Building the binary module\" below.\n\nYou can run `node pcap_example.js` to see the native module in action.\n\n## Code Structure\n\n- The `libushark` folder contains the usark C API and can be used to build native programs (see `libushark/pcap_example.c`).\n- The Nodejs module interface is implemented in the `bindings` folder via the [node-addon-api](https://github.com/nodejs/node-addon-api).\n- The `pcap_example.js` shows how to use the ushark API from a Nodejs script.\n\nUshark depends on some Wireshark static libraries. The exposed functions are not part of an official API, so they may change in future Wireshark releases.\n\n## Building the Wireshark libs\n\nFirst of all, set up the environment as described [here](https://www.wireshark.org/docs/wsdg_html_chunked/ChapterSetup#ChSetupUNIX).\n\nOn Ubuntu 22.04, you will need at least the following packages:\n\n```\napt install build-essential cmake flex libglib2.0-dev libgnutls28-dev libgcrypt20-dev\\\n  libpcre2-dev zlib1g-dev libbrotli-dev libzstd-dev libgpg-error-dev liblz4-dev\\\n  libnghttp2-dev libc-ares-dev libsnappy-dev libpcap-dev\n```\n\nOn macOS, you can run `tools/macos-setup.sh` to install all the dependencies.\n\nTo build the static libraries, run:\n\n```\n# The wireshark source should be cloned at ../wireshark\ncd ..\ngit clone https://github.com/wireshark/wireshark\n\ncd wireshark\ngit checkout 85a9e05c\n\nmkdir build\ncd build\ncmake -DENABLE_STATIC=ON -DBUILD_wireshark=OFF -DENABLE_LUA=OFF -DENABLE_CAP=OFF -DENABLE_KERBEROS=OFF\\\n  -DENABLE_SBC=OFF -DENABLE_SPANDSP=OFF -DENABLE_BCG729=OFF -DENABLE_ILBC=OFF\\\n  -DENABLE_LIBXML2=OFF -DENABLE_OPUS=OFF -DENABLE_SINSP=OFF -DENABLE_NETLINK=OFF\\\n  -DENABLE_PLUGINS=OFF -DENABLE_AIRPCAP=OFF -DENABLE_SMI=OFF ..\n\nmake -j$(nproc) tshark\n```\n\nThe built Wireshark static libraries will be located in `build/run`.\n\n## Building the Binary Module\n\nAfter building the wireshark static libraries, the binary node module can be built with:\n\n```\nnpm install --build-from-source\n```\n\n(optional) To build the `tar.gz` containing the binary module for the release, run:\n\n```\nmake package\n```\n","readmeFilename":"README.md"}