• Welcome to Valhalla Legends Archive.
 

Create Account (vb6)

Started by CrAz3D, June 13, 2003, 05:28 PM

Previous topic - Next topic

CrAz3D

Creating an Account using VB 6...
How might I do this using hashes?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Camel

SendPacket &H3D, CalcHashBuf(password) & UserName & Chr(0)

CrAz3D

#2
Thank ya kindly
EDIT: Is that ALL I have to do?
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Yoni

It would help to know what you're doing so that you can process the response correctly, too... See BnetDocs.

CrAz3D

What I'm doing?...I don't think I understand that wuestion but I'll try to answer it.
I'm tryin to make it so that if someone tries login with an account that is not created it will automatically create it for them.
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Yoni


Camel

#6
all good things must come to an end.

Public Function CalcHashBuf(ByVal buf As String) As String
   Dim pos As Long, sublen As Long
   Dim hashbuf(&H10 + 5) As Long
   hashbuf(0) = &H67452301
   hashbuf(1) = &H98BADCFE
   hashbuf(2) = &HC3D2E1F0
   hashbuf(3) = &HEFCDAB89
   hashbuf(4) = &H10325476
   For pos = 0 To Len(buf) Step &H40
       sublen = Len(buf) - pos
       If sublen > &H40 Then sublen = &H40
       
       Dim t As String
       t = Mid(buf, pos + 1, sublen) & String(&H40 - sublen, Chr(0))
       Dim i As Long
       For i = 0 To 15
           hashbuf(5 + i) = CVL(Mid(t, i * 4 + 1, 4))
       Next
       datahash hashbuf
   Next
   CalcHashBuf = MKL(hashbuf(0)) & MKL(hashbuf(1)) & MKL(hashbuf(2)) & MKL(hashbuf(3)) & MKL(hashbuf(4))
End Function

Public Sub datahash(ByRef param() As Long)
   Dim buf(&H50) As Long
   Dim A As Long, B As Long, C As Long, D As Long, E As Long, G As Long
   Dim i As Long
   Dim p As Long
   p = UBound(param) - 5
   If p > &H40 Then p = &H40
   For i = 0 To p - 1
       buf(i) = param(i + 5)
   Next
   
   For i = &H10 To &H4F
       G = buf(i - &H10) Xor buf(i - &H8) Xor buf(i - &HE) Xor buf(i - &H3)
       buf(i) = Rol(1, G)
   Next
   A = param(0)
   B = param(1)
   C = param(2)
   D = param(3)
   E = param(4)

   For i = 0 To 79
       G = buf(i)
       G = Add(G, E)
       G = Add(G, Rol(A, 5))
       Select Case True
           Case i < 20
               G = Add(G, ((B And C) Or ((Not B) And D)))
               G = Add(G, &H6ED9EBA1)
           Case i < 40
               G = Add(G, (C And B) Or (D And C) Or (D And B))
               G = Add(G, &H5A827999)
           Case i < 60
               G = Add(G, (D Xor C Xor B))
               G = Add(G, &HCA62C1D6)
           Case i < 80
               G = Add(G, (D Xor C Xor B))
               G = Add(G, &H8F1BBCDC)
           Case Else
               Debug.Assert False
       End Select
   
       E = D
       D = C
       C = Rol(B, 30)
       B = A
       A = G
   Next
   
   param(0) = Add(param(0), A)
   param(1) = Add(param(1), B)
   param(2) = Add(param(2), C)
   param(3) = Add(param(3), D)
   param(4) = Add(param(4), E)
End Sub


[edit] modified the seeds so it wont work right :)

Eibro

Quote[edit] modified the seeds so it wont work right :)
Now, how utterly stupid and pointless was that?
Eibro of Yeti Lovers.

Camel

Quote from: Eibro on June 15, 2003, 08:54 PM
Quote[edit] modified the seeds so it wont work right :)
Now, how utterly stupid and pointless was that?
well i dont want to make it too easy

Camel

why would i intentionally mess with the values and then give you the answer two posts later?
figgure it out yourself
and prefferably dont post the answer. the point was to keep the csb noobs away!

l)ragon

Quote from: Camel on June 16, 2003, 09:19 PM
why would i intentionally mess with the values and then give you the answer two posts later?
figgure it out yourself
and prefferably dont post the answer. the point was to keep the csb noobs away!

lol then why keep refering to it?
*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*ˆ¨¯¯¨ˆ*^~·.,l)ragon,.-·~^*ˆ¨¯¯¨ˆ*^~·.,¸¸,.·´¯`·.,¸¸,.-·~^*

Spht

Quote from: Camel on June 16, 2003, 09:19 PM
why would i intentionally mess with the values and then give you the answer two posts later?
figgure it out yourself
and prefferably dont post the answer. the point was to keep the csb noobs away!

You're purposely stomping on what the BotDev community is trying to accomplish. If you haven't anything of value to post, don't reply at all. Deliberately modifying code samples in an attempt to just confuse people won't get you very far here.

Eternal

^-----silly Brit
-----------------------------
www.brimd.com

Camel

Quote from: Spht on June 19, 2003, 05:42 AM
You're purposely stomping on what the BotDev community is trying to accomplish. If you haven't anything of value to post, don't reply at all. Deliberately modifying code samples in an attempt to just confuse people won't get you very far here.

what the hell? i didn't feel like giving away the entire answer. modifying small bits of code forces the consumer to read and understand it. imo, that's better than just giving the answer away.
* Camel refrains from using the 'give a man a fish' saying

Banana fanna fo fanna

Quote from: Camel on June 19, 2003, 06:04 PM
Quote from: Spht on June 19, 2003, 05:42 AM
You're purposely stomping on what the BotDev community is trying to accomplish. If you haven't anything of value to post, don't reply at all. Deliberately modifying code samples in an attempt to just confuse people won't get you very far here.

what the hell? i didn't feel like giving away the entire answer. modifying small bits of code forces the consumer to read and understand it. imo, that's better than just giving the answer away.
* Camel refrains from using the 'give a man a fish' saying

Shut up, you stole it from the NBBot source and we all know it. Whether you translated it yourself or got it indirectly, from someone else, you still stole it. So don't go telling people to do it themselves, OK?

My proof: no one uses the name CalcHashBuf except Adron and stuff derived from his code.