starwolfy / steam-ts

Steam integration for TeamSpeak 3
MIT License
62 stars 9 forks source link
bot comm integration steam steam-account steam-guard-codes steambot teamspeak-server teamspeak3 teamspeak3-plugin verification

Steam integration for TeamSpeak 3

version

1.3.4

steam-ts is a Node.js application which allows for fast and easy verification between a TeamSpeak account and a Steam account of the same user.

Explanation

As soon as this NodeJs app is launched your Steam bot will automatically log into Steam and log into your TeamSpeak server query and it will then start listening to the !verify command in the Steam chat. When someone writes !verify to the Steambot, it will prompt the user to give their TeamSpeak username which they are currently recognized by on the given TeamSpeak server. When the given username was correct it will message the TeamSpeak client under that username a randomly generated token and it will tell the user to send that string back to the Steambot. When the bot has successfully compared both strings it will write to a file called verified.json. This json file contains an array called users wherein each element represents an object of a verified user. This module is good for preventing users from evading their bans by creating new TeamSpeak identities, if they want to get rid of the default guest rank they would need to verify themselves and it generally is not as easy to create a new Steam account and get it up to a relatively high level again.

An example of the verified.json file:

{
  "nicknames": ["Bob", "Bob <3"],
  "addresses": ["192.168.2.15", "192.168.2.35"],
  "steamid": "[U:1:120910450]",
  "teamspeakid": "/huKa7R0PJFlehpmcCXnyW/ZuZw="
}

Installation

First make sure that you actually have Node.js installed on your Linux machine (the web interface doesn't work on Windows). Then transfer the files from this GitHub repository to your machine, browse to the folder where the project is located and execute the following command:

$ npm install

After you have installed all the required dependencies via npm install it is required to edit the config.json file accordingly. More documentation on that down below.

After having successfully edited the config the following command will launch the bot:

$ npm start

information about all the values inside the config.json:

{
  "main": {
    "ts_ip": "", // The IP adress of your TeamSpeak server, prefferably not a domain name and cannot contain a port. (Custom ports are not indicated.)
    "q_port": 10011, // Do not change this unless you know what you're doing. This is your TeamSpeak Query port and not your 'normal' TeamSpeak port.
    "q_username": "", // The query username of your TeamSpeak Query server. (As admin: tools>ServerQuery Login)
    "q_password": "", // The query password of your TeamSpeak Query server.
    "q_vserverid": 1, // The id of your virtual server, default is 1.
    "bot_username": "", // The username of your Steam bot which you use to log in.
    "bot_password": "", // The password of your Steam bot account.
    "minlevel": 1, // The minimum required Steam level of the client who wants to utilize the verification system. Shouldn't be 0.
    "wantedrankid": 2, // The id of the rank the bot will promote them to once they are verified, cannot be value 1. (verified rank)
    "editdescription": false, // Should the bot adjust users descriptions as well so that it will display their steamid64 there?
    "clanabbreviation": "", // Should not be bigger than 4 letters. The abbreviation of your clan name if you have one.
    "queryinterval": 30000, //  At which interval should the bot query the server for client information. In ms.
    "useHttps": true // Weather to use HTTPS oder HTTP
  },
  "twoFactor": {
    "enabled": false // Enable or disable mobile authentication; **if you want to let this module support the two factor authentication you need to go through a small process described below!**
  },
  "webserver": {
    "enabled": false, // Enable or disable the admin panel. This is not a production server and should be used with care. nginx could be used as reverse proxy if interested in security.
    "port": "8080", // The port on which the admin panel listens to. Is a string.
    "webminUsername": "", // Login credentials required to log into the admin panel.
    "webminPassword": "", // Login credentials required to log into the admin panel. Please do use a password which you do not use for anything else as the admin panel traffic does not get encrypted.
    "timeOut": 300000  //  After three failed attempts of logging in, this decides how long a user on that ip address would have to wait in ms before they'd be able to make new login requests again.
  },
  "doNotEdit": {
    "sessionSecret": ""
  }
}

A few important notices:

An example of the config.json file:

{
  "main": {
    "ts_ip": "37.59.11.113",
    "q_port": 10011,
    "q_username": "nikitavondel",
    "q_password": "12345",
    "bot_username": "mybot",
    "bot_password": "54321",
    "q_vserverid": 1,
    "minlevel": 5,
    "wantedrankid": 34,
    "editdescription": true,
    "clanabbreviation": "CLWO",
    "queryinterval": 30000,
    "userHttps": true
  },
  "twoFactor": {
    "enabled": true
  },
  "webserver": {
    "enabled": true,
    "port": "8080",
    "webminUsername": "nikitavondel",
    "webminPassword": "rainbows",
    "timeOut": 300000
  },
  "doNotEdit": {
    "sessionSecret": ""
  }
}

Two factor authentication

If you would like to enable this feature you need to complete the following steps:

IMPORTANT : After the process of enabling Steam Guard has been completed it will create a file inside the data folder called twofactor.json, it is of extreme importance to keep that file in a secure place. NEVER share that file with anyone as it contains the shared secret between your phone and the Steam Guard codes, anyone with this file can generate Steam Guard codes for your Steam account. Also make sure that you backup twofactor.json as it contains important data which you will need to recover your Steam account. Your mobile phone will no longer be able to generate Steam Guard codes for this Steam account untill you have deactivated mobile authentication and enabled it yourself again. As long as the bot is in control of your Steam Guard codes you can find the current Steam guard code used to login in /data/code.txt .

If you used to have two factor authentication enabled with this module and recently decided to disable it but want it enabled again, make sure to remove the twofactor.json and code.txt file.

Admin panel:

admin panel

Admin panel detailed section:

admin panel details

Changelog

Development

This project is no longer being maintained by the original author. Pull requests are still being reviewed.

Support

There is this video tutorial for Windows users.