A simple netcat implementation in Rust, providing TCP and UDP networking capabilities for data transfer and network communication.
- TCP Client/Server: Connect to or listen for TCP connections
- UDP Client/Server: Send/receive UDP packets
- Bidirectional Data Transfer: Full-duplex communication between stdin/stdout and network
- Cross-platform: Works on Linux, macOS, and Windows
git clone [retcat](https://github.com/hamkee-dev-group/retract)
cd retcat
cargo build --release
The binary will be available at target/release/retcat
.
# Listen on port 8080
retcat -l -p 8080
# Listen on specific port
retcat -l -p 1234
# Connect to localhost:8080
retcat localhost 8080
# Connect to remote host
retcat example.com 80
# Listen for UDP packets on port 8080
retcat -l -u -p 8080
# Send UDP packets to localhost:8080
retcat -u localhost 8080
-l, --listen
: Listen mode, for inbound connections-p, --port PORT
: Local port number-u, --udp
: Use UDP instead of TCP-h, --help
: Show help message-V, --version
: Show version information
Sender (server):
retcat -l -p 8080 < file.txt
Receiver (client):
retcat localhost 8080 > received_file.txt
Machine 1:
retcat -l -p 8080
Machine 2:
retcat machine1-ip 8080
retcat -u target-host 53 # Test UDP port
retcat target-host 80 # Test TCP port
cargo build # Debug build
cargo build --release # Release build
cargo test
cargo clippy
This project is open source. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.