Results 1 to 4 of 4
Thread: Useful tools: ts3pwgen
-
05-07-2012, 17:05 #1
-= TeamSpeak Fanatic =-
- Join Date
- Jul 2006
- Posts
- 1,573
Useful tools: ts3pwgen, notify
notify.php
Sends a message to all connected users on all virtual servers of a teamspeak3 server instance
Requirements:
- Linux
- php
- TS3 PHP Framework
Examples:
Code:# send bold message in red color ./notify "The server is going down for a restart" # send unformatted message ./notify --plain "Plain Message"
You might need to grant execution rights to the script: chmod u+x notify.phpPHP Code:#!/usr/bin/php
<?php
// define where your local copy of the ts3 php framework is located
$framework = "./libraries/TeamSpeak3/TeamSpeak3.php";
if($argc < 2 || $argc > 3) {
fprintf(STDERR, "Usage: %s [--plain] \"MESSAGE\"\n", basename(__FILE__));
exit(1);
}
$plain = $argv[1] == "--plain" ? true : false;
require_once($framework);
try {
$instance = TeamSpeak3::factory("serverquery://serveradmin:password@127.0.0.1:10011/");
if(!$plain) {
$message = "[color=red][b]" . $argv[1] . "[/b][/color]";
} else {
$message = $argv[2];
}
$instance->message($message);
} catch (Exception $e) {
fprintf(STDERR, "Error " . $e->getCode() . ": " . $e->getMessage() . "\n");
exit(1);
}
?>
----
ts3pwgen.php
- generates random passwords
- is able to use user specified passwords
- and encodes them with the standard teamspeak3 password hash algorithm
Requirements:
- Linux
- php
- `pwgen' installed on your machine (by the way: you always want to generate save passwords on the machine you are using it on. Never ever use online password generators to prevent anyone from sniffing it over the network)
Examples:
Code:./ts3pwgen.php --help Usage: ts3pwgen.php [PASSWORD(S)...]
Code:./ts3pwgen.php Password: aiYee2ka Encoded: 6Qwy+EYkZHFbefh5n1Jgx3EpIgk=
Code:./ts3pwgen.php mySecretPassword anotherPassword Password: mySecretPassword Encoded: 8DJoApmwd6+5UJPeQIL2JVArglE= Password: anotherPassword Encoded: 7u8iwNsQCspG51eh8unbMTzUjw0=
You might need to grant execution rights to the script: chmod u+x ts3pwgen.phpPHP Code:#!/usr/bin/php
<?php
function encodeAndPrint($password) {
$encoded = base64_encode(sha1($password, true));
fprintf(STDOUT, "Password: %s Encoded: %s\n", $password, $encoded);
}
function printUsageAndExit() {
fprintf(STDERR, "Usage: %s [PASSWORD(S)...]\n", basename(__FILE__));
exit(1);
}
if(in_array("-h", $argv) || in_array("--help", $argv)) {
printUsageAndExit();
}
$passwords = array();
for($i = 1; $i < sizeof($argv); $i++) {
array_push($passwords, $argv[$i]);
}
if(sizeof($passwords) > 0) {
foreach($passwords as $password) {
encodeAndPrint($password);
}
} else {
exec("pwgen -c -n 8 1", $output);
encodeAndPrint($output[0]);
}
?>Last edited by maxi1990; 05-07-2012 at 21:29.
-
05-07-2012, 22:41 #2
-= TeamSpeak Fanatic =-
- Join Date
- Jul 2006
- Posts
- 1,573
Added tool notify.php
-
22-07-2012, 21:55 #3
-= TeamSpeak User =-
- Join Date
- Jul 2012
- Posts
- 13
Auto message?
Is there a plugin for TS3 that is an automatic global message sender? for example I would like to have it set to every 15Minutes it would send a GM (Global Message) to everyone in the TS saying something like "[Advertisement] Blah blah blah blah".
If there is a plugin could you please send me a link, but if there isn't a plugin is there anyway you guys/girls could tell me how to make this sort of plugin for my server.
Thank you.
-BloopzTV
merged - Please use the search function next time.Last edited by dante696; 23-07-2012 at 09:32.
-
22-07-2012, 21:58 #4
-= TeamSpeak Fanatic =-
- Join Date
- Jul 2006
- Posts
- 1,573
There is no inbuilt "easy" way.
But an easy way would be a cronjob + php script.
Something like: http://forum.teamspeak.com/showthrea...tools-ts3pwgen
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Ts2-Tools
By Bayalon in forum [TeamSpeak 2] Addons & ScriptsReplies: 3Last Post: 18-03-2008, 11:48 -
No admin tools
By ChaosNova in forum [TeamSpeak 2] Server SupportReplies: 2Last Post: 31-10-2004, 20:42


Reply With Quote
