x User removed: <unknown>

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
gnomer
Posts: 15
Joined: 2005-01-24 07:34

x User removed: <unknown>

Post by gnomer » 2005-01-24 07:44

Hi alll im write in VB small client dc. and my client don't connect to PtokaX and YHUB. WHY?? I'm Thoughts that is bad $GetINFO. Wgat is code to good $GetINFO ?? plis help

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Re: x User removed: <unknown>

Post by TheParanoidOne » 2005-01-24 08:06

gnomer wrote:Wgat is code to good $GetINFO ?? plis help
Have a look at the wiki and the protocol documentation.
The world is coming to an end. Please log off.

DC++ Guide | Words

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 08:11

i'm look there but on this site is only this

Code: Select all

C>H: Connection
	H>C: $Lock <lock> Pk=<pk>|
	H>C: $HubName <hubname>|
	C>H: $Key <key>|$ValidateNick <nick>|
	C>H: $MyINFO $ALL <nick> <interest>$ $<speed>$<e-mail>$<sharesize>$
	C>H: $GetINFO <othernick> <nick>
	C>H: $GetINFO...
	
i' want some good code :( :cry:

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2005-01-24 08:20

Show us your code (where there are problems) and we can help you fix it.

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 08:23

ok this is code:

Code: Select all

Private Sub SriptItOut(sData)
Dim key As String

    'NewLine (sData)
    key = Replace(sData, "$Lock ", "")
    key = Left(key, Len(sData) - 33)
    key = Lock2Key(key)
    'rtfIncome.Text = key

    ws.SendData "$Key " & Lock2Key(Replace(sData, "$Lock", "")) & "|"
    ws.SendData "$ValidateNick " & txtName.Text & "|"
    ws.SendData "$Version 0.401" & "|"
    ws.SendData "$MyINFO $ALL " & txtName.Text & " " & "" & "<++ V:0.401,M:A,H:1/0/20,S:10>$ $LAN(T1)$$" & txtShare.Text * 1024 * 1024 * 1024 & "$" & "|"
    ws.SendData "$GetINFO" & txtName.Text & "|"
    ws.SendData "$GetINFO..."

End Sub

TheParanoidOne
Forum Moderator
Posts: 1420
Joined: 2003-04-22 14:37

Post by TheParanoidOne » 2005-01-24 08:37

gnomer wrote: ws.SendData "$GetINFO..."
Why have you added this line?
The world is coming to an end. Please log off.

DC++ Guide | Words

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 08:40

ok i'm delet this line

Code: Select all

ws.SendData "$GetINFO..."
but still not connect :cry:

ullner
Forum Moderator
Posts: 333
Joined: 2004-09-10 11:00
Contact:

Post by ullner » 2005-01-24 09:27

Code: Select all

 C>H: $GetINFO <othernick> <nick> 
gnomer wrote: ws.SendData "$GetINFO" & txtName.Text & "|"
Shouldn't there be more after txtName.Text and before the pipe?

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2005-01-24 09:34

try $GetNickList|
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 09:37

hm...... not

Code: Select all

ws.SendData "$GetINFO" & "|"
don't work :cry:

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2005-01-24 10:40

Code: Select all

[1:wza:root]# echo '$Key somekey|$ValidateNick root|$Version 12345|$GetNickList|$MyINFO $ALL root $ $0$$0$|' | nc wza 1416
$Lock EXTENDEDPROTOCOLABCABC Pk=DCHUBPLUSPLUS0.33ABCABC|$HubName DCDev Public|<DCH++> This hub is running DCH++ v0.33-Release (Plugin API v0.33) on Linux 2.6.8.1-wza-1 (i686)|$Hello root|$NickList -OpCom-$$-OpCom-$$-OpCom-$$eshypolito$$[telia]berguven$$Mickey$$TwiztedDreamz$$CyberAL$$Futura$$Gadget$$Pothead$$BSOD2600$$Gandalf$$Smiley$$Ketsuron³$$RabidWombat$
etc..etc..etc..
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 11:11

What this ??

Code: Select all

[1:wza:root]# echo '$Key somekey|$ValidateNick root|$Version 12345|$GetNickList|$MyINFO $ALL root $ $0$$0$|' | nc wza 1416 
$Lock EXTENDEDPROTOCOLABCABC Pk=DCHUBPLUSPLUS0.33ABCABC|$HubName DCDev Public|<DCH++> This hub is running DCH++ v0.33-Release (Plugin API v0.33) on Linux 2.6.8.1-wza-1 (i686)|$Hello root|$NickList -OpCom-$$-OpCom-$$-OpCom-$$eshypolito$$[telia]berguven$$Mickey$$TwiztedDreamz$$CyberAL$$Futura$$Gadget$$Pothead$$BSOD2600$$Gandalf$$Smiley$$Ketsuron³$$RabidWombat$ 
etc..etc..etc..

ullner
Forum Moderator
Posts: 333
Joined: 2004-09-10 11:00
Contact:

Post by ullner » 2005-01-24 11:22

Most likely what a client is receiving/sending when connecting to a hub. (In this case, the DCDev Public hub.)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2005-01-24 11:32

??
I send:
$Key somekey|$ValidateNick root|$Version 12345|$GetNickList|$MyINFO $ALL root $ $0$$0$|
the hub sends the other stuff from $Lock and onwards

(further.. the [0:wza:root]# is my command prompt, echo is a program that echoes text, nc is a program that connects to wza:1416 over tcpip)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 13:10

heh thx but i'm don't understand this code :?:

Code: Select all

 send: 
$Key somekey|$ValidateNick root|$Version 12345|$GetNickList|$MyINFO $ALL root $ $0$$0$| 
the hub sends the other stuff from $Lock and onwards 

(further.. the [0:wza:root]# is my command prompt, echo is a program that echoes text, nc is a program that connects to wza:1416 over tcpip)

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2005-01-24 13:22

I give up, go read TPO's suggested reading:
http://dcplusplus.sourceforge.net/forum ... 5438#75438
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-24 14:14

heh thank man: i'm do something like this:

Code: Select all

ws.SendData "$Key " & Lock2Key(Replace(sData, "$Lock", "")) & "|$ValidateNick " & txtName.Text & "|$Version 1,0091|$GetNickList|$MyINFO $ALL " & txtName.Text & " " & "" & "<++ V:0.401,M:A,H:1/0/20,S:10>$ $LAN(T1)$$" & txtShare.Text * 1024 * 1024 * 1024 & "$" & "|"
And my cient still don't connect to PtokaX and YHub :(

This is log in PtokaX:

Code: Select all

[20:12] + New user connected
[20:12] 10.19.1.185:1837 > $Key ł4!"?‡0ć?ót„¤â€â€

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-24 15:19

[quote="gnomer"]

Code: Select all

[20:12] + New user connected
[20:12] 10.19.1.185:1837 > $Key ł4!"?‡0ć?ót„¤â€â€

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-25 06:37

hm...........

this is my LOck code:

Code: Select all

Private Sub ws_DataArrival(ByVal bytesTotal As Long)

    Dim sData As String
    ws.GetData sData
    
    If (Left(sData, 6) = "$Lock ") Then
        SriptItOut (sData)
    ElseIf (Left(sData, 9) = "$HubName ") Then
        sData = Replace(sData, "$HubName ", "")
        iLEN = InStr(1, sData, "|")
        sData = Left(sData, iLEN)
        sData = Replace(sData, "|", "")
        frmMain.Caption = sData
    ElseIf (Left(sData, 1) = "<") Then
        ProcessMain (sData)
    End If

End Sub
And this is a my Module:

Code: Select all

Global CurNickes As String
Function Lock2Key(StrLock As String) As String
    Dim TLock2Key As String, TChar As Integer
    If Len(StrLock) < 3 Then
      Lock2Key = Left$("BROKENCLIENT", Len(StrLock))
      Exit Function
    End If
    TLock2Key = Chr$(Asc(Left$(StrLock, 1)) Xor Asc(Right$(StrLock, 1)) Xor Asc(Mid$(StrLock, Len(StrLock) - 1, 1)) Xor 5)
    For i = 2 To Len(StrLock)
        TLock2Key = TLock2Key & Chr$(Asc(Mid$(StrLock, i, 1)) Xor Asc(Mid$(StrLock, i - 1, 1)))
    Next i
    For i = 1 To Len(TLock2Key)
        TChar = Asc(Mid$(TLock2Key, i, 1))
        TChar = TChar * 16 + TChar \ 16 'Swap bits 11110000 -> 00001111
        TChar = TChar Mod 256
        If TChar = 0 Or TChar = 5 Or TChar = 36 Or TChar = 96 Or TChar = 124 Or TChar = 126 Then
            Lock2Key = Lock2Key & "/%DCN" & Right$("000" & TChar, 3) & "%/"
        Else
            Lock2Key = Lock2Key & Chr$(TChar)
        End If
    Next i
End Function
what is badly with this code ?? why my cient don't connect to yhub and PtokaX ?? Please help :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry: :cry:

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2005-01-25 08:54

YHub and YnHub both check the key, IF the owner has specified this in the settings. The default setting is to check.

Have you tried this one?.

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-25 09:03

I'm have this code in cient:

Code: Select all

VB
'--------------------------------
' Done by Ofca
' [email protected]
'--------------------------------

Function Lock2Key(StrLock As String) As String
    Dim TLock2Key As String, TChar As Integer
    If Len(StrLock) < 3 Then
      Lock2Key = Left$("BROKENCLIENT", Len(StrLock))
      Exit Function
    End If
    TLock2Key = Chr$(Asc(Left$(StrLock, 1)) Xor Asc(Right$(StrLock, 1)) Xor Asc(Mid$(StrLock, Len(StrLock) - 1, 1)) Xor 5)
    For i = 2 To Len(StrLock)
        TLock2Key = TLock2Key & Chr$(Asc(Mid$(StrLock, i, 1)) Xor Asc(Mid$(StrLock, i - 1, 1)))
    Next i
    For i = 1 To Len(TLock2Key)
        TChar = Asc(Mid$(TLock2Key, i, 1))
        TChar = TChar * 16 + TChar \ 16 'Swap bits 11110000 -> 00001111
        TChar = TChar Mod 256
        If TChar = 0 Or TChar = 5 Or TChar = 36 Or TChar = 96 Or TChar = 124 Or TChar = 126 Then
            Lock2Key = Lock2Key & "/%DCN" & Right$("000" & TChar,3) & "%/"
        Else
            Lock2Key = Lock2Key & Chr$(TChar)
        End If
    Next i
End Function

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2005-01-25 09:17

Ah, sorry. Well, try running an Yhub/Ynhub and disable the key check, to make sure that's the problem.

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-25 09:22

Yes i'm off the key chceck and my cient is connect :) but why he don't conneci if key chceck ??

Todi
Forum Moderator
Posts: 699
Joined: 2003-03-04 12:16
Contact:

Post by Todi » 2005-01-25 09:24

Because your key is not correct.

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-25 09:24

hm..... he connect to YnHub but to yhub he don't connect :(

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-25 09:27

This is all code of my cient to connect

Code: Select all

Private Sub txtSend_KeyPress(KeyAscii As Integer)

    If KeyAscii = vbKeyReturn Then
        Call SendChat
    End If

End Sub

Code: Select all

Private Sub ws_DataArrival(ByVal bytesTotal As Long)

    Dim sData As String
    ws.GetData sData
    
    If (Left(sData, 6) = "$Lock ") Then
        SriptItOut (sData)
    ElseIf (Left(sData, 9) = "$HubName ") Then
        sData = Replace(sData, "$HubName ", "")
        iLEN = InStr(1, sData, "|")
        sData = Left(sData, iLEN)
        sData = Replace(sData, "|", "")
        frmMain.Caption = sData
    ElseIf (Left(sData, 1) = "<") Then
        ProcessMain (sData)
    End If

End Sub

Code: Select all

Private Sub SriptItOut(sData)
Dim key As String

    'NewLine (sData)
    key = Replace(sData, "$Lock ", "")
    key = Left(key, Len(sData) - 33)
    key = Lock2Key(key)
    'rtfIncome.Text = key
    
    ws.SendData "$Key " & Lock2Key(Replace(sData, "$Lock", "")) & "|$ValidateNick " & txtName.Text & "|$Version 1,0091|$GetNickList|$MyINFO $ALL " & txtName.Text & " " & "" & "<++ V:0.401,M:A,H:1/0/20,S:10>$ $LAN(T1)$$" & txtShare.Text * 1024 * 1024 * 1024 & "$" & "|"

End Sub

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-25 09:28

what is badly in this code ?? Please help :cry:

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-25 20:33

gnomer wrote:what is badly in this code ?? Please help :cry:
We love people who help themselves. :)

gnomer
Posts: 15
Joined: 2005-01-24 07:34

Post by gnomer » 2005-01-26 06:03

As It knew to Advise this code i'm not write in this forum :? Will help you?? I thought That somebody It will help me :cry:

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2005-01-26 12:15

gnomer wrote:Will help you?? I thought That somebody It will help me :cry:
Help yourself. Capture a good client, and run the lock through your routine to see if it matches the key the client generates.

With a tool like Ethereal, a test hub, a good client, and your code, you can easily solve your own problems.

Locked