All pastes #80131 Raw Edit

mike

public text v1 · immutable
·published 2006-07-06 02:48 UTC
rendered paste body
--- ysmv7_2_9_7/src/YSM_Network.c       2006-07-05 22:33:31.000000000 -0400
+++ ysmv7_2_9_8/src/YSM_Network.c       2006-02-12 14:53:34.000000000 -0500
@@ -1,4 +1,4 @@
-/*     $Id: YSM_Network.c,v 1.215 2005/12/26 23:44:58 rad2k Exp $      */
+/*     $Id: YSM_Network.c,v 1.216 2006/02/12 17:14:49 rad2k Exp $      */
 /*
 -======================== ysmICQ client ============================-
                Having fun with a boring Protocol
@@ -26,7 +26,7 @@
 */

 #include "YSM.h"
-__RCSID("$Id: YSM_Network.c,v 1.215 2005/12/26 23:44:58 rad2k Exp $");
+__RCSID("$Id: YSM_Network.c,v 1.216 2006/02/12 17:14:49 rad2k Exp $");

 #include "YSM_ICQv7.h"
 #include "YSM_Lists.h"
@@ -1504,14 +1504,19 @@

                 switch(Chars_2_Wordb(thetlv.type))
                 {
-                        case 0x03:      /* Last TLV found */
+
+                        case 0x03:      /* user login timestamp */
                                 tsize += len;
-                               /* seen on trillian, extra TLV here type 4 */
-                               memcpy( &thetlv, data+tsize, sizeof(TLV));
-                               if (Chars_2_Wordb(thetlv.type) == 4)
-                                       tsize += 4;  /* skip next TLV head */
+                                                               break;
+
+                                               case 0x13:              /* no idea what this is, just yet */
+                                                               tsize += len;
+                                                               break;
+
+                                               case 0x02:              /* start of Message data */
+
                                YSM_TreatMessage( Chars_2_Wordb(MsgFormat),
-                                               tsize,
+                                                                       tsize-sizeof(TLV),      /* we want start of TLV */
                                                data,
                                                r_uin,
                                                r_status,
@@ -1531,7 +1536,7 @@
                        /* possibly strange utility msg. */
                        case 0x05:
                                YSM_TreatMessage( Chars_2_Wordb(MsgFormat),
-                                                       tsize,
+                                                               tsize - sizeof(TLV),    /* start at 0x05 */
                                                        data,
                                                        r_uin,
                                                        r_status,
@@ -1566,9 +1571,6 @@

        if (victim) victim->timing.LastMessage = time(NULL);

-       /* Quick fingerprint */
-       if (data[tsize+5] != 0x01 || data[tsize+6] != 0x01)
-               fprint = FINGERPRINT_TRILLIAN_CLIENT;

        memset(&thetlv, '\0', sizeof(TLV));
        memcpy(&thetlv, data+tsize, sizeof(TLV));