My WHMCS Teamspeak 3 Module is freezing.

Porcellian

Active Member
Sep 24, 2016
7
0
73
Hi, I have a problem.

I am using the teamspeak 3 module (4.3 nulled) for my WHMCS, my WHMCS version is 7.0.
As fast as I click any of these buttons it just freezes, or the page never reloads, it keeps loading until I clear cookies and login again. None of the other pages works until I clear my cookies after I've pressed any of these buttons.
d93b1d4b04df73213e521f256924e2a9.png

But if I click "stop" the teamspeak server actually stops, like everything works but my website just keeps loading.

This error appears as well "Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."

Why is this?
 
Last edited:

Porcellian

Active Member
Sep 24, 2016
7
0
73
I turned off the firewall and it still doesn't work. That can't be the problem
I noticed when I enter my api, http:0.0.0.0:3000 I get the error "Cannot GET /". Why?
 

Porcellian

Active Member
Sep 24, 2016
7
0
73
It is a 403 forbidden error, if someone could look at this code.
Code:
"use strict";
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('tsdns.sqlite');
var express = require('express');
var app = express();
var config = require('./config.json');

db.serialize(function() {
  db.run("CREATE TABLE IF NOT EXISTS zones (id integer primary key, zone varchar(100),target varchar(50))");
});

app.get('/list', function (req, res) {
  if( req.headers.authorization == config.api_key ){
    var zone = req.params.zone;
    db.all("SELECT * FROM zones", function(err, rows) {
      res.send('{"result":"success","message":' + JSON.stringify( rows ) + '}');
    });
  }else{
    res.statusCode = 403;
    res.send('{"result":"error","message":"Invalid auth token"}');
  }
});

app.get('/add/:zone/:target', function (req, res) {
  if( req.headers.authorization == config.api_key ){
    var zone = req.params.zone;
    var target = req.params.target;
    var sql = "INSERT INTO zones(zone,target) VALUES(?,?)";
    var stmt = db.prepare(sql,zone,target);
    stmt.run();
    stmt.finalize();
    res.statusCode = 201;
    res.send('{result:"success"}');
  }else{
    res.statusCode = 403;
    res.send('{"result":"error","message":"Invalid auth token"}');
  }
});

app.get('/del/:zone', function (req, res) {
  if( req.headers.authorization == config.api_key ){
    var zone = req.params.zone;
    var sql = "DELETE FROM zones WHERE zone =?";
    var stmt = db.prepare(sql,zone);
    stmt.run();
    stmt.finalize();
    res.statusCode = 202;
    res.send('{result:"success"}');
  }else{
    res.statusCode = 403;
    res.send('{"result":"error","message":"Invalid auth token"}');
  }
});

app.get('/get/:zone', function (req, res) {
  if( req.headers.authorization == config.api_key ){
    var zone = req.params.zone;
    db.all("SELECT * FROM zones WHERE zone=?",zone, function(err, row) {
      res.statusCode = 200;
      res.send('{"result":"success","message":' + JSON.stringify( row ) + '}');
    });
  }else{
    res.statusCode = 403;
    res.send('{"result":"error","message":"Invalid auth token"}');
  }
});

module.exports = app;

And then tell me why, when I am for example going to http://0.0.0.0:3000/list I get the error "{"result":"error","message":"Invalid auth token"}"
And console says "GET http://0.0.0.0:3000/list 403 (Forbidden)"
 
Top