一些简单好用的命令
Project description
介绍
一些简单好用的命令
1. l0n0lsimplehttpserver
l0n0lsimplehttpserver -h
usage: l0n0lsimplehttpserver [-h] [--host HOST] [--port PORT] [-s] directory
启动一个 aiohttp 静态文件服务器。
positional arguments:
directory 要提供静态文件的目录路径。
options:
-h, --help show this help message and exit
--host HOST 服务器绑定的主机地址(默认:127.0.0.1)。
--port PORT 服务器绑定的端口号(默认:8080)。
-s, --show-index 显示索引目录
1.1 实例
l0n0lsimplehttpserver ./ -s
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
1.2 浏览器访问
2. l0n0lsimplekvserver
l0n0lsimplekvserver -h
usage: l0n0lsimplekvserver [-h] [--host HOST] [--port PORT]
aiohttp Key-Value 服务器
options:
-h, --help show this help message and exit
--host HOST 监听地址
--port PORT 监听端口
2.1 实例
l0n0lsimplekvserver
[INFO] 已创建 tokens.json,令牌: 8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d
[INFO] 已加载 tokens.json: ['8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d']
======== Running on http://0.0.0.0:8080 ========
(Press CTRL+C to quit)
2.2 存值
curl -X POST http://127.0.0.1:8080/set -H "Authorization: Bearer 8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d" -H "Content-Type: application/json" -d '{"键":"年龄","值":28}'
{"状态": "ok"}
2.3 取值
curl -X POST http://127.0.0.1:8080/get -H "Authorization: Bearer 8f35f0178c5596773f4e95459545f175c483e05b809181c136f95a2eda573f7d" -H "Content-Type: application/json" -d '{"键":"年龄"}'
{"键": "年龄", "类型": "int", "值": 28}
3. l0n0lsystemctltui(systemctl tui 界面)
4. l0n0lsystemctlgui (systemctl gui 界面)
5. l0n0limg2base64
5.1 总的帮助
l0n0limg2base64 -h
usage: l0n0limg2base64 [-h] {encode,decode} ...
图片 Base64 编码/解码工具
positional arguments:
{encode,decode}
encode 图片转 Base64
decode Base64 转图片
options:
-h, --help show this help message and exit
5.2 encode
l0n0limg2base64 encode -h
usage: l0n0limg2base64 encode [-h] [-o OUTPUT] [-p] image
positional arguments:
image 输入图片路径
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
输出 Base64 文件
-p, --prefix 输出可直接用于 <img src=""/> 的字符串
5.3 decode
l0n0limg2base64 decode -h
usage: l0n0limg2base64 decode [-h] -o OUTPUT base64file
positional arguments:
base64file 输入 Base64 文本文件
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
输出图片路径
5.4 实例
l0n0limg2base64 encode image.png -p -o out.txt
l0n0limg2base64 decode out.txt -o image_back.png
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
l0n0lsimple-0.5.0.tar.gz
(410.9 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
l0n0lsimple-0.5.0-py3-none-any.whl
(147.5 kB
view details)
File details
Details for the file l0n0lsimple-0.5.0.tar.gz.
File metadata
- Download URL: l0n0lsimple-0.5.0.tar.gz
- Upload date:
- Size: 410.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d4b833a3ef3ee45156df9cd3dfbd71564ad3645606aad59d8be12f5830b9568
|
|
| MD5 |
699fdd5ab65d5a1c9b7fa2b44df2a987
|
|
| BLAKE2b-256 |
d8ce02f1e4b5db893532107307fd8592cbb3d1230a9877a54d7094d75f9ec06a
|
File details
Details for the file l0n0lsimple-0.5.0-py3-none-any.whl.
File metadata
- Download URL: l0n0lsimple-0.5.0-py3-none-any.whl
- Upload date:
- Size: 147.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
163328dcd2e3baaa94519ed1b8ee2dc60627d9a8a17ec4e95f93283aebc32178
|
|
| MD5 |
defb3ce87a0e8661430e7aba38d354d5
|
|
| BLAKE2b-256 |
f9b187391dc263cb3c9df4ac799ab7a61370eae94236215e034b893c45a46586
|