Files
CyberStrikeAI/tools/uro.yaml
2025-11-21 23:20:41 +08:00

71 lines
1.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: "uro"
command: "python3"
args:
- "-c"
- |
import shlex
import subprocess
import sys
if len(sys.argv) < 2:
sys.stderr.write("缺少URL列表\n")
sys.exit(1)
urls = sys.argv[1]
extra = sys.argv[2] if len(sys.argv) > 2 else ""
cmd = ["uro"]
if extra:
cmd.extend(shlex.split(extra))
proc = subprocess.run(
cmd,
input=urls,
capture_output=True,
text=True,
)
if proc.stdout:
sys.stdout.write(proc.stdout)
if proc.stderr:
sys.stderr.write(proc.stderr)
sys.exit(proc.returncode)
enabled: true
short_description: "URL过滤工具用于过滤相似的URL"
description: |
Uro是一个URL过滤工具用于过滤掉相似的URL去除重复项。
**主要功能:**
- URL去重
- 相似URL过滤
- 白名单/黑名单支持
- 快速处理
**使用场景:**
- URL去重
- 结果过滤
- 数据清理
- 工具链集成
parameters:
- name: "urls"
type: "string"
description: "要过滤的URL每行一个"
required: true
position: 0
format: "positional"
- name: "additional_args"
type: "string"
description: |
额外的uro参数。用于传递未在参数列表中定义的uro选项。
**示例值:**
- 根据工具特性添加常用参数示例
**注意事项:**
- 多个参数用空格分隔
- 确保参数格式正确,避免命令注入
- 此参数会直接追加到命令末尾
required: false
default: ""
position: 1
format: "positional"