{"id":46733372,"url":"https://github.com/szymonwieloch/rust-rawsock","last_synced_at":"2026-03-23T17:01:05.404Z","repository":{"id":33602128,"uuid":"116833253","full_name":"szymonwieloch/rust-rawsock","owner":"szymonwieloch","description":"Rust library for obtaining and sending raw network packets from interfaces.","archived":false,"fork":false,"pushed_at":"2022-05-17T12:40:53.000Z","size":147,"stargazers_count":75,"open_issues_count":6,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-30T18:49:58.117Z","etag":null,"topics":["packet-capturing-libraries","pcap","pfring","rust","wpcap"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/szymonwieloch.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}},"created_at":"2018-01-09T15:23:18.000Z","updated_at":"2025-10-27T09:26:23.000Z","dependencies_parsed_at":"2022-09-09T06:20:37.277Z","dependency_job_id":null,"html_url":"https://github.com/szymonwieloch/rust-rawsock","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/szymonwieloch/rust-rawsock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymonwieloch%2Frust-rawsock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymonwieloch%2Frust-rawsock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymonwieloch%2Frust-rawsock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymonwieloch%2Frust-rawsock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/szymonwieloch","download_url":"https://codeload.github.com/szymonwieloch/rust-rawsock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/szymonwieloch%2Frust-rawsock/sbom","scorecard":{"id":864488,"data":{"date":"2025-08-11","repo":{"name":"github.com/szymonwieloch/rust-rawsock","commit":"acd20af865157e3b90a21520b21fa5162489403a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 2/20 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T02:18:15.163Z","repository_id":33602128,"created_at":"2025-08-24T02:18:15.163Z","updated_at":"2025-08-24T02:18:15.163Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30864022,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-23T14:38:03.667Z","status":"ssl_error","status_checked_at":"2026-03-23T14:38:01.683Z","response_time":59,"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":["packet-capturing-libraries","pcap","pfring","rust","wpcap"],"created_at":"2026-03-09T16:00:28.060Z","updated_at":"2026-03-23T17:01:05.391Z","avatar_url":"https://github.com/szymonwieloch.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# rust-rawsock\n[![Travis CI][tcii]][tci] [![Crates CI][ccii]][cci] [![Docs][dcii]][dci]\n\n[tcii]: https://travis-ci.org/szymonwieloch/rust-rawsock.svg?branch=master\n[tci]: https://travis-ci.org/szymonwieloch/rust-rawsock\n[ccii]: https://img.shields.io/crates/v/rawsock.svg\n[cci]: https://crates.io/crates/rawsock\n[dcii]: https://docs.rs/rawsock/badge.svg\n[dci]: https://docs.rs/rawsock\n\n\n# Overview\n**rawsock** is a Rust library that highly simplifies use of packet capturing libraries\nsuch as **pcap**, **wpcap** or **pf_ring** and also libraries with a compatible API, such as **npcap**. \nIt can help you to send and receive raw socket frames using one consistent API for all those libraries,\nso that the internal complexity is hidden.\n\nMain advantage: you write code using one simple API - rawsock. But when your application is run,\nthe best available library on user's machine is chosen and used in the background.\nPlatform-specific extensions (such as WinPcap ```pcap_sendqueue_transmit()```) are also used in optimal way.\n\n# Main features\n\n* One consistent API for all packet capturing libraries.\n* Support of pcap, wpcap (with Windows-specific optimizations), npcap and pfring\n* Supports all main platforms: tested on Windows, Linux, Mac. Many more should work too\n* Libraries are loaded in a dynamic manner, so that the library does not have any direct\n    dependency - it's going to work with whatever is available on the given platform.\n* Libraries are checked in the order of effectiveness. The best found library is loaded.\n* It is also possible to load a specific library when using the rawsock API \nor directly use the API of the given dynamically loaded library - for more advanced use cases.\n\n# Quick example\n\n```\nextern crate rawsock;\nuse rawsock::open_best_library;\n\nconst ICMP_PACKET: [u8; 84] = [\n0x45, 0x00, 0x00, 0x54, 0xee, 0x96, 0x40, 0x00, 0x40, 0x01, 0x79, 0xf0, 0xc0, 0xa8, 0x01, 0x6a,\n0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x2f, 0x08, 0x66, 0xc2, 0x00, 0x12, 0x82, 0xaa, 0xcc, 0x5c,\n0x00, 0x00, 0x00, 0x00, 0x51, 0x49, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x11, 0x12, 0x13,\n0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23,\n0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33,\n0x34, 0x35, 0x36, 0x37];\n\nfn main() {\n\n    /*\n    This example shows automatic choosing of the best underlying library available on your system\n    and dynamic dispatch of calls to the right implementation.\n\n    For most applications this is the recommended approach.\n    */\n    println!(\"Opening packet capturing library\");\n    let lib = open_best_library().expect(\"Could not open any packet capturing library\");\n    println!(\"Library opened, version is {}\", lib.version());\n    let interf_name = \"eth0\"; //replace with whatever is available on your platform\n    println!(\"Opening the {} interface\", interf_name);\n    let mut interf = lib.open_interface(\u0026interf_name).expect(\"Could not open network interface\");\n    println!(\"Interface opened, data link: {}\", interf.data_link());\n\n    //send some packets\n    println!(\"Sending 5 packets:\");\n    for i in 0..5{\n        println!(\"Sending ICMP ping packet no {}\",i);\n        interf.send(\u0026ICMP_PACKET).expect(\"Could not send packet\");\n    }\n\n    //receive some packets.\n    println!(\"Receiving 5 packets:\");\n    for _ in 0..5 {\n        let packet = interf.receive().expect(\"Could not receive packet\");\n        println!(\"Received packet: {}\", packet);\n    }\n}\n```\n\n[More advanced examples](./examples)\n\n# Usage:\n\nCargo.toml:\n\n```toml\n[dependencies]\nrawsock = \"0.1\"\n```\n\n# License\nThis is free software licensed under the [MIT](./LICENSE) license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszymonwieloch%2Frust-rawsock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fszymonwieloch%2Frust-rawsock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fszymonwieloch%2Frust-rawsock/lists"}