diff --git a/.gitignore b/.gitignore index 15886e4..245dab0 100644 --- a/.gitignore +++ b/.gitignore @@ -61,8 +61,10 @@ _CPack_Packages/ *.ipr # --- Runtime / Application Output --- +# Written by the app at exit; per-machine state, not project configuration. imgui.ini netprobe-layout.ini +netprobe-settings.ini # --- GeoIP Data and Local Secrets --- # GeoLite databases are user-supplied/downloaded and must not be committed. diff --git a/CMakeLists.txt b/CMakeLists.txt index 4005d11..75bdf49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,10 +284,12 @@ install(TARGETS NetProbe NetProbeCli BUNDLE DESTINATION . ) install(DIRECTORY data/ DESTINATION data) +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION .) set(CPACK_GENERATOR "ZIP") set(CPACK_PACKAGE_FILE_NAME "NetProbe-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}") set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") include(CPack) # --- 7.5 Sample PCAP generator --- diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9ac2dec --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-2026 Yehia Gewily + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index bcf7c28..539d009 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,6 @@ A real-time and offline network traffic analyzer built with **Modern C++20**, ** > Every push is built on Windows, Linux, and macOS, run under AddressSanitizer and UndefinedBehaviorSanitizer, checked with clang-tidy, and fuzzed with libFuzzer. - - - ## Download Download the ZIP for your platform from [GitHub Releases](https://github.com/YehiaGewily/netprobe-cpp/releases). Windows releases require the [Npcap driver](https://npcap.com/#download) for live capture and PCAP support. Linux and macOS releases require their system libpcap runtime. @@ -140,9 +133,12 @@ netprobe-cli -r capture.pcap -o - | jq '.flows[] | select(.bytes_down > 100000)' | `-f, --filter ` | BPF capture filter, live capture only | | `-o, --output ` | Destination file, or `-` for stdout | | `--format ` | Override the format inferred from the extension | -| `--duration ` | Stop after this many seconds | -| `--packet-count ` | Stop after this many packets | +| `--duration ` | Stop after this many seconds, live capture only | +| `--packet-count ` | Stop after this many packets, live capture only | | `--no-process` | Skip the owning-process lookup | +| `--list-devices` | List the capture adapters and exit | +| `-h, --help` | Show the full usage text and exit | +| `-V, --version` | Show the version and exit | Ctrl+C stops a live capture and still writes the output. Exit codes are `0` success, `1` usage error, `2` runtime failure, so scripts can tell a bad invocation from a failed capture. Diagnostics go to stderr, which keeps `-o -` output clean for piping. @@ -219,5 +215,5 @@ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for build inst ## License -This project is licensed under the MIT License. +This project is licensed under the MIT License — see [LICENSE](LICENSE) for the full text. diff --git a/imgui.ini b/imgui.ini deleted file mode 100644 index 9b835f6..0000000 --- a/imgui.ini +++ /dev/null @@ -1,49 +0,0 @@ -[Window][WindowOverViewport_11111111] -Pos=0,19 -Size=1920,985 -Collapsed=0 - -[Window][Debug##Default] -Pos=60,60 -Size=400,400 -Collapsed=0 - -[Window][Live Packets] -Pos=60,60 -Size=555,75 -Collapsed=0 - -[Window][Dashboard] -Pos=58,60 -Size=1861,922 -Collapsed=0 - -[Window][Flows] -Pos=60,60 -Size=850,52 -Collapsed=0 - -[Table][0xFCC31D45,6] -RefScale=13 -Column 0 Width=80 ID=0xDE21DBF3 -Column 1 Width=100 ID=0x502B2868 -Column 2 Width=100 ID=0x76B1C0BE -Column 3 Width=60 ID=0x2366A604 -Column 4 Width=60 ID=0x79EF5D46 -Column 5 Weight=1.0000 ID=0x96E29927 - -[Table][0x3D56DFC4,9] -RefScale=13 -Column 0 Weight=1.0000 Sort=0v ID=0x42B9E9AB -Column 1 Width=65 ID=0x78552DA0 -Column 2 Width=180 ID=0xC6B06AEF -Column 3 Width=100 ID=0xEAC4A727 -Column 4 Width=110 ID=0x7F98298F -Column 5 Width=75 ID=0x3B98207B -Column 6 Width=90 ID=0xCBC629C5 -Column 7 Width=-1 -Column 8 Width=80 ID=0xDA561E09 - -[Docking][Data] -DockSpace ID=0x08BD597D Window=0x1BBC0F80 Pos=0,19 Size=1920,985 CentralNode=1 - diff --git a/netprobe-settings.ini b/netprobe-settings.ini deleted file mode 100644 index 3bf8184..0000000 --- a/netprobe-settings.ini +++ /dev/null @@ -1,2 +0,0 @@ -theme=dark -scale=1