• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Warrior

#1
Assembly Language (any cpu) / Assembly tutorial
March 17, 2007, 07:46 PM
iago asked me to write this for him..but I'm unoriginal. Here's what he said on the x86 topic.

"So I was going to walk dlStevens through my standard assembly reference this weekend. Instead, I decided to write a guide that anybody can use. It's supposed to be a beginner's guide. Knowing C is a definite asset, and some programming experience is probably a requirement.

I've only made it to the first example so far, which is the Starcraft CDKey checker (when you're installing the game). The ultimate goal is to show some cracking, keygen-writing, some buffer overflow exploitation, and writing a hack for a game (very basic, for an old version, but that's beside the point). I pretty much want to cover all the cool stuff. If this goes well, I might extend it to do some other neat things, depending on what people want.

Plus, I finally get to use the domain name I bought a few months ago Smiley

http://www.skullsecurity.org/wiki"

He's written more examples since then, a lot more. It's a pretty cool site, good for a beginner to get started on assembly and hacking in general.
#2
.NET Platform / Managed Theme API?
October 08, 2006, 08:21 PM
I need to owner draw an RTB to give it a standard style for an App I'm writing.

Is there a managed solution to invoke the Theme APIs in UxTheme.dll?
Right now I'm just doing a bunch of [DllImports] using the InteropServices but it's not as elegant as I'd like.

Does anyone have a managed wrapper either written or is there one that comes by default with .NET 2.0? This is really a shame that this isn't included.
#4
My computer currently has 256MB of ram and this motherboard, I am on a tight budget and want to gear my comp up so I can play WoW which I recently purchased.

Does anyone have any suggestions (and price ranges) of what I can replace or add?

Thanks.
#5
Lately I've been getting into programming in C# and I wanted to write a multipurpose application extendable by plugins which I would use as a "core" for anything I would want to develop in the future.

My thoughts on it now are looking into how DLLs differ in .NET if they do at all then finding a way to export an interface from this DLL to have a set of common functions for the plugin so  that it may identify itself.

After that allow the plugin to register initiation and shutdown functions (or maybe just shutdown because if it's registering functions it must already be initiated!)

Each plugin would have the ability to manipulate the host form in someway? Or possibly just be able to be listed in a list of plugins then it can draw whatever windows it would need from there.

I also was thinking about ways for plugins to communicate with each other to further allow flexibility but I wouldn't know where to start in the implementation.

I know people like Myndfyre have done extensive work on this and all I am looking for is the general theory behind how it would work and comments on my thoughts above.

Any feedback is greatly appreciated.
Thanks
#7
For the client I'm writing I send a packet to BNLS and it just simply ignores
the request for the data to be hashed

I tried it on JBLS and it worked fine, I know JBLS may be more leniant than BNLS but I really don't know what I'm doing wrong.

As always, help is appreciated.

Information: Language is VB6, client is Starcraft and my password
was converted to lowercase before sending

Code to build BNLS_HASHDATA

Public Function SendHashData(ByVal Data As String, ByVal DataLen As Long, ByVal HashType As Long)
    Dim Cookie As Long
   
    With Buffer
        .Add DataLen
        .Add HashType
        .Add Data
       
        If (HashType = HASH_DOUBLE) Then
            .Add BNCSConstants.ClientToken
            .Add BNCSConstants.ServerToken
        ElseIf (HashType = HASH_COOKIE) Then
            Cookie = GetTickCount
            .Add Cookie
            BNLSConstants.RequestedCookie = True
        End If
       
        .SendPacket BNLS, BNLS_HASHDATA
    End With
End Function


Here is the BnetDocs format: (S->C)


(DWORD[5])    The data hash.

Optional:
(DWORD)       Cookie. Same as the cookie from the request.
#8
Testing Forum / Test
April 30, 2005, 11:37 PM
#9
Battle.net Bot Development / BNLS Troubles
February 06, 2005, 07:52 AM

SID_AUTH_INFO
1  192.168.1.47:3514  63.241.83.7:6112  59  Send 
0000  01 FF 50 3A 00 00 00 00 00 36 38 58 49 52 41 54    ..P:.....68XIRAT
0010  53 C9 00 00 00 00 00 00 00 00 00 00 00 00 00 00    S...............
0020  00 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69    .........USA.Uni
0030  74 65 64 20 53 74 61 74 65 73 00                   ted States.

SID_PING
2  63.241.83.7:6112  192.168.1.47:3514  8  Recv 
0000  FF 25 08 00 63 B7 13 B3                            .%..c...

SID_AUTH_INFO
3  63.241.83.7:6112  192.168.1.47:3514  99  Recv 
0000  FF 50 63 00 00 00 00 00 1A C2 9F 55 1C 97 2E 00    .Pc........U....
0010  00 27 2D 81 91 E7 C3 01 49 58 38 36 76 65 72 36    .'-.....IX86ver6
0020  2E 6D 70 71 00 41 3D 36 36 39 39 31 34 31 31 34    .mpq.A=669914114
0030  20 42 3D 33 37 33 34 37 39 30 39 39 20 43 3D 36     B=373479099 C=6
0040  31 37 33 35 36 36 31 32 20 34 20 41 3D 41 5E 53    17356612 4 A=A^S
0050  20 42 3D 42 2D 43 20 43 3D 43 2B 41 20 41 3D 41     B=B-C C=C+A A=A
0060  5E 42 00                                           ^B.

SID_PING
4  192.168.1.47:3514  63.241.83.7:6112  8  Send 
0000  FF 25 08 00 63 7B 13 00                            .%..c{..

BNLS_VERSIONCHECK
5  192.168.1.47:3515  63.161.183.202:9367  74  Send 
0000  4A 00 09 01 00 00 00 06 00 00 00 41 3D 36 36 39    J..........A=669
0010  39 31 34 31 31 34 20 42 3D 33 37 33 34 37 39 30    914114 B=3734790
0020  39 39 20 43 3D 36 31 37 33 35 36 36 31 32 20 34    99 C=617356612 4
0030  20 41 3D 41 5E 53 20 42 3D 42 2D 43 20 43 3D 43     A=A^S B=B-C C=C
0040  2B 41 20 41 3D 41 5E 42 00 00                      +A A=A^B..

BNLS_VERSIONCHECK
6  63.161.183.202:9367  192.168.1.47:3515  55  Recv 
0000  37 00 09 01 00 00 00 03 01 01 01 9C 9D 09 15 53    7..............S
0010  74 61 72 63 72 61 66 74 2E 65 78 65 20 30 35 2F    tarcraft.exe 05/
0020  32 36 2F 30 34 20 30 30 3A 34 36 3A 30 30 20 31    26/04 00:46:00 1
0030  30 34 38 35 37 36 00                               048576.

BNLS_CDKEY
7  192.168.1.47:3515  63.161.183.202:9367  92  Send 
0000  5C 00 01 01 00 00 00 06 00 00 00 41 3D 36 36 39    \..........A=669
0010  39 31 34 31 31 34 20 42 3D 33 37 33 34 37 39 30    914114 B=3734790
0020  39 39 20 43 3D 36 31 37 33 35 36 36 31 32 20 34    99 C=617356612 4
0030  20 41 3D 41 5E 53 20 42 3D 42 2D 43 20 43 3D 43     A=A^S B=B-C C=C
0040  2B 41 20 41 3D 41 5E 42 00 00 1C 79 2E 00 31 30    +A A=A^B...y..***
0050  XX XX XX XX XX XX XX XX XX XX XX XX                ***********.

BNLS_CDKEY
8  63.161.183.202:9367  192.168.1.47:3515  7  Recv 
0000  07 00 01 00 00 00 00                               .......   <------------


As you can see BNLS_CDKEY is returning false

I send my working CDKey and the ServerToken I recieve in 0x50 back to BNLS (it being the second DWORD in 0x50)

My Code for retrieving the ServerToken

ServerToken = GetDWORD(Mid(PacketData, 9, 4))


For those who dont know what GetDWORD is it simply fetches the first DWORD in the data.

Now after I recieve 0x09 from BNLS with a true value I go on to send 0x01 for my CDKey

Here is my code for sending 0x01


                   With PBuffer
                        .InsertDWORD CLng(ServerToken)
                        .InsertNTString Config.CDKey
                        .SendPacket &H1, BNLS
                    End With


Now here is where I parse 0x01 in my Parsing sub:


           Case &H1
                    CDKeyResult = GetDWORD(Left(PacketData, 4))
                If CDKeyResult = &H0 Then
                    AddChat vbRed, "BNLS CDKey Check failed!"
                        frmChat.sckBNET.Close
                        frmChat.sckBNLS.Close
                     Exit Sub
                 ElseIf CDKeyResult = &H1 Then
                    AddChat vbGreen, "BNLS CDKey Check passed!"
                End If


As you can see I have not finished parsing it yet since I havn't been able to get passed it always returning false. Any help on this is appreciated.

Edit: here is my code to send 0x09 (BNLS_VERSIONCHECK) if it makes a difference


                        With PBuffer
                            .InsertDWORD &H1 '(DWORD) Product ID
                            .InsertDWORD Mid(IX86VerFilename, 8, 1) '(DWORD) Version DLL digit
                            .InsertNTString ValueString '(STRING) Checksum formula.
                            .SendPacket &H9, BNLS 'BNLS_VERSION_CHECK
                        End With
#10
I made a StyleScript using the Colors of my Bot is it possible to put it on the SphtBot website or something its nice if you want an SS ill post one up.
#11
Battle.net Bot Development / Can you help me
April 30, 2004, 03:32 PM
Im having trouble with my CSB Bot. I type in the things to Edit the Config Click Save and when i try to connect it connects with my old Configuration.\

I have a theory but i havent tried it yet.
Should i fetch the Config Things like GetStuff
On mnuconnect_click
Idk if it will work any feed back would be appreciated
#12
Battle.net Bot Development / Please help
April 27, 2004, 05:47 PM
Im sorry to pester you guys with my newbie questions. Im having trouble with connecting my bot. It uses CSB. It will just show Connecting to Bnls.
Can someone please help.
BTW heres the code
Private Sub Form_Load()
AddChat "Warrior Bot 1.0 - LW-Warrior" & vbNewLine, vbBlue
AddWhisper "Whisper Box" & vbNewLine, vbBlue
End Sub



Private Sub mnuDisconnect_Click()
AddChat "Disconnected " & vbNewLine, vbRed
CleanSlateBot1.Disconnect
End Sub
Private Sub mnuConnect_Click()

   strProduct = GetStuff("Login", "Client") 'Set Values For Your Variables
   strUsername = Form2.txtUsername.Text
   strPassword = Form2.txtpassword.Text
   strCDKey = Form2.txtcdkey
   strServer = Form2.txtserver.Text
   strHomeChannel = Form2.txthomechan.Text
   CleanSlateBot1.BNLSBotID = ""
   CleanSlateBot1.BNLSBotPassword = '"
   CleanSlateBot1.CDKey = "strcdkey"
   CleanSlateBot1.Product = "strProduct"
   CleanSlateBot1.HomeChannel = "strHomeChannel"
   CleanSlateBot1.Password = "strPassword"
   CleanSlateBot1.Username = "strUsername"
   CleanSlateBot1.Server = "strServer"
   CleanSlateBot1.Accept = "-65"
   AddChat "Attempting Connection To Battle.Net " & vbNewLine, vbYellow
 
End Sub
Private Sub mnuconfig_Click()
Form2.Show
End Sub
Private Sub CleanSlateBot1_BnetError(ErrorNumber As Integer, Description As String)
AddChat "Bnet error: " & ErrorNumber & " - " & Description & vbNewLine, vbRed
End Sub

Private Sub CleanSlateBot1_BnetConnected()
CleanSlateBot1.Connect
AddChat "Connected!" & vbNewLine, vbGreen
End Sub

Private Sub CleanSlateBot1_FlagsUpdate(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
       
       Dim intstr As Integer 'Declare The integers
       Dim lagicoN As Integer
       Dim icon As Integer

icon = GetIconCodeFLAGS(Message, Flags)
lagicoN = GetLagIcon(Ping, Flags)
   If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
   End If
   
   If (Flags And BNFLAGS_OP) = BNFLAGS_OP Then
           icon = ICON_GAVEL
           Form1.lvchannel.ListItems.Remove Form1.lvchannel.FindItem(Username).Index
           With Form1.lvchannel.ListItems.Add(1, , Username, , icon)
           .ListSubItems.Add 1, , , lagicoN
           End With
       Else
           With Form1.lvchannel
               .ListItems(.FindItem(Username).Index).SmallIcon = icon
           End With
       End If

End Sub
Private Sub CleanSlateBot1_BnetConnecting()
AddChat "Connecting..." & vbNewLine, vbYellow
End Sub



Private Sub txtsend_KeyPress(keyascii As Integer)
On Error Resume Next
strCurrentUsername = Form2.txtUsername.Text
If keyascii = 13 And txtsend.Text <> "" Then
       keyascii = 0
       Dim strSend As String
       strSend = txtsend.Text
CleanSlateBot1.Send txtsend.Text
AddChat "<" & Form2.txtUsername & "> ", vbCyan, strSend & vbNewLine, vbWhite
txtsend.Text = ""
End If
End Sub
Private Sub CleanSlateBot1_LoggedOnAs(Username As String, Product As String)
AddChat "Successfully logged on as: ", vbCyan, Username & vbNewLine, vbYellow
End Sub
Private Sub CleanSlateBot1_LogonEvent(Message As Byte)
If Message = 0 Then
      AddChat "Account doesn't exist!" & vbNewLine, vbRed
  ElseIf Message = 1 Then
      AddChat "Invalid Password!" & vbNewLine, vbRed
  ElseIf Message = 2 Then
      AddChat "Login successfull" & vbNewLine, vbGreen
  ElseIf Message = 3 Then
      AddChat "Attempting to create account.." & vbNewLine, vbYellow
  ElseIf Message = 4 Then
      AddChat "Account creation was a success!" & vbNewLine, vbGreen
  End If
End Sub
Private Sub CleanSlateBot1_ServerError(ByVal Message As String, SimulatedEvent As Boolean)
AddChat Message & vbNewLine, vbRed
End Sub
Private Sub CleanSlateBot1_ServerInfo(ByVal Message As String, SimulatedEvent As Boolean)
AddChat Message & vbNewLine, vbYellow
End Sub
Private Sub CleanSlateBot1_SomethingUnknown(ByVal UnknownString As String, SimulatedEvent As Boolean)
AddChat "Unknown Bot Error" & vbNewLine, vbRed
End Sub
Private Sub CleanSlateBot1_UserInChannel(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean)
   strSexp = Product
   strSTAR = Product
   strd2 = Product
   strD2XP = Product
   strW2BN = Product
   strw3 = Product
   strDw3xp = Product
Dim icon As Integer
icon = GetIconCode(Product, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)
If icon = ICON_GAVEL Then
With Form1.lvchannel.ListItems.Add(1, Username, Username, , icon)
   .ListSubItems.Add lvchannel.FindItem(Username).Index, , , lagicoN
   End With
End If
If icon <> ICON_GAVEL Then
   With Form1.lvchannel.ListItems.Add(, , Username, , icon)
   .ListSubItems.Add , , , lagicoN
   End With
End If
End Sub
Private Sub CleanSlateBot1_UserEmote(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
If Dii = True Then
       Username = Right(Username, Len(Username) - 1)
   End If
   Dim intstr As Integer
       If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
  End If
  AddChat "<" & Username & " " & Message & ">" & vbNewLine, vbCyan
End Sub
Private Sub CleanSlateBot1_UserJoins(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, SimulatedEvent As Boolean)
If Dii = True Then
       Username = Right(Username, Len(Username) - 1)
   End If
   Dim intstr As Integer
   If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
   End If
   
   strSexp = Product
   strSTAR = Product
   strd2 = Product
   strD2XP = Product
   strW2BN = Product
   strw3 = Product
   strw3xp = Product
   strProduct = Product

Dim icon As Integer
icon = GetIconCode(Product, Flags)
Dim lagicoN As Integer
lagicoN = GetLagIcon(Ping, Flags)
If icon = ICON_GAVEL Then
   With Form1.lvchannel.ListItems.Add(1, Username, Username, , icon)
   .ListSubItems.Add lvchannel.FindItem(Username).Index, , , lagicoN
   End With
End If
If icon <> ICON_GAVEL Then
   With Form1.lvchannel.ListItems.Add(, , Username, , icon)
   .ListSubItems.Add , , , lagicoN
   End With
End If


If LCase(strSexp) = "SEXP" Then
   Product = "Starcraft: Broodwar"
ElseIf LCase(strSTAR) = "STAR" Then
   Product = "Starcraft"
ElseIf LCase(strd2) = "D2DV" Then
   Product = "Diablo II"
ElseIf LCase(strD2XP) = "D2XP" Then
   Product = "Diablo II: Lord of Destruction"
ElseIf LCase(strW2BN) = "W2BN" Then
   Product = "Warcraft II"
ElseIf LCase(strw3) = "WAR3" Then
   Product = "Warcraft III: Reign of Chaos"

End If
AddChat Username & " has joined the channel using " & vbNewLine, &H808080
End Sub
Private Sub CleanSlateBot1_UserLeaves(ByVal Username As String, ByVal Flags As Long, SimulatedEvent As Boolean)
Dim intstr As Integer
       If InStr(1, Username, "*", vbTextCompare) <> 0 Then
           intstr = InStr(1, Username, "*", vbTextCompare)
           Username = Right(Username, Len(Username) - intstr)
       End If
AddChat Username & " has left the channel" & vbNewLine, &H808080
On Error Resume Next
Form1.lvchannel.ListItems.Remove Form1.lvchannel.FindItem(Username).Index
End Sub
Private Sub CleanSlateBot1_UserTalk(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
If Dii = True Then
       Username = Right(Username, Len(Username) - 1)
   End If
   Dim intstr As Integer
       If InStr(1, Username, "*", vbTextCompare) <> 0 Then
       intstr = InStr(1, Username, "*", vbTextCompare)
       Username = Right(Username, Len(Username) - intstr)
   End If
AddChat "<" & Username & ">", vbYellow, Space(1) & Message & vbNewLine, vbWhite
End Sub
Private Sub CleanSlateBot1_VersionCheck(Message As Byte, ExtraInfo As String)
If Message = 0 Then
      AddChat "Client Has Been Accepted!" & vbNewLine, vbGreen
  ElseIf Message = 1 Then
      AddChat "Version Check Failed!" & vbNewLine, vbRed
  ElseIf Message = 2 Then
      AddChat "Version Check Passed!" & vbNewLine, vbGreen
  ElseIf Message = 3 Then
      AddChat "Version Check Failed!" & vbNewLine, vbRed
  ElseIf Message = 4 Then
      AddChat "Version Check Passed!" & vbNewLine, vbGreen
  ElseIf Message = 5 Then
      AddChat "Version Check Passed!" & vbNewLine, vbWhite
  ElseIf Message = 6 Then
      AddChat "Cd-Key In Use By " & ExtraInfo & vbNewLine, vbRed
  End If
End Sub
Private Sub CleanSlateBot1_WhisperFromUser(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, SimulatedEvent As Boolean)
AddChat "<From: " & Username & "> " & Message & vbNewLine, vbCyan
End Sub
Private Sub CleanSlateBot1_WhisperToUser(ByVal Username As String, ByVal Flags As Long, ByVal Message As String, ByVal Ping As Long, SimulatedEvent As Boolean)
AddWhisper "<To: " & Username & "> " & Message & vbNewLine, vbCyan
End Sub
Private Sub CleanSlateBot1_JoinedChannel(ByVal ChannelName As String, ByVal Flags As Long, SimulatedEvent As Boolean)
AddWhisper "Joined channel: " & ChannelName & vbNewLine, vbYellow
lvchannel.ListItems.Clear

End Sub
#13
I am having trouble with a Bot I am working on with vb6 using CSB I get the Run-time error saying Object Required when i try to connect. I have a Bnls ID and all I just dont know what is the problem if someone can help me it would be aprreciated