我有一个来自 Pastebin 链接的 python 脚本,例如https://pastebin.com/raw/hz8p3B5Y https://pastebin.com/raw/hz8p3B5Y:
import requests
requests.get('https://api.telegram.org/******/sendMessage?chat_id=******&text=***** # Send notification to my Telegram
我想运行一个本地 python 脚本,它可以加载原始 Pastebin 并执行它。
使用 bash 怎么样?您可以使用curl然后使用Python执行脚本
curl your_url | sudo python -
curl
将把 URL 的内容打印到 stdout
python -
将表明源来自 stdin
相关卷曲并运行 python 脚本 https://stackoverflow.com/questions/27273987/curl-and-run-python-script
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)