AuthorMessage
Impakto
Clone
Posts: 6

MEka, can u post an example that one client in vb7 connect in a hub? Thanks
Meka][Meka
Unstopable
Posts: 700

no the only reason ur asking is to make flooders, well i can do examples of using sockets, if u wanna do shit like that learn the protocol yourself, this is learning to program, not giving them the code written for em ;)
Impakto
Clone
Posts: 6

I don't understand the LockTokey...
Mickey
Ametuar
Posts: 115

Quoted from Impakto
I don't understand the LockTokey...

Google is my friend, let it be yours too. There are routine samples in several programming languages how to count LockTokey:
http://dcplusplus.sourceforge.net/wiki/index.php/LockToKey?PHPSESSID=447baad0e9f17d73a8c750db2a3dd5c0#VBx2e.NET
Piece of reading:
- DC++ wiki's pages
- NMDC protocol
- Extensions.txt included in DC++ source.
 :wink:
Impakto
Clone
Posts: 6

Yo. I found this code:
Code:
    Public Function LockToKey(ByVal Lck As String) As String
        Dim h As Integer, j As Integer, n As Integer
        n = 5
        h = InStr(1, Lck, " ")
        If h Then Lck = Left$(Lck, h - 1)
        h = Asc(Lck) Xor Asc(Right$(Lck, 1)) Xor Asc(Right$(Lck, 2)) Xor n
        h = (h \ 16) Xor (h * 16)
        Do While h > 255
            h = h - 256
        Loop
        Select Case h
            Case 0, 5, 36, 96, 124, 126
                LockToKey = "/%DCN" & Right$("00" & CStr(h), 3) & "%/"
            Case Else
                LockToKey = Chr(h)
        End Select
        For j = 2 To Len(Lck)
            h = Asc(Mid$(Lck, j, 1)) Xor Asc(Mid$(Lck, j - 1, 1))
            h = (h \ 16) Xor (h * 16)
            Do While h > 255
                h = h - 256
            Loop
            Select Case h
                Case 0, 5, 36, 96, 124, 126
                    LockToKey = LockToKey & "/%DCN" & Right$("00" & CStr(h), 3) & "%/"
                Case Else
                    LockToKey = LockToKey & Chr(h)
            End Select
        Next
    End Function

It's a function and btw I understand.
But I don't understand that I send the protocol to the host. Example
Winsock1.SendData "$Lock LockToKey|"
It's true?
bastya_elvtars
n00b
Posts: 49

I am not into VB at all but don't you need some concat here?
Corayzon
Regular
Posts: 67

no1, dont use winsock in vb.net
no2, Send("$Key " & Lock2Key(sLock) & "|")
where sLock is the argument from the $Lock command
no3, dont write flooders or ill make ur comp die on its arse!
Impakto
Clone
Posts: 6

then what I use if don't use winsock?? uhm and then I amn't afraid....
Mickey
Ametuar
Posts: 115

Quoted from bastya_elvtars
I am not into VB at all but don't you need some concat here?

Yes you need to cut off the $Lock and pk parts before passing the lock code to LockToKey.
[-TE-]-ßlå¢kMågî¢-
Regular
Posts: 78

no3, dont write flooders or ill make ur comp die on its arse! 
seeing things like that makes me realise how much i cant wait for my connection to be on cos i miss being around you guys.
as said b4 dude this forum is not to tell people how to program and make flooders so i suggest you find sum1 else if that is why you are here
Meka][Meka
Unstopable
Posts: 700

yep, we're here to teach you to program, not teach you how to 'write' a 'program' ;)