• Welcome to Valhalla Legends Archive.
 

Yes finally!! (0x50)

Started by SubLiminaL_WolF, May 07, 2003, 10:26 PM

Previous topic - Next topic

SubLiminaL_WolF

ok i get it finally

on connect
packetbuf.insert((int)0);
               packetbuf.insert("68XI", 4); //platform
               packetbuf.insert("PXES", 4); //product
               packetbuf.insert((int)0xc7); //version byte
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert("USA"); //country abbreviation
               packetbuf.insert("United States"); //country name
packetnuf.sendpacket(s, 0x50);

i think thats right then

while connected if 0x50 i dunno what to put inside the packet when it is sent do i put the 0x51 info and send 0x51?

tell me if im wrong anywhere in here

SubLiminaL_WolF

ok now i get a checkversion() failed! i think i dunno whgat it is cuz i have the new hash

tick = GetTickCount();
   send(s, "\x1", 1, 0);
   packetbuf.insert((int)0);
   packetbuf.insert("68XI", 4); //platform
   packetbuf.insert("PXES", 4); //product
   packetbuf.insert((int)0xc7); //version byte
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert("USA"); //country abbreviation
   packetbuf.insert("United States"); //country name
   packetbuf.sendpacket(s, 0x50);



then  if connected


case 0x50:
               //Mpq name & hash command
               strcpy(mpqname, buffer + 12);
               strcpy(hashcmd, buffer + 25);
               if(!CheckRevision("star\\starcraft.exe", "star\\storm.dll", "star\\battle.snp", hashcmd, &version, &checksum, exeinfo, mpqname)){
                  AppendText(IDC_CHATWND, WHITE, "%s", timestamp);
                  AppendText(IDC_CHATWND, RED, "CheckRevision() failed!\n");
                  Disconnect();
                  return;
               }
               AppendText(IDC_CHATWND, WHITE, "%s", timestamp);
               AppendText(IDC_CHATWND, WHITE, "Checking version & Cdkey...\n");
               break;
            case 0x51:
               //Version check result
               if(buffer[4] != 0x00){
                  AppendText(IDC_CHATWND, WHITE, "%s", timestamp);
                  AppendText(IDC_CHATWND, RED, "Version & Cdkey check failed!\n");
                  Disconnect();
                  return;
               }
               /*packetbuf.sendpacket(s, 0x14);
               packetbuf.sendpacket(s, 0x2d);
               packetbuf.insert((int)0x1b);
               packetbuf.insert((int)0);
               packetbuf.insert("bnserver.ini");
               packetbuf.sendpacket(s, 0x33);*/
               packetbuf.sendpacket(s, 0x25);
               packetbuf.sendpacket(s, 0x3a);
               break;

i get the check revision() fail what do you think it is?

tA-Kane

Breakpoint CheckRevision() and follow it until it returns false, silly.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

SubLiminaL_WolF

how would i breakpoint it i can follow it with visually with appendtext(blach blah "Test1...\n");

SubLiminaL_WolF

nvm
i think there is something wrong with

//Mpq name & hash command
              strcpy(mpqname, buffer + 12);
              strcpy(hashcmd, buffer + 25);


Camel

make sure all of the vars you are passing to checkrevision() are correct (breakpoint it)
if they are, try using fully qualified paths for the files
it's also a good idea to add code to check if the files exist before even attempting to call checkrevision

Kp

Quote from: Camel on May 08, 2003, 07:13 PM
make sure all of the vars you are passing to checkrevision() are correct (breakpoint it)
if they are, try using fully qualified paths for the files
it's also a good idea to add code to check if the files exist before even attempting to call checkrevision
It'd be an even better idea to use a version which returns a result code. :)  For example, zero = success, one = bad MPQ name, two = bad hash command, three = missing file, etc.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

tA-Kane

Quote from: Camel on May 09, 2003, 01:05 AMThere is no "magick pixie dust". There is, however, IBM.  ;)
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Banana fanna fo fanna