https://github.com/cubiclesoft/getiptables-windows
Dumps information about Windows TCP/IP and UDP/IP tables (both IPv4 and IPv6) as JSON. MIT or LGPL.
https://github.com/cubiclesoft/getiptables-windows
Last synced: 24 days ago
JSON representation
Dumps information about Windows TCP/IP and UDP/IP tables (both IPv4 and IPv6) as JSON. MIT or LGPL.
- Host: GitHub
- URL: https://github.com/cubiclesoft/getiptables-windows
- Owner: cubiclesoft
- Created: 2022-02-22T14:28:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-22T14:31:36.000Z (over 4 years ago)
- Last Synced: 2025-01-13T21:10:30.799Z (over 1 year ago)
- Language: C++
- Size: 119 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Get IP Tables Command-Line Utility
==================================
Dumps information about Windows TCP/IP and UDP/IP tables (both IPv4 and IPv6) as JSON. Released under a MIT or LGPL license.
[](https://cubiclesoft.com/donate/) [](https://cubiclesoft.com/product-support/github/)
Features
--------
* Command-line action!
* Dumps the results of the GetTcpTable2(), GetTcp6Table2(), GetUdpTable(), and GetUdp6Table() Windows APIs as JSON. Easily consumed by most programming and scripting languages.
* Pre-built binaries using Visual Studio (statically linked C++ runtime, minimal file size of ~117K, direct Win32 API calls).
* Windows subsystem variant.
* Unicode support.
* Has a liberal open source license. MIT or LGPL, your choice.
* Sits on GitHub for all of that pull request and issue tracker goodness to easily submit changes and ideas respectively.
Useful Information
------------------
Running the command with the `/?` option will display the options:
```
(C) 2021 CubicleSoft. All Rights Reserved.
Syntax: getiptables.exe [options]
Options:
/v
Verbose mode.
/tcponly
Only output TCP table information.
Incompatible with 'udponly'.
/udponly
Only output UDP table information.
Incompatible with 'tcponly'.
/state=State
Only output table information for the specified state.
Map only be one of:
CLOSED
LISTEN
SYN-SENT
SYN-RECEIVED
ESTABLISHED
FIN-WAIT-1
FIN-WAIT-2
CLOSE-WAIT
CLOSING
LAST-ACK
TIME-WAIT
DELETE-TCB
/localip=IPAddr
Only output table information for the specified local IP address.
/localport=PortNum
Only output table information for the specified local port number.
/remoteip=IPAddr
Only output table information for the specified remote IP address.
/remoteport=PortNum
Only output table information for the specified remote port number.
/sort
Sort the output.
/file=OutputFile
File to write the JSON output to instead of stdout.
```
Example usage:
```
C:\>getiptables /tcponly /state=ESTABLISHED /localip=127.0.0.1
{"success": true, "tcp4": {"success": true, "info": [{"state": "ESTABLISHED", "local_ip": "127.0.0.1", "local_port": 49767, "remote_ip": "127.0.0.1", "remote_port": 49768, "pid": 704, "offload_state": "InHost"},
{"state": "ESTABLISHED", "local_ip": "127.0.0.1", "local_port": 49768, "remote_ip": "127.0.0.1", "remote_port": 49767, "pid": 704, "offload_state": "InHost"}]},
"tcp6": {"success": true, "info": []}}
```