Digital Paint Discussion Board
Development => General Development => Topic started by: Bono on June 27, 2013, 08:36:40 PM
-
I am trying to handle server console to my application (make a server GUI), and, yes, I made it but only to this moment.
[********] Date: 2013-06-28
[02:41:03] Winsock Initialized.
[02:41:03] ===== Paintball II Initialized =====
Qhost not present.
Error: Error getting # of console events.
why server outputs that messages to me?
Qhost not present.
Error: Error getting # of console events.What does that mean?
-
Sounds like a trojan...
http://www.brighthub.com/computing/smb-security/articles/48525.aspx (http://www.brighthub.com/computing/smb-security/articles/48525.aspx)
-
http://support.kaspersky.com/5350?el=88446
www.malwarebytes.org/
www.surfright.nl/
C:/windows/system32/drivers/etc/hosts
right click on hosts, edit with notepad,
look for any ip's that arent local ones,
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
thats ok ^^
-
No, this is not trojan. I found this output messages in DP2 source, but I don't know what I'm doing wrong that I can see these messages.
conproc.c
// give QHOST a chance to hook into the console
if ((t = CCheckParm ("-HFILE")) > 0)
{
if (t < argc)
hFile = (HANDLE)atoi (ccom_argv[t+1]);
}
if ((t = CCheckParm ("-HPARENT")) > 0)
{
if (t < argc)
heventParent = (HANDLE)atoi (ccom_argv[t+1]);
}
if ((t = CCheckParm ("-HCHILD")) > 0)
{
if (t < argc)
heventChild = (HANDLE)atoi (ccom_argv[t+1]);
}
// ignore if we don't have all the events.
if (!hFile || !heventParent || !heventChild)
{
printf ("Qhost not present.\n");
return;
}
and
sys_win.c
/*
================
Sys_ConsoleInput
================
*/
char *Sys_ConsoleInput (void)
{
INPUT_RECORD recs[1024];
int dummy;
int /*ch,*/ numread, numevents;
unsigned char ch; // jittext
if (!dedicated || !dedicated->value)
return NULL;
for ( ;; )
{
if (!GetNumberOfConsoleInputEvents (hinput, &numevents))
Sys_Error ("Error getting # of console events.");
-
hm. are you on windows 8?
-
Yes. But when i'm running server via shortcut with parameters, server works good.
-
Oh, sorry, wasn't reading this right.
Did a bit of research. Based on this (http://vlsiweb.stanford.edu/~jsolomon/clan9/frames/truth/qsmack_FAQ.html#3.3.), QHost was an application that does more or less what you are doing now - a server management console. It appears to have been supported by the official code, which checks to see if the game has been launched/hooked by another program. It detects this when your program launches it, but is confused because it is expecting some interface from QHost which is not used in your program - I guess you will have to look through the game source and work out how it works. Then you can either try and stop the game from trying to talk to QHost, or just emulate it.
http://web.archive.org/web/19980629203104/http://www.xoanan.com/qhost.htm
There are even downloads! :D
http://web.archive.org/web/20010405043729/www.xoanan.com/downloads.htm
-
Hm, thanks.
Jitspoe, any comments/help for this?
-
Not familiar with this at all, sorry. It looks like it's expecting console input to be handled a certain way, and with the way you have things set up, calling GetNumberOfConsoleInputEvents is returning false. I can't really look at the code right now.
-
Any chances to look at this now? ;) I can make server GUI but actually this is not possible.
-
On the first one, it looks like you have to specify ALL the parameters, -HFILE, -HPARENT, and -HCHILD.
Not sure if that will fix the second one. GetNumberOfConsoleInputEvents() is a windows call, so I can't really say why that's failing. Maybe this will give you some clues:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms683207(v=vs.85).aspx