Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 13:09

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Problem with CRC in Teamspeak Floooder
PostPosted: 05 Jan 2008 18:21 

Joined: 05 Jan 2008 17:42
Posts: 3
Hi Aluigi or somebody else who can help,

we have looked at the source of your TS Flooder to understand which packets are needed to establish a connection,
as we are trying to code a similar flooder ourselves.
Now we have a problem with the CRC32-checksum.
It would be very nice of you if you could explain us how you generate the CRC32-checksum (and about the table in mycrc32.h).

At the moment we are trying to code it in PHP (later in Perl).

greetz, RichardC & ghost0cnc

Contact:
This Forum or
ICQ:
RichardC, 339020429
ghost0cnc, 234277017


Top
 Profile  
 
 
 Post subject:
PostPosted: 07 Jan 2008 11:44 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
http://it2.php.net/crc32


Top
 Profile  
 
 Post subject:
PostPosted: 09 Jan 2008 07:07 

Joined: 05 Jan 2008 17:42
Posts: 3
lol
ghost trys it in PHP^^
Me in C++
:D

Now we 2 stopped at a problem about WHAT espacially the checksum is made of.
In pck1[] you use simple Strings like "CSUM" and "NICKNAME". When you tranform it to the Nickname the user wants?
And what does stand in pack1[] after that?


Top
 Profile  
 
 Post subject:
PostPosted: 09 Jan 2008 10:20 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
CSUM was an old thing I used in old version of tspeakfp for keeping the space for the 32 bits checksum.
In the recent versions the packets are built at runtime and the checksum is then calculated automatically through the tscrcseq function:

Code:
void tscrcseq(u_char *data, int len) {
    int     type;

    get16(data, &type);

    put32(data + 12, seq[type & 15]++);

    if((type == 0xbef4) || (type == 0xbef1)) {
        put32(data + 16, 0);
        put32(data + 16, crc32(data, len));
    } else {
        put32(data + 20, 0);
        put32(data + 20, crc32(data, len));
    }
}


in short what this small experimental function does is just taking the type of the packet we have used and if it is 0xbef4 or 0xbef1 it will place the checksum at offset 16 of the packet otherwise offset 20.

Then put 4 zeroes at that offset and calculate the checksum on the entire packet, the resulted number will be placed where were placed the zeroes.


Top
 Profile  
 
 Post subject:
PostPosted: 15 Jan 2008 11:56 

Joined: 05 Jan 2008 17:42
Posts: 3
Thank you Aluigi!
I will try to understand it now^^


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: