x User removed: <unknown>
Moderator: Moderators
x User removed: <unknown>
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
-
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 14:37
Re: x User removed: <unknown>
Have a look at the wiki and the protocol documentation.gnomer wrote:Wgat is code to good $GetINFO ?? plis help
i'm look there but on this site is only this
i' want some good code
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...
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
-
- Forum Moderator
- Posts: 1420
- Joined: 2003-04-22 14:37
ok i'm delet this line but still not connect
Code: Select all
ws.SendData "$GetINFO..."
Code: Select all
C>H: $GetINFO <othernick> <nick>
Shouldn't there be more after txtName.Text and before the pipe?gnomer wrote: ws.SendData "$GetINFO" & txtName.Text & "|"
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)
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)
hm...... not don't work
Code: Select all
ws.SendData "$GetINFO" & "|"
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)
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)
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..
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)
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)
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)
I give up, go read TPO's suggested reading:
http://dcplusplus.sourceforge.net/forum ... 5438#75438
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)
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)
heh thank man: i'm do something like this:
And my cient still don't connect to PtokaX and YHub
This is log in PtokaX:
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 & "$" & "|"
This is log in PtokaX:
Code: Select all
[20:12] + New user connected
[20:12] 10.19.1.185:1837 > $Key ł4!"?‡0ć?ót„¤â€â€
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
[quote="gnomer"]
Code: Select all
[20:12] + New user connected
[20:12] 10.19.1.185:1837 > $Key ł4!"?‡0ć?ót„¤â€â€
hm...........
this is my LOck code:
And this is a my Module:
what is badly with this code ?? why my cient don't connect to yhub and PtokaX ?? Please help
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
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
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?.
Have you tried this one?.
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
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
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
-
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Help yourself. Capture a good client, and run the lock through your routine to see if it matches the key the client generates.gnomer wrote:Will help you?? I thought That somebody It will help me
With a tool like Ethereal, a test hub, a good client, and your code, you can easily solve your own problems.