[rtmpdump] bug of HandShake(RTMP * r, int FP9HandShake) in handshake.h

Xspeed xspeed1989 at gmail.com
Tue Nov 27 06:55:39 CET 2012


this is the data send to RTMPE server;

0x00F3EDEF  06 00 00 00 00 80 00 03 02 f5 61 55 a5 b6 69 d1 7e 86
 .....€...?aU??i?~?
0x00F3EE01  25 e6 d2 b5 d9 4c 94 df 93 ba 69 b0 61 e0 e6 ef 13 89
 %????L????i?a???.?
0x00F3EE13  61 0a 30 a4 3f 45 8a ce 34 1b 43 55 83 00 43 4d d3 4d  a.0??E??
4.CU?.CM?M
0x00F3EE25  39 55 1b a9 64 40 ad ae 50 73 e2 31 a4 db 1c 98 58 05  9U.?d@
??Ps?1??.?X.
0x00F3EE37  f3 d5 c9 23 9f 44 31 30 1e b4 ba cf db a0 6e 08 d4 15
 ???#?D10.?????n.?.
0x00F3EE49  f2 07 7c 6d f0 6e 09 20 c2 92 71 14 d2 bb 0e bc b4 ab  ?.|m?n.
??q.??.???
0x00F3EE5B  9f 60 b0 9a b9 82 a6 a9 4a 62 7f c7 f5 bf c8 6a 57 fc
 ?`??????Jb.????jW?
0x00F3EE6D  c9 21 6b 9d 64 27 47 69 0f 72 cd 00 00 00 00 00 00 00
 ?!k?d'Gi.r?.......


2012/11/27 Xspeed <xspeed1989 at gmail.com>

> static int
> WriteN(RTMP *r, const char *buffer, int n)
> {
>   const char *ptr = buffer;
> #ifdef CRYPTO
>   char *encrypted = 0;
>   char buf[RTMP_BUFFER_CACHE_SIZE];
>
>   if (r->Link.rc4keyOut)
>     {
>       if (n > sizeof(buf))
> encrypted = (char *)malloc(n);
>       else
>  encrypted = (char *)buf;
>       ptr = encrypted;
>       RC4_encrypt2(r->Link.rc4keyOut, n, buffer, ptr);
>     }
> #endif
>
>   while (n > 0)
>     {
>       int nBytes;
>
>       if (r->Link.protocol & RTMP_FEATURE_HTTP)
>         nBytes = HTTP_Post(r, RTMPT_SEND, ptr, n);
>       else
>         nBytes = RTMPSockBuf_Send(&r->m_sb, ptr, n);
>       /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d\n", __FUNCTION__, nBytes); */
>
>       if (nBytes < 0)
> {
>   int sockerr = GetSockError();
>   RTMP_Log(RTMP_LOGERROR, "%s, RTMP send error %d (%d bytes)",
> __FUNCTION__,
>       sockerr, n);
>
>   if (sockerr == EINTR && !RTMP_ctrlC)
>     continue;
>
>   RTMP_Close(r);
>   n = 1;
>   break;
>  }
>
>       if (nBytes == 0)
> break;
>
>       n -= nBytes;
>       ptr += nBytes;
>     }
>
> #ifdef CRYPTO
>   if (encrypted && encrypted != buf)
>     free(encrypted);
> #endif
>
>   return n == 0;
> }
>
> I think you need to initialize your key when you call the following
> encryption function, but you didn't, which leads to my error.
> RC4_encrypt2(r->Link.rc4keyOut, n, buffer, ptr);
>
> 2012/11/27 Xspeed <xspeed1989 at gmail.com>
>
>> Actually the program is not using the library I compiled, but the one
>> that exists in system
>>
>>
>> 2012/11/27 Steven Penny <svnpenn at gmail.com>
>>
>>> Ok I'll bite. You say only success on Ubuntu, yet you have shown a
>>> working
>>> command / output from working command. I will be skeptical until I see
>>> this.
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/rtmpdump/attachments/20121127/795395ef/attachment-0001.html>


More information about the rtmpdump mailing list