It is like netcat implemented in python.
Project description
netdog
It is like netcat implemented in python.
Description
Install
Requirement
Dependency
- termcolor>=2.5.0
On Windows
- python >= 3.12
Because netdog using os.set_blocking(). that function was supported on Windows since python 3.12.
PYPI
pip install netdog
Windows Executable file
There is a pre-built netdog.exe using pyinstaller. (Download here)
Usage
$ netdog -h
usage: netdog [-l] [-u] [-C] [-h] [-V] [-v] [-e cmd] [--lbcnet {LF,CRLF,CR}] [--lbcsub {LF,CRLF,CR,auto}]
[--encnet ENCNET] [--encsub ENCSUB]
[hostname] port
netdog is a networking tool like netcat.
netcat compatible argument:
hostname Address of bind / connect to.
port Port to listen, forward or connect to
-l, --listen Listen mode: Enable listen mode for inbound connects
-u, --udp UDP mode
-C, --crlf same as '--lbcnet CRLF'
-h, --help Show this help message and exit
-V, --version Show version information and exit
netdog extended argument.:
-v, --verbose Verbose. Use -vv or -vvv for more verbosity.
-e cmd, --exec cmd Execute command
--lbcnet {LF,CRLF,CR}
Line break code for network. (default: LF)
--lbcsub {LF,CRLF,CR,auto}
Line break code for subprocess. (default: auto)
--encnet ENCNET Encoding for network. (default: 'utf-8')
--encsub ENCSUB Encoding for subprocess. (default: 'utf-8')
[Examples]:
* Delegate application layer behavior to other programs via stdin/stdout of subprocess.
In other words, using PIPE to make correspond recv() to stdin, and correspond stdout to send().
The following is an example of a simple HTTP GET method.
> netdog -v -e 'python -u httpget.py' 127.0.0.1 80
---httpget.py---
print("GET / HTTP/1.1\r\n", end="")
while(True):
res = input()
print(f"response = {res}", file=sys.stderr)
----------------
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
netdog-0.1.10.tar.gz
(8.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netdog-0.1.10.tar.gz.
File metadata
- Download URL: netdog-0.1.10.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.21.0 CPython/3.12.6 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c202e0de1f2a995c1da547db1ecefb090f03c5fc84cfbd9ae8d45d6e0913e4e9
|
|
| MD5 |
1f30e7b73ed1f6117d696d03e90a45f3
|
|
| BLAKE2b-256 |
11a9a6ec4f18240a6343aad127ae0f1e311c7eeed06f15872094bf93253c4fe4
|
File details
Details for the file netdog-0.1.10-py3-none-any.whl.
File metadata
- Download URL: netdog-0.1.10-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.21.0 CPython/3.12.6 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67551820934b902bb70711cb5679f068808d8cbff41cc5060c4b97d79e1f51e
|
|
| MD5 |
15c35a25c48c8de3064739cd12589d2b
|
|
| BLAKE2b-256 |
4ec134d8cc1cf00ea3b23f47d5295d9e428e0e844a5f001d57ec8e625025fe4b
|