looking for a scanner

Started by agonotheta, March 16, 2008, 04:13:38 PM

Previous topic - Next topic

agonotheta

i trying to find  a serverscanner that can log serverinformation.

   

   im thinking of the rcon status information

   

   anyone seen such a software?

Salombo

I believe they all do.

   Look for Mohaa Counter Intelligence, Foresight 1.6 or Autokick.
_______________________
Start Search Here B)

agonotheta

i downloaded Autokick and CI but couldnt find out how to set them to log who is on the server. couldnt find anywhere to download foresight.

   

   what i would like to have is a software that sends the command <rcon status> to the server and saves the answer to a txt, log, cfg, or simular file.

   i dont need the other parts of the scanners, such as baning and punnishing players.

   

   im trying to log all names and IPs that is playing on the servers, and saving it to an excelsheet. the problem is, when im not at the computer i dont get the names that is on the servers.

   

   at the moment in useing the ingame command rcon status while im playing and saveing it to the qconsole.log.

   and when im not in game i use the All seeing eyes remote console to get the playernames and IPs.

   

   so now i want a way to get names when im not sitting infront of the computer. any ideas of how?

zeb199

for ci -

   

   ci keeps records of every player that logsin/logsout if you check on that option in settings - in a text file

   

   look in the  mohaaci/cifiles/ folder, this will give you end of day reports if you chose that option in your settings.

   

   the readme that is also in the ci folder will explain it all

   

   Z

agonotheta

when i woke up this morning i rememberd the rconaddress command.

   so i made a script that looks like

   

   

   seta logfile 3
   seta g_logsync 1
   
   rconaddress IP
   rcon status
   
   wait 60000
   
   exec configs/GetRconStatus.cfg
   

   

   so it gets the rcon status and waits one minute and does it again. (it should not be one minute, just for testing)

   

   the problem is i cant quit the script or game. once its in the wait i cant do nothing.

   is there anyway i can fix this?

   this script is supposed to run localy on my computer.

   

   thx.

[KC]Murdock

whats the point of the above script everyone who is connecting / disconnecting is already logged?? Just retrieve your logfile and read it.

   Below is a c++ source code for a qconsole log parser, just compile and have a go. Add or take out the lines which you want / dont want to be filtered

   

   
#include <stdio.h>
   #include <sys/types.h>
   #include <sys/stat.h>
   #include <fcntl.h>
   
   /*
    * Program to filter MoH:AA game server log. The filter is meant
    * to weed out lines that contain non-relevant info for server
    * statistics in order to limit the processing time of a PHP script
    * that fills a database with server statistics.
    *
    * Nice touch: we bluntly overwrite existing output files.
    *
    * Initially written for www.killerclan.com.
    *
    * AUTHOR:
    * Remco a.k.a [KC] Sld.wizzler[NL]:
    * 2006_06_25.
    *
    * (c) 2006, all rights reserved.
    * This program may be used free of charge for NON commercial purposes, but only after
    * approval of the AUTHOR.  The AUTHOR makes this software available as is and will not
    * accept ANY liability for whatever damages arise from its use.
    */
   #define PATHLEN   2000
   #define LINELEN   1000
   
   char *progname;
   FILE *ifp, *ofp;          /* input & output FP */
   
   extern void  usage();
   extern int   open_files();
   extern int   mystrcmp();
   
   main(ac, av)
   int    ac;
   char **av;
   {
      char         line[LINELEN];
      extern char *progname;
      extern FILE *ifp;
      extern FILE *ofp;
   
      /*
       * Basic initialiation
       */
      progname = *av;
      ifp = stdin; ofp = stdout;   /* default setting of file pointers */
   
      /*
       * argument scanning
       */
      ac--; av++;
      if(ac > 1) {
         /*
          * sorry, max 1 arg
          */
         usage();
         exit(1);
      }
      if(ac == 1) {
         /*
          * Ah! we have a command line argument... check it
          */
         if(!strcmp(*av, "-h") || !strcmp(*av, "-?")) {
            /*
             * help option
             */
            usage();
            exit(1);
         } else {
            /*
             * filename specified; open infile and create outfile
             */
            if(open_files(*av) != 0)
               exit(2);
         }
      }
      /*
       * OK, everything is set.... filter and close files....
       */
      while(fgets(line, LINELEN, ifp) != NULL) {
         if(line[0] == 'r' || line[0] == 'n')         continue;
         if(!mystrcmp(line, "SV packet"))            continue;
         if(!mystrcmp(line, "status"))               continue;
         if(!mystrcmp(line, "set"))                  continue;
         if(!mystrcmp(line, "say"))                  continue;
         if(!mystrcmp(line, "Rcon from"))            continue;
         if(!mystrcmp(line, "^~^~^"))               continue;
         if(!mystrcmp(line, "---------"))            continue;
         if(!mystrcmp(line, "AP Running"))            continue;
         if(!mystrcmp(line, "AP Not Running"))         continue;
         if(!mystrcmp(line, "Bad rcon from"))         continue;
         if(!mystrcmp(line, "broadcast:"))            continue;
         if(!mystrcmp(line, "cache models"))            continue;
         if(!mystrcmp(line, "CG_Command_ProcessFil"))   continue;
         if(!mystrcmp(line, "CGM buffer for"))         continue;
         if(!mystrcmp(line, ">>>challenge"))         continue;
         if(!mystrcmp(line, "Channel named"))         continue;
         if(!mystrcmp(line, "class is not"))            continue;
         if(!mystrcmp(line, "Client "))               continue;
         if(!mystrcmp(line, "client"))               continue;
         if(!mystrcmp(line, "Going from"))            continue;
         if(!mystrcmp(line, "Going to"))               continue;
         if(!mystrcmp(line, "LOCALIZATION ERROR"))      continue;
         if(!mystrcmp(line, "Parse/Load"))            continue;
         if(!mystrcmp(line, "soundtrack"))            continue;
         if(!mystrcmp(line, "SVC_DirectConnect"))      continue;
         if(!mystrcmp(line, "SV_SendClient"))         continue;
         if(!mystrcmp(line, "ERROR"))               continue;
         if(!mystrcmp(line, "Taking item Bino"))         continue;
         if(!mystrcmp(line, "Taking ammo"))            continue;
         if(!mystrcmp(line, "tt"))                  continue;
         if(!mystrcmp(line, "TIKI_FreeKkel"))         continue;
         if(!mystrcmp(line, "TIKI_InitTiki"))         continue;
         if(!mystrcmp(line, "TIKI_Load"))            continue;
         if(!mystrcmp(line, "Tiki:LoadFile"))         continue;
         if(!mystrcmp(line, "Unknown parameter"))      continue;
         if(!mystrcmp(line, "version "))               continue;
   
         fputs(line, ofp);
      }
   
   
   
      if(ac == 1) {
         fclose(ifp);
         fclose(ofp);
      }
      exit(0);
   }
   
   void
   usage()
   {
      extern char *progname;
   
      fprintf(stderr, "Usage: %s [-h] [logfile.log]n", progname);
      fprintf(stderr, "   filters useless entries from MoH:AA gameserver logn");
      fprintf(stderr, "   -h or -? prints this help messagen");
      fprintf(stderr, "   logfile.log is the name of the logfile,n");
      fprintf(stderr, "               output appears in logile.out.log,n");
      fprintf(stderr, "   Default logile is stdin, which is printed to stdoutn");
      fprintf(stderr, "NOTE: EXISTING OUTPUT LOG IS OVERWRITTEN SILENTLY.....nn");
      fprintf(stderr, "This software may be used for non-commercial purposes, howevern");
      fprintf(stderr, "PLEASE contact the author before using it.n");
      fprintf(stderr, "Remco Bruijne, email/MSN: n");
      fprintf(stderr, "The author accepts no responsibility for damages resulting of its use.n");
      return;
   }
   
   
   /*
   * Open input logfile and create output logile. Set the filedescriptors
   * and return.
   *
   * ifname points to input logfile name (should have a '.log' extension)
   * ofname is a string for creating output logfile name.
   *    That is done by:
   *       1) copying ifname into ofname string
   *       2) seeking end of string
   *       3) stepping back 4 chars (over the .log)
   *       4) checking if the last 4 input filename chars are indeed '.log'
   *       5) replacing the .log with .out.log
   *
   *  When filename constructions is done, the ifname is opened and
   *  the ofname is created.
   */
   int
   open_files(ifname)
   char *ifname;
   {
       char *cp;
      int   namesize = 0;
      char  ofname[PATHLEN];   /* max length of pathname   */
   
      /*
       * create ofname
       */
      strcpy(ofname, ifname); /* copy input name to output name */
   
      /*
       * search end of ifname in the ofname string
       */
      cp = ofname; namesize = 1;
      while(*cp != '') {
         cp++; namesize++;
         /*
          * Check that we don't overrun the buffer
          */
         if(namesize >= PATHLEN-4) { /* -4 is for ".log" */
            fprintf(stderr, "%s: pathname of logfile too longn", progname);
            return(-1);
         }
      }
      if(namesize < 6) {
         /*
          * shortest name: a.log'' = 6 chars
          * shorter means that we cannot have '.log'.
          */
         fprintf(stderr, "%s: input filename must end with .logn", progname);
         return(-1);
      }
      /*
       * we are at the end of the input filename in the string ofname
       * check if ifname ends with ".log"
       */
      cp -= 4;   /* cp should now point to the '.' of '.log' */
      if(strcmp(cp, ".log")) {
         fprintf(stderr, "%s: input filename must end with .logn", progname);
         return(-1);
      }
   
      /*
       * replace the '.log' with '.out.log'.
       */
      strcpy(cp, ".out.log");
   
      /*
       * open infile
       */
      if((ifp = fopen(ifname, "r")) == NULL) {
         fprintf(stderr, "%s: Cannot open logfile %sn", progname, ifname);
         return(-1);
      }
   
      /*
       * create the output file....
       */
      if((ofp = fopen(ofname, "w")) == NULL) {
         fprintf(stderr, "%s: Cannot create out logfile %sn", progname, ofname);
         return(-1);
      }
   
      return(0);
   }
   
   /*
   * check if s1 starts with s2
   */
   int
   mystrcmp(s1, s2)
   char *s1, *s2;
   {
      while(*s2 != '') {
         if(*s1 != *s2) return(1);
         s1++; s2++;
      }
      return(0);
   }
   

PacMan

How would one run this c++ script?

   

   Also,

   

   could this also parse mod statistics.. ie.. freeze tag melts, ctf, demolition, etc?

   

   Good info.
Very Respectfully,
-|SwS|-Gen.PacMan|Sr|
www.specwarriors.com


[KC]Murdock

PacMan :
   How would one run this c++ script?

   

   Also,

   

   could this also parse mod statistics.. ie.. freeze tag melts, ctf, demolition, etc?

   

   Good info.

   

   

   Hi,

   

   You have to run it through a c+ compiler like, mingw. http://www.mingw.org/">http://www.mingw.org/ This little scipt removes all unwanted info from your logfile. I used it to have a smaller logfile for my stats webpage. Otherwise I got an php-timeout and the stats where incomplete.

agonotheta

thank you murdock but i already have that kind of script in my excel workbook.

   

   thanks dark, i tried foresight and it worked. but it doesnt give me a rcon status-log, it gives a only name and IP and lots of other information that i dont need.

   the problem is that i need a real rcon status formatation otherwise i have to rewrite all the code i have done in my excel workbook (about 700 lines), and now that i finally got it working the way i want im not very intrested in rewriting it.

   

   i need the formataion to be playernumber, score, ping, name, lastmsg.. and so on or my script will delete the line thinking its gametext.

Salombo

There is an alternative which is java based and requires java runtime. It will get player names,ip,score,etc ...

   It's worth taking a look:

   

   http://www.modtheater.com/forum/showthread.php?t=27211">[orange]Alternative[/orange]
_______________________
Start Search Here B)