gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
75299 Posts in 13185 Topics by 2635 Members - Latest Member: dobbin96 August 16, 2017, 01:21:44 pm
*
gfx*gfx
gfx
WinMX World :: Forum  |  Technical  |  Protocol Discussion  |  Why GetCryptKeyID won't work with secondary...
gfx
gfxgfx
 

Author Topic: Why GetCryptKeyID won't work with secondary...  (Read 3777 times)

0 Members and 1 Guest are viewing this topic.

Offline Zénar

  • Forum Member
  • *****
    • ZenMX
Why GetCryptKeyID won't work with secondary...
« on: November 16, 2006, 04:20:07 am »
Hi! I will explain my problem.

1- I connect to the wpn, I decrypt the message and I get 10 ips, ports etc;
2- I connect to one on them;
3- I send my crypt key 0x52 (16 characters);
4- I receive a message of 16 characters from the secondary server;
5- I use GetCryptKeyID on that message to see if it's 0x53 but it's not working here.

To have more details on that, I've see it's not equal to 0x53 and I see 65535 or FFFF.
If it's not working here, I've ignored that section and I go direcly to get upload and download key.

I do GetCryptKey and I only receive 0 in both of keys.

Here is what I've received from one of secondary server:
Code: [Select]
4F 8A 31 E BF 10 42 47 3A A 7B F5 83 EB CD DA
Thanks if you can help me with that lol

I've see many sources but they use the same things as I do. I just wonder why it's not working with me.

Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Why GetCryptKeyID won't work with secondary...
« Reply #1 on: November 16, 2006, 08:23:53 am »
Can you try using  57 in place of the 52 as that is the correct one for a chat client.


Quote
Client Types
PrimaryClient          0x50
PrimaryServer        0x51
SecondaryClient     0x52
SecondaryServer    0x53
NodeList                 0x54
ChatClient               0x57
ChatServer             0x58




Offline Zénar

  • Forum Member
  • *****
    • ZenMX
Re: Why GetCryptKeyID won't work with secondary...
« Reply #2 on: November 16, 2006, 03:11:00 pm »
Yes it's correct for the char client but it's not the good key to connect into a secondary server wich are 0x52

Offline Zénar

  • Forum Member
  • *****
    • ZenMX
Re: Why GetCryptKeyID won't work with secondary...
« Reply #3 on: November 16, 2006, 08:09:15 pm »
Yeah!!!!!!!!!!!!!!

I can connect on the secondary and download all list of rooms!  :D :D :D

I begin to understand WinMX!

But without Quicks, it will be very more hard for me to find it out! Thanks Quicks for all your help!  :D

Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Why GetCryptKeyID won't work with secondary...
« Reply #4 on: November 16, 2006, 08:31:51 pm »
Nice to hear you have made a break through Zenar.
It seems its been a big learning curve in trying to understand all the protocols and do the programming but I,m pleased to hear your hard work is bearing fruit.  8)

Offline Zénar

  • Forum Member
  • *****
    • ZenMX
Re: Why GetCryptKeyID won't work with secondary...
« Reply #5 on: November 18, 2006, 03:50:13 am »
This is not completed but I show it!

It will be a room lister but you know, this program will help me to perform and learn how winmx works.


Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Why GetCryptKeyID won't work with secondary...
« Reply #6 on: November 18, 2006, 06:48:10 pm »
Excellent work and great persistence Zenar  8)

I look forward to seeing this work grow to something bigger and better  :D

Faithless_Sniper

  • Guest
Re: Why GetCryptKeyID won't work with secondary...
« Reply #7 on: November 19, 2006, 04:48:07 pm »
Good work Zenar i like what i am seeing nice to see people still want to improve WinMx.

Offline Fix978

  • Forum Member
Re: Why GetCryptKeyID won't work with secondary...
« Reply #8 on: September 23, 2008, 05:59:48 am »
hi all,

Zenar... how you solved the problem of key 0xFFFF?

Hi have this problem with Patch of Mx World...


Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Why GetCryptKeyID won't work with secondary...
« Reply #9 on: September 23, 2008, 10:59:47 am »
The FFFF problem is currently being addressed in the new patch delivery Fix978 , if take up is as good as expected we should see this problem disappearing pretty fast.

Offline Zénar

  • Forum Member
  • *****
    • ZenMX
Re: Why GetCryptKeyID won't work with secondary...
« Reply #10 on: September 23, 2008, 04:02:54 pm »
Well, when I was connecting to the secondary, I received FFFF all the time. I wondered why I was getting this and while testing, one peer gave me good keys. I've changed my program to connect faster on these peers and then it worked again. I don't know why but it's rare to optain good peers... That's why it may takes a long time before connecting to secondary.

Here is a tip to connect on secondary faster:
   When you get 10 nodes from the peer cache, run 10 threads and connect to all of them in the same time. When a node will send you good keys, take that node and reject all the others.

That's the way I'm using.

I hope this will help you ;)

Offline Lagerlout666

  • Forum Member
Re: Why GetCryptKeyID won't work with secondary...
« Reply #11 on: September 23, 2008, 05:16:27 pm »
one way to do it lol least then you have the nearest to you and most responsive.
The Solution to 99% of winmx problems

nap.winmxgroup.net        -ONLINE again YAY!!!!!! :D

Praise's daily at the church of "Kopimi"

Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Why GetCryptKeyID won't work with secondary...
« Reply #12 on: September 23, 2008, 05:36:42 pm »
Quote
I don't know why but it's rare to optain good peers

That will not be the case when folks update to the new WinMX Community patch, those not doing so are holding the rest of the network back, we can only hope they understand the importance of removing the final block to obtaining some new programs.

Let us hope common sense and the desire to help winMX grow are in abundance once more  :)

Offline Fix978

  • Forum Member
Re: Why GetCryptKeyID won't work with secondary...
« Reply #13 on: September 25, 2008, 12:08:59 pm »
I have resolved (Thanks to Emulator for Function in C++)

After you received Key 0xFFFF, you Manipulate the buffer and redecrypt Key

Code: [Select]
Key = GetCryptKeyID(Buf(0))
IF KEY = 65535 THEN
   DECODEKEY()
   KEY = GetCryptKey(Buf(0),Upkey,Dwkey)
END IF

Code: [Select]
Private Sub DECODEKEY(ByRef Buf( ) as Byte)
                    buf(0) = Not (buf(0))
                    buf(1) = buf(1) Xor CInt("&H" & "F0")
                    buf(2) = buf(2) Xor CInt("&H" & "F")
                    buf(3) = buf(3) Xor CInt("&H" & "77")
                    buf(4) = buf(4) Xor CInt("&H" & "77")
                    buf(5) = Not (buf(5))
                    buf(6) = buf(6) Xor CInt("&H" & "F0")
                    buf(7) = buf(7) Xor CInt("&H" & "F")
                    buf(8) = buf(8) Xor CInt("&H" & "77")
                    buf(9) = buf(9) Xor CInt("&H" & "77")
                    buf(10) = Not (buf(10))
                    buf(11) = buf(11) Xor CInt("&H" & "F0")
                    buf(12) = buf(12) Xor CInt("&H" & "F")
                    buf(13) = buf(13) Xor CInt("&H" & "77")
                    buf(14) = buf(14) Xor CInt("&H" & "77")
End Sub


For Zenar..
I have used your Class RTF for my project, but i found and solved some problems...
Before using the string with the text, this must be cleared first.. otherwise there are problems with character "\" ; "{" ; "}"

Dim Buffer as string = Text  --> Dim Buffer as String = ClearCode(Text)

Code: [Select]
    Public Function ClearCode(ByVal DATASTRING As String)
        ClearCode= ""
        Dim i%, j$
        For i = 1 To Len(DATASTRING)           
            j = Mid(DATASTRING, i, 1)
            If j = "\" Then
                ClearCode = ClearCode & "\" & j
            ElseIf j = "{" Then
                ClearCode = ClearCode & "\" & j
            ElseIf j = "}" Then
                ClearCode = ClearCode & "\" & j
            Else
                ClearCode = ClearCode & j
            End If
        Next i
    End Function

Thanks to all

Bye

Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Why GetCryptKeyID won't work with secondary...
« Reply #14 on: September 25, 2008, 09:46:00 pm »
Cheers for sharing your notes there Fix978, they look substancially fine :)

I would just like to make clear though to folks that this lock system is not in the new patch so we urge folks to try not to use it , of course it hurts no one if developers add this code to deal with legacy patch issues that may continue for some months before settling down.

WinMX World :: Forum  |  Technical  |  Protocol Discussion  |  Why GetCryptKeyID won't work with secondary...
 

gfxgfx
gfx
©2005-2017 WinMXWorld.com. All rights reserved.
SMF 2.0.14 | SMF © 2017, Simple Machines
Page created in 0.033 seconds with 17 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!