← 返回 Skills 市场
printer-control
作者
zhangpl666ya
· GitHub ↗
· v1.0.0
· MIT-0
257
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install printer-control
功能描述
Control local and network printers on Windows to list printers, print files or text, check status, and set default printer with name matching support.
安全使用建议
This skill appears to do what it claims (Windows printer control) but be cautious before installing or running it:
- Only run these scripts on a trusted machine and with trusted inputs. The scripts interpolate printer names and file paths into PowerShell command strings without rigorous escaping; supplying untrusted or specially crafted names could lead to command injection or unexpected PowerShell behavior.
- Printing operations read and send file contents and create temporary files; do not feed sensitive files to this skill unless you trust it and the environment.
- Some troubleshooting steps (Restart-Service -Name Spooler) require administrative privileges — be careful granting elevated rights.
- There are minor bugs/oddities (e.g., the PowerShell snippet in print_file.py attempts to change printer default via Set-Printer -Shared instead of setting Default) — review behavior before using in production.
Recommendations before proceeding:
1) Inspect/run the scripts locally in a safe environment (VM) and test with non-sensitive files.
2) If you plan to integrate this into an automated agent, sanitize/validate printer and file-name inputs and avoid running with elevated privileges unless necessary.
3) Consider hardening the code by properly escaping/interpolating values when constructing PowerShell commands (or using subprocess with argument arrays and avoiding -Command with embedded strings), and by adding input validation and logging for auditability.
功能分析
Type: OpenClaw Skill
Name: printer-control
Version: 1.0.0
The skill provides legitimate printer management functionality for Windows using pywin32 and PowerShell fallbacks. However, it is classified as suspicious due to potential command injection vulnerabilities in scripts like print_file.py, print_text.py, and set_default.py, where PowerShell commands are constructed using f-strings with insufficient sanitization of arguments such as --printer and --file. While the SKILL.md includes safety warnings, the underlying code logic allows for arbitrary command execution if an attacker can influence the input parameters passed to the scripts.
能力评估
Purpose & Capability
Name, description, SKILL.md, and the included Python scripts consistently implement Windows printer management (list printers, print text/files, check status, set default). The required capabilities and code are proportionate to the stated purpose.
Instruction Scope
Scripts use subprocess.run to call PowerShell and Start-Process, create temporary files, and launch Notepad or other local applications. Several PowerShell script strings interpolate user-supplied printer names and file paths directly (e.g., print_file.py, set_default.py, printer_status.py). This introduces command-injection and shell-escaping risks if the printer/file name inputs are untrusted. The SKILL.md instructs users to run privileged operations in troubleshooting (Restart-Service), which may require admin rights; that’s a scope-relevant but higher-privilege action.
Install Mechanism
Instruction-only skill with optional dependency on pywin32 (pip). No external downloads or installers in the manifest; fallback uses built-in PowerShell. This is a low-risk install profile.
Credentials
The skill requests no environment variables, no credentials, and no config paths. All required accesses are local and consistent with printer management.
Persistence & Privilege
always is false and the skill does not request persistent or elevated platform privileges. It does not modify other skills or global agent configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install printer-control - 安装完成后,直接呼叫该 Skill 的名称或使用
/printer-control触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the printer-control skill.
- List available printers, print files or raw text, check status, and set default printer on Windows systems.
- Supports both local and network printers.
- Works with pywin32 or falls back to PowerShell if needed.
- Partial printer name matching makes printer selection easier.
- Requires explicit user authorization before performing any print operation.
元数据
常见问题
printer-control 是什么?
Control local and network printers on Windows to list printers, print files or text, check status, and set default printer with name matching support. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 257 次。
如何安装 printer-control?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install printer-control」即可一键安装,无需额外配置。
printer-control 是免费的吗?
是的,printer-control 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
printer-control 支持哪些平台?
printer-control 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 printer-control?
由 zhangpl666ya(@zhangpl666ya)开发并维护,当前版本 v1.0.0。
推荐 Skills