#!/usr/bin/env python3
import paramiko
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect('65.75.210.95', username='root', password='%8qd6oJx%PBB', timeout=20)
cmds = [
    "cat /etc/nginx/sites-available/models.conf | head -80",
    "curl -sk -m 15 -X POST 'https://models.hostlanty.com/mail/send.php' -d 'key=invalid&email=test@example.com&code=123456&type=register'",
    "curl -sS -m 15 -H 'Host: models.hostlanty.com' -X POST 'http://127.0.0.1/mail/send.php' -d 'key=invalid&email=test@example.com&code=123456&type=register'",
]
for cmd in cmds:
    print('===', cmd[:70], '===')
    _, o, e = c.exec_command(cmd, timeout=20)
    print((o.read() + e.read()).decode('utf-8', errors='replace')[:2000])
c.close()
