Skip to content

Instantly share code, notes, and snippets.

@muenchow
muenchow / teamspeak_ssh_query_example.py
Last active Aug 31, 2021
TeamSpeak SSH-Query Example using Python
View teamspeak_ssh_query_example.py
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 Jul 28, 2018
TeamSpeak SSH-Query Example using PHP
View teamspeak_ssh_query_example.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...');