← 返回 Skills 市场
and0r-

HiLink LTE Modem

作者 And0r- · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
327
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install hilink-lte
功能描述
Control Huawei HiLink USB LTE modems (E3372, E8372, etc.) via REST API. Send/receive SMS, check signal strength, manage SIM PIN, query prepaid balance, and m...
使用说明 (SKILL.md)

HiLink LTE Modem

Control Huawei HiLink USB LTE modems via their local REST API.

Setup

The modem must be in HiLink mode (not stick/serial mode) and accessible via HTTP.

Config

Set gateway IP in ~/.config/hilink/config:

HILINK_GATEWAY=192.168.200.1

Or pass via environment: export HILINK_GATEWAY=192.168.200.1

Default: 192.168.200.1

Network Requirements

The LTE USB interface needs an IP on the modem's subnet (e.g., 192.168.200.x). Configure as static IP with no gateway and no DNS to avoid routing conflicts:

# /etc/network/interfaces.d/lte
allow-hotplug lte0
iface lte0 inet static
    address 192.168.200.100/24

Critical: Never let the LTE interface set a default route or DNS — it will override your LAN connection. Use nogateway and nohook resolv.conf in dhcpcd, or a static config with no gateway line.

Persistent Interface Name

USB network interfaces get random names on each boot. Create a udev rule for a stable name:

# Find MAC address
cat /sys/class/net/enx*/address

# Create udev rule
echo 'SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="lte0"' \
  | sudo tee /etc/udev/rules.d/70-lte-modem.rules

CLI Usage

# SMS
scripts/hilink.sh sms send "+41791234567" "Hello!"
scripts/hilink.sh sms list
scripts/hilink.sh sms read 40001
scripts/hilink.sh sms delete 40001

# Status & Signal
scripts/hilink.sh status
scripts/hilink.sh signal

# SIM PIN
scripts/hilink.sh pin enter 1234
scripts/hilink.sh pin disable 1234
scripts/hilink.sh pin status

# Prepaid Balance (USSD)
scripts/hilink.sh balance

# Connection info
scripts/hilink.sh info

API Overview

All HiLink API calls require a session token + CSRF token pair:

# Get tokens
curl -s http://GATEWAY/api/webserver/SesTokInfo
# Returns: \x3CSesInfo>cookie\x3C/SesInfo>\x3CTokInfo>csrf_token\x3C/TokInfo>

# Use in requests
curl -X POST http://GATEWAY/api/endpoint \
  -H "Cookie: \x3CSesInfo value>" \
  -H "__RequestVerificationToken: \x3CTokInfo value>" \
  -H "Content-Type: application/xml" \
  -d '\x3Cxml request body>'

For detailed API endpoints, see references/api.md.

Troubleshooting

  • Error 113018 on SMS send: SIM not registered to network. Check PIN status and signal.
  • SimState 260: PIN required. Enter PIN first via scripts/hilink.sh pin enter \x3CPIN>.
  • SignalStrength 0: No network registration. Wait after PIN entry or check antenna.
  • DNS/routing broken: LTE interface set a default route. Remove it: sudo ip route del default via 192.168.200.1
  • Interface name changed: USB MAC randomized. Create udev rule (see Setup).
安全使用建议
This skill does what it says (manage Huawei HiLink modems) but requires elevated network privileges and has two practical risks: (1) it sources ~/.config/hilink/config which will execute any shell code in that file — only use a config that contains simple variable assignments and inspect it before running; (2) the included script expects tools (curl, python3, ip, sudo, ping, grep, sed) that the registry metadata doesn't declare. Before installing: inspect scripts/hilink.sh fully, don't place sensitive credentials/PINs in an unprotected file, run first in an isolated VM or container, and be prepared to review/undo udev and /etc/network changes. If you don't want the script to modify system networking, avoid running the parts that call sudo or require creating udev rules.
功能分析
Type: OpenClaw Skill Name: hilink-lte Version: 1.0.0 The skill bundle contains a critical vulnerability in `scripts/hilink.sh` where the `cmd_sms_read` function allows for arbitrary Python code execution (RCE) by unsafely interpolating the `$index` shell variable into a `python3 -c` command string. Additionally, the script requires `sudo` privileges for network interface management and route manipulation, and it uses `source` on a local configuration file (`~/.config/hilink/config`), which could lead to local privilege escalation if the file is compromised. While these capabilities are plausibly required for managing hardware modems, the lack of input sanitization makes the bundle highly risky.
能力评估
Purpose & Capability
Name/description align with the included shell script and the documented HiLink API; the actions (SMS, PIN, signal, network setup) are coherent with a modem-management tool. However, the package metadata declares no required binaries while the script clearly depends on curl, python3, ip, sudo, grep/sed/awk, and ping — a discrepancy to be aware of.
Instruction Scope
Runtime instructions and the script direct the agent/user to modify network interfaces, create udev rules, edit /etc/network files, run sudo ip/route commands, and source ~/.config/hilink/config. Sourcing the config file executes any shell content inside it (not limited to simple variable assignments), which is a direct code-execution risk if the file is untrusted or tampered with. The skill only targets the local modem API (no external endpoints), but it has broad discretion over system networking.
Install Mechanism
There is no install spec (instruction-only plus an included script), which is low risk for arbitrary remote downloads. But because a runnable script is included and it relies on several external binaries, the omission of dependency declarations is a packaging/information gap that could surprise users at runtime.
Credentials
No credentials are requested by the registry metadata, which matches the local-only nature of the modem API. However, the skill reads/sources a local config (~/.config/hilink/config) that may include HILINK_PIN (SIM PIN) in plaintext — this is sensitive. More importantly, sourcing the config runs any shell code present, so the skill can effectively execute arbitrary content from a user-writable path, which is disproportionate if the intended purpose is only to read a few variables.
Persistence & Privilege
The skill suggests persistent system changes (udev rule, /etc/network/interfaces.d entry) and issues privileged commands (sudo ip addr/route modification). These actions are consistent with a modem manager but require elevated privileges and will affect system networking; users should be aware and review/approve such changes explicitly before running.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install hilink-lte
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /hilink-lte 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Self-managing Huawei HiLink USB LTE modem control. SMS send/receive, signal status, SIM PIN auto-entry, balance check. Auto-initializes interface and PIN on every command.
元数据
Slug hilink-lte
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

HiLink LTE Modem 是什么?

Control Huawei HiLink USB LTE modems (E3372, E8372, etc.) via REST API. Send/receive SMS, check signal strength, manage SIM PIN, query prepaid balance, and m... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 327 次。

如何安装 HiLink LTE Modem?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install hilink-lte」即可一键安装,无需额外配置。

HiLink LTE Modem 是免费的吗?

是的,HiLink LTE Modem 完全免费(开源免费),可自由下载、安装和使用。

HiLink LTE Modem 支持哪些平台?

HiLink LTE Modem 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 HiLink LTE Modem?

由 And0r-(@and0r-)开发并维护,当前版本 v1.0.0。

💬 留言讨论