Skip to content

Instantly share code, notes, and snippets.

@muenchow
muenchow / teamspeak_ssh_query_example.py
Last active August 31, 2021 12:55
TeamSpeak SSH-Query Example using Python
from paramiko import SSHClient, AutoAddPolicy
from sys import exit
def connect(host, port, username, password):
ssh_client = SSHClient()
ssh_client.set_missing_host_key_policy(AutoAddPolicy())
ssh_client.connect(host, port=port, username=username, password=password)
return ssh_client.invoke_shell('raw')
def write_line(channel, line):
@muenchow
muenchow / teamspeak_ssh_query_example.php
Last active July 28, 2018 12:00
TeamSpeak SSH-Query Example using PHP
<?php
function connect($host, $port, $username, $password)
{
$connection = ssh2_connect($host, $port);
if (!$connection)
die('Connection failed');
if (!ssh2_auth_password($connection, $username, $password))
die('Authentication Failed...');