gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfx
76793 Posts in 13502 Topics by 1651 Members - Latest Member: Arnold99 November 23, 2024, 09:29:59 am
*
gfx*gfx
gfx
WinMX World :: Forum  |  Technical  |  Protocol Discussion  |  Need help to decrypt
gfx
gfxgfx
 

Author Topic: Need help to decrypt  (Read 14436 times)

0 Members and 1 Guest are viewing this topic.

Offline Josh

  • Forum Member
  • Thinking about tomorrow...
    • http://www.winmxunlimited.net
Need help to decrypt
« Reply #20 on: January 07, 2006, 08:19:18 am »
Code: [Select]
Private Sub W_Connect()
Text1.SelStart = Len(Text1.Text)
Text1.SelText = "Connected to Channel..." & vbCrLf

''''''''' Below is from CSock - Socket1_OnConnect
'''HELLLLLLLLLLLLLLLLLLLLLLLLP

   
    Dim buffer() As Byte
    Dim wLen As Long
    Const m_bOldJoin As Boolean = False
   
    m_bListen = False
   
    'Wait for first "1"
    Do While RecvBufferLength = 0
        DoEvents
    Loop
    buffer = RecvBufferGet(1)
    If (buffer(0) = &H31) Then
        ReDim Preserve buffer(1024)
        Call MXSock.CreateCryptKeyID(&H57, buffer())
       
        'Send UP Key Block
'        Call Socket1.SendData(buffer())
W.SendData buffer()
       
        'Recv DW Key Block
        'Get KeyBlock (16 bytes, just a lil gamble)
        Do While RecvBufferLength < 16
            DoEvents
        Loop
        buffer = RecvBufferGet(16)
       
        'Check Cryptkey
        If (GetCryptKeyID(buffer()) <> &H58) Then
            'this was not crypt key from Chatserver :-(
Text1.SelText = "Error Negotiating" & vbCrLf
           W.Close
            Exit Sub
        End If
       
        'Get the keys
        Call GetCryptKey(buffer(), m_dwUPKey, m_dwDWKey)
       
        'Prepare login buffer...
        ReDim buffer(5)
       
        'Send new pre-login packet
        'ED 13 01 00 31   wLen = 5
        If (Not m_bOldJoin) Then
            buffer(0) = &HED
            buffer(1) = &H13
            buffer(2) = &H1
            buffer(3) = &H0
            buffer(4) = &H31
            wLen = 5
           
            m_dwUPKey = EncryptMXTCP(buffer(), wLen, m_dwUPKey)
           
            W.SendData buffer()
        End If
       
        'Login-Request: (Client)
        '0x0064][00:1][RoomName:N][LineType:2][Room-IP-Address:4][UDP-Port:2][SharedFiles:4][Username:N][00:1]
       
        buffer = CreateLogin(buffer()) 'put this somewhere else because it looks ugly
       
        m_dwUPKey = EncryptMXTCP(buffer(), wLen, m_dwUPKey)
       W.SendData buffer()
       
        Do While RecvBufferLength < 5
            DoEvents
        Loop
        buffer = RecvBufferGet(5)
       
        m_dwDWKey = DecryptMXTCP(buffer(), 5, m_dwDWKey)
       
        If (buffer(0) + (buffer(1) * 256)) = &H66 Then
            Text1.SelText = "Login Rejected" & vbCrLf
            W.Close
            Exit Sub
        End If
       
        m_wNumUsers = buffer(2) + (buffer(3) * 256)
      Text1.SelText = "Login Granted!" & vbCrLf
       
        m_bListen = True
        TIMER_PING.Interval = (5 * 60) * 1000
        TIMER_PING.Enabled = True
       
        'main recv loop
       
        PacketHandling = True ' now automatically everything ends up in DispatchPacket
    End If
end sub


That is not working so i cant make the key? i need help
- Josh

Offline Josh

  • Forum Member
  • Thinking about tomorrow...
    • http://www.winmxunlimited.net
Need help to decrypt
« Reply #21 on: January 07, 2006, 08:19:39 am »
im ree doing the project so its diff..
- Josh

Offline Zénar

  • Forum Member
  • *****
  • Born again christian since 2010!
Need help to decrypt
« Reply #22 on: January 07, 2006, 07:14:14 pm »
Ok it's not impossible but i've try a full of things. First, I've changed the sock by winsock control and it not work. This project is very big and I don't think that have worked before. Maybe it's an old project and the creator have never finished this because it won't work.

And i'm surprise! That have 2 keys to decrypt :o ! Hmmmm... I'm good with VB but not like Draconis! I think this project need something to work and I must find this thing.
[John 14:6] Jesus told him, "I am the way, the truth, and the life. No one can come to the Father except through me."
[Jean 14:6] Jésus lui dit: Je suis le chemin, la vérité, et la vie. Nul ne vient au Père que par moi.

Offline Zénar

  • Forum Member
  • *****
  • Born again christian since 2010!
Need help to decrypt
« Reply #23 on: January 07, 2006, 07:19:51 pm »
Josh, that script block here:

Code: [Select]
Do While RecvBufferLength < 5
            DoEvents
        Loop
        buffer = RecvBufferGet(5)


It's because when this chat send informations to the server, the server reject the reply and close the socket. After, the client wait to another response and this response will never come.

I think it was a part of that script do not decrypt proprely or have a bug. Ah yes! It's strange the client send a full of 0 0 0 0 0 0 like the picture before?!?!

I've tryed alse the other project to decypt. More simple but don't work. It take only one key and winmx use two keys...
[John 14:6] Jesus told him, "I am the way, the truth, and the life. No one can come to the Father except through me."
[Jean 14:6] Jésus lui dit: Je suis le chemin, la vérité, et la vie. Nul ne vient au Père que par moi.

Offline Zénar

  • Forum Member
  • *****
  • Born again christian since 2010!
Need help to decrypt
« Reply #24 on: January 07, 2006, 07:43:21 pm »
It's easy to read the first 1 with  instr(FirstString, 1)  or  left(FirstString, 1) .

So, I put this project for a priority too!  8)
[John 14:6] Jesus told him, "I am the way, the truth, and the life. No one can come to the Father except through me."
[Jean 14:6] Jésus lui dit: Je suis le chemin, la vérité, et la vie. Nul ne vient au Père que par moi.

Offline Josh

  • Forum Member
  • Thinking about tomorrow...
    • http://www.winmxunlimited.net
Need help to decrypt
« Reply #25 on: January 07, 2006, 09:44:19 pm »
I'm confused. Did he make this out of the dark ages or somthing?
- Josh

Offline Zénar

  • Forum Member
  • *****
  • Born again christian since 2010!
Need help to decrypt
« Reply #26 on: January 07, 2006, 10:06:28 pm »
Lol Josh! I really don't know!
[John 14:6] Jesus told him, "I am the way, the truth, and the life. No one can come to the Father except through me."
[Jean 14:6] Jésus lui dit: Je suis le chemin, la vérité, et la vie. Nul ne vient au Père que par moi.

Offline Josh

  • Forum Member
  • Thinking about tomorrow...
    • http://www.winmxunlimited.net
Need help to decrypt
« Reply #27 on: January 07, 2006, 11:20:29 pm »
Multi has confirmed that the encryption is messed up.

If you try to put text with any ascii character over 127 it messes up.
- Josh

Offline Josh

  • Forum Member
  • Thinking about tomorrow...
    • http://www.winmxunlimited.net
Need help to decrypt
« Reply #28 on: January 07, 2006, 11:56:57 pm »
Good news! - Multi is helping me fix it. Not krish's piece of junk but the encryption.  Since krish got multi to convert it all to vb he will be helping me because i give more effort than krish. Multi told krish what to do but he said it wouldn't matter so krish went along and kept making it worse.

Multi thinks its a problem with the encryption because it has errors with ascii characters put with text over 127.

We hope to have a working example client by the end of this comming week :)
- Josh

KM

  • Guest
Need help to decrypt
« Reply #29 on: January 08, 2006, 02:42:27 am »
and no doubt when multi has finished fixing krishes program you will release it on your website with "Completely made by Josh without any help" all over it like you have done with every previous program anyone has made?

Offline String

  • Core
  • *****
    • winmx.p2pforum.it
Krishean's program broken ?
« Reply #30 on: January 08, 2006, 05:04:30 pm »
Maybe that code is unfinished... as i know that Krish is not so bad writing VB code as i would be. I think that one on his web site is not the good one and he won't release the best code he made.

Anyway keep up with the good work.

Offline ÐØØMÊ®

  • Forum Member
  • I am coming for you, it is only a matter of time!
    • Quakehell
Re: Need help to decrypt
« Reply #31 on: November 17, 2007, 01:17:26 pm »
i looked for that file   MxSock4VB.zip file   it wasn't their

Offline ÐØØMÊ®

  • Forum Member
  • I am coming for you, it is only a matter of time!
    • Quakehell
Re: Need help to decrypt
« Reply #32 on: November 17, 2007, 01:19:38 pm »
hay wait that   MxSock4VB.zip file   is in wpn_dev section   http://draconislabs.net/wpn_dev/

Offline ÐØØMÊ®

  • Forum Member
  • I am coming for you, it is only a matter of time!
    • Quakehell
Re: Need help to decrypt
« Reply #33 on: November 17, 2007, 01:28:18 pm »
& also that file doesn't work

Offline GhostShip

  • Ret. WinMX Special Forces
  • WMW Team
  • *****
Re: Need help to decrypt
« Reply #34 on: November 17, 2007, 03:55:57 pm »
If you had read the entire thread Doomer you would have discovered that that was the original posters discovery, it can be modified to work in a fashion but the main problem of writing anything winmx client/server related in vb is the lack of multithreading (something I already mentioned) , for this reason any decent efforts chould be made in something like c++/c# or vb.net where you can move past these limitations.


Offline Zénar

  • Forum Member
  • *****
  • Born again christian since 2010!
Re: Need help to decrypt
« Reply #35 on: November 17, 2007, 04:18:48 pm »
If you see Draconis works, you will see all declarations you must do to use the DLL.

Well... I will save the job for you lol

Code: [Select]
Public Declare Sub DecryptFrontCode Lib "MXSock.dll" Alias "DecryptFrontCode@8" (ByVal pSrc As String, ByVal pDst As String)
    Public Declare Sub DecryptMXUDP Lib "MXSock.dll" Alias "DecryptMXUDP@8" (ByVal pBuf As String, ByVal iLen As Integer)
    Public Declare Function GetFileHash Lib "MXSock.dll" Alias "GetFileHash@12" (ByVal lpszFileName As String, ByRef pHash As Integer, ByRef pFileLen As Long) As Integer

    Public Declare Sub CreateCryptKeyID Lib "MXSock.dll" Alias "CreateCryptKeyID@8" (ByVal wID As Integer, ByVal pBlock As String)
    Public Declare Function GetCryptKey Lib "MXSock.dll" Alias "GetCryptKey@12" (ByVal pBlock As String, ByRef pUpKey As Integer, ByRef pDwKey As Integer) As Integer
    Public Declare Function GetCryptKeyID Lib "MXSock.dll" Alias "GetCryptKeyID@4" (ByVal pBlock As String) As Integer
    Public Declare Function EncryptMXTCP Lib "MXSock.dll" Alias "EncryptMXTCP@12" (ByVal pBuf As String, ByVal iLen As Integer, ByVal dwKey As Integer) As Integer
    Public Declare Function DecryptMXTCP Lib "MXSock.dll" Alias "DecryptMXTCP@12" (ByVal pBuf As String, ByVal iLen As Integer, ByVal dwKey As Integer) As Integer

Good luck  :wink:
[John 14:6] Jesus told him, "I am the way, the truth, and the life. No one can come to the Father except through me."
[Jean 14:6] Jésus lui dit: Je suis le chemin, la vérité, et la vie. Nul ne vient au Père que par moi.

Offline MinersLantern

  • Forum Member
Re: Need help to decrypt
« Reply #36 on: November 23, 2007, 08:28:07 am »
What is wrong with using plain olde fashioned C?
It's cheaper, better, faster.
C++ could work too, I guess, even though it too is one of them thar newfangled languages!
:D

WinMX World :: Forum  |  Technical  |  Protocol Discussion  |  Need help to decrypt
 

gfxgfx
gfx
©2005-2024 WinMXWorld.com. All Rights Reserved.
SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
Page created in 0.009 seconds with 22 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!