Python RouterOS-api 最小示例(系统标识)适用于工厂配置的 MikroTik
以下示例适用于工厂配置的 MikroTik wAP-LTE 套件。
system_identity_example.py
#!/usr/bin/env python3
import routeros_api
connection = routeros_api.RouterOsApiPool(
'192.168.88.1', username='admin', password='L9TYAUV7R8',
plaintext_login=True
)
api = connection.get_api()
# Print system identity
print(f"System identity: {api.get_resource('/system/identity').get()}")注意: 密码对于每个设备是独立的。你可以在设备上的贴纸上找到它。
注意: 没有 plaintext_login=True,你需要使用密码的哈希。考虑到密码以明文形式通过网络提交,因此建议使用 SSL,但工厂配置的设备上不可用。
Check out similar posts by category:
MikroTik, Networking
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow