private function templateToken() { $user = GWF_Session::getUser(); $token = WC_WarToken::genWarToken($user->getID()); $host = Module_WeChall::instance()->cfgWarboxURL(); $ip = gethostbyname(Common::getHostname($host)); $port = Module_WeChall::instance()->cfgWarboxPort(); $tVars = array('epoch' => $this->getEpochUser(), 'warboxes' => $this->getWarboxes(true), 'token' => $token, 'port' => $port, 'host' => $host, 'netcat_cmd' => sprintf('(echo -e "%s\\n%s"; cat) | nc %s %s', $user->displayUsername(), $token, $ip, $port)); return $this->module->templatePHP('wartoken.php', $tVars); }