最初版本
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
import paramiko
|
||||
|
||||
pw = os.environ["DEPLOY_PASSWORD"]
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect("20.191.152.26", username="wakka", password=pw, timeout=30)
|
||||
cmd = """curl -s -o /dev/null -w '%{http_code}' 'http://127.0.0.1:7777/api/v1/widget/messages?website_token=j1UAjqBgZMWQ8WfczgJSymQx&cw_conversation=test'
|
||||
echo
|
||||
curl -s 'http://127.0.0.1:7777/cw/widget?website_token=j1UAjqBgZMWQ8WfczgJSymQx' | grep -o 'CABLE_ORIGIN = \"[^\"]*\"' | head -1
|
||||
"""
|
||||
_, o, _ = c.exec_command(cmd, timeout=30)
|
||||
print(o.read().decode())
|
||||
c.close()
|
||||
Reference in New Issue
Block a user