{"id":44910511,"url":"https://github.com/good-tools/wiregasm","last_synced_at":"2026-02-18T00:01:08.233Z","repository":{"id":68085669,"uuid":"600102614","full_name":"good-tools/wiregasm","owner":"good-tools","description":"Packet Analyzer powered by Wireshark compiled for WebAssembly","archived":false,"fork":false,"pushed_at":"2025-09-01T15:12:28.000Z","size":348,"stargazers_count":79,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-03T19:58:44.857Z","etag":null,"topics":["analyzer","packet","pcap","wasm","wireshark"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/good-tools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-10T15:35:52.000Z","updated_at":"2025-09-23T06:44:21.000Z","dependencies_parsed_at":"2024-06-23T19:23:14.423Z","dependency_job_id":"ce52b4cd-bb58-4966-9ac7-b4359727d196","html_url":"https://github.com/good-tools/wiregasm","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.1875,"last_synced_commit":"25227f53149437fd7030fb4332b797bf918fd52f"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/good-tools/wiregasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/good-tools%2Fwiregasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/good-tools%2Fwiregasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/good-tools%2Fwiregasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/good-tools%2Fwiregasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/good-tools","download_url":"https://codeload.github.com/good-tools/wiregasm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/good-tools%2Fwiregasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29559961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analyzer","packet","pcap","wasm","wireshark"],"created_at":"2026-02-18T00:00:35.379Z","updated_at":"2026-02-18T00:01:08.225Z","avatar_url":"https://github.com/good-tools.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wiregasm\n![Build](https://github.com/good-tools/wiregasm/actions/workflows/ci.yml/badge.svg?branch=master)\n![Build](https://img.shields.io/npm/dm/@goodtools/wiregasm)\n\nPacket Analyzer powered by Wireshark compiled for WebAssembly.\n\nDemo it on [good.tools](https://good.tools/packet-dissector).\n\n## Build\nThe library can be built in two ways:\n1. `npm run build:emscripten` using a docker image with all of the build tools installed\n2. `npm run build:emscripten-local` requires the build environment to be set up. A list of the tools and dependencies can be found in the build [Dockerfile](docker/build.Dockerfile)\n\nAfter the WASM library is built, the wrapper lib can be built using `npm run build`. The `wiregasm.js` output file produced by the emscripten compiler is not processed by `packer` in the build step and gets added directly to `dist`. This is intentional as it provides consumers to use it for any enviornment they wish, be it nodejs or a browser.\n\nSee [lib/Makefile](lib/Makefile) for more information on how dependencies are built.\n\n### Patches\nCross-compiling Wireshark for emscripten/WASM isn't straightforward as it also depends on several other libraries to make it work, and those libraries also need to be ported to emscripten.\n\n* libffi\n  * https://github.com/libffi/libffi/compare/v3.4.4...kleisauke:wasm-vips.patch by [kleisauke](https://github.com/kleisauke)\n* glib\n  * https://github.com/GNOME/glib/compare/2.75.0...kleisauke:wasm-vips-2.75.0.patch by [kleisauke](https://github.com/kleisauke)\n* wireshark\n  * `0001-dont-build-radiotap-lemon.patch`\n    * Disables building `Lemon` - Wireshark builds the tool and uses it to process files within the build process. Instead of building it, we provide it externally.\n    * Disables building `radiotap` subdir - It has a dependency on `libpcap`\n  * `0002-fix-cpu-name-unknown.patch` - Fix compilation error for undefined `model_name` variable\n  * `0003-disable-snort-emscripten.patch` - Disable the Snort dissector\n  * `0004-export-wireshark-common.patch` - Expose some headers and objects that are not part of `epan`\n  * `0005-force-data-dir.patch` - Force `/wireshark` as the data directory. It is needed for loading preferences, profiles and color filters\n  * `0006-threadless-registration.patch` - Makes dissector registrations threadless\n  * `0007-export-lrexlib.patch` - Expose `lrexlib`, which is really a private dependency, but which isn't linked properly if not exported.\n\n## Usage\nThe Wiregasm `Dissect Session` implementation is effectively a tiny subset of `sharkd` APIs.\n\n| **sharkd** | **Wiregasm** |\n|------------|--------------|\n| load       | load         |\n| frames     | getFrames    |\n| frame      | getFrame     |\n\n```javascript\nimport loadWiregasm from '@goodtools/wiregasm/dist/wiregasm'\n\n// override default locateFile to supply paths to data/wasm files\nconst wg = await loadWiregasm({\n  locateFile: (path, prefix) =\u003e {\n    if (path.endsWith(\".data\")) return \"path/to/wiregasm.data\";\n    if (path.endsWith(\".wasm\")) return \"path/to/wiregasm.wasm\";\n    return prefix + path;\n  }\n});\n\n// initialize prefs and dissectors\nwg.init();\n\n// read file from local FS\nconst data = await fs.readFile(\"path/to/file.pcap\");\n\n// write file to the virtual emscripten FS\nwg.FS.writeFile(\"/uploads/file.pcap\", data);\n\n// create a new dissect session\nconst sess = new wg.DissectSession(\"/uploads/file.pcap\");\n\n// load the file\nconst ret = sess.load(); // res.code == 0\n\n// load frames\nconst filter = \"\";\nconst skip = 0;\nconst limit = 0;\nconst frames = sess.getFrames(filter, skip, limit);\n\n// get all details including protocol tree for frame\nconst frame = sess.getFrame(1);\n\n// destroy the session\nsess.delete();\n\n// destroy the lib\nwg.destroy();\n```\n\nTo add custom Lua dissectors, add your dissectors to the plugins directory\nbefore initializing wiregasm:\n\n```javascript\n// read lua file from local FS\nconst dissector_data = await fs.readFile(\"path/to/dissector.lua\");\n\n// write lua file to the virtual emscripten FS plugin directory\nwg.FS.writeFile(\"/plugins/dissector.lua\", dissector_data)\n\n// initialize and use wiregasm as usual\nwg.init();\n```\n\n## License\nWiregasm is a derivative work of the [Wireshark](https://github.com/wireshark/wireshark) project, hence it is licensed under the same [GNU GPLv2](LICENSE) license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgood-tools%2Fwiregasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgood-tools%2Fwiregasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgood-tools%2Fwiregasm/lists"}