https://github.com/tajiknomi/tcphostcli_windows
Simple TCP Server to handle multiple reverse connection/sessions
https://github.com/tajiknomi/tcphostcli_windows
cpp netcat pen-testing remote-shell reverse-connection socket-programming windows
Last synced: 9 months ago
JSON representation
Simple TCP Server to handle multiple reverse connection/sessions
- Host: GitHub
- URL: https://github.com/tajiknomi/tcphostcli_windows
- Owner: tajiknomi
- License: gpl-3.0
- Created: 2024-07-03T09:49:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-02T10:48:36.000Z (over 1 year ago)
- Last Synced: 2025-07-18T11:39:30.701Z (11 months ago)
- Topics: cpp, netcat, pen-testing, remote-shell, reverse-connection, socket-programming, windows
- Language: C++
- Homepage:
- Size: 259 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Intro
netcat is mostly used for reverse connection but it's limited to handling only one connection at a time. This utility offers a more convenient way to manage multiple sessions within a single terminal, allowing you to listen for and handle incoming connections simultaneously.
## How to build
```
$ cd TCPServerCLI && mkdir build && cd build
$ cmake ..
$ cmake --build . --config Release
```
You can specify the [cmake-generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) to create configuration files for your build system. some examples are given below
```
$ cmake -G "Visual Studio 16 2019" -A x64 ..
$ cmake -A x64 ..
$ cmake -A Win32 ..
```
## Usage
```
$ TCPServerCLI.exe
```
The tool accepts two commands
```
# Specify the [id] of the connected client/session
1) select client [id]
# Disconnect from client/session
2) exit
```
## Screenshots
Waiting for clients to connect, two clients are shown below as connected

Client 0 is selected for communication

Upgrading a simple reverse shell to a fully interactive tty on client 1

## Note
It is better to use [MINGW](https://www.mingw-w64.org/)/[GIT](https://git-scm.com/download/win)/[WSL](https://learn.microsoft.com/en-us/windows/wsl/about) terminal because it can handle interactive shell for all OS's, while the native Windows command prompt i.e. cmd and PowerShell environments do not natively support PTYs in the same way as Linux. They use different mechanisms for terminal emulation and may not fully support all PTY features expected by applications like pty.spawn()
## License
[MIT](https://choosealicense.com/licenses/mit/)