• 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

Messages - TheMinistered

#1
thanks, nice to be back ;p
#2
Well the server considers you logged in, thats how html works IIRC.  You connect and make a request... in your case a login request, it replys then closes... Once it sends the reply (success) the page it disconnects, you have to connect again to send anymore requests...

When you login a website it basically sets a state for your ip/connection. It will then use this state to determine if you can view certain pages such as if you want to change your user profile on a website
you have to login then goto the page to change it, the server does this (this is psuedo code):

If userstate = loggedin then yes_he_can_view_changeuserprofile.html

[edit] I hope I'm making since to you cause I been up for 2 days and i'm quite tired... if you need help just aim me: vbaddict
#3
search pscode.com for "david Fritts" you'll find really good sample project on how to do this
#4
C/C++ Programming / Re: Reading Process Memory
April 16, 2008, 04:05 PM
well i have some similar code, but i call virtualprotectex because i'm patching stuffs... but anyways you can find the code here: http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=52494&lngWId=1  note: this code only works on minesweeper 5.1

oh and sorry that its overly oop and in vb6 ;p
#5
Visual Basic Programming / Re: Reading Memory
April 13, 2008, 07:10 PM
well you could try polling, using timers, or using hooks.  the easiest is by far polling, you just loop checking for changes, timers are not much harder same concept but loop with a delay.  hooking is the best route imho but a little more complicated... you just need to find out where it handles incoming talks and hook that function so when it gets called you know someones talking... etc newho im out!
#6
I think I might also point out how bad brew's code is. I will repost his code below for easy reference as I make my point.


unsigned int GetIcon(unsigned long client, unsigned long flags) {
unsigned int rettemp = 0;
switch (client) {
case CLIENT_CHAT: //0x43484154:
rettemp++;
case CLIENT_W3XP: //0x57335850:
rettemp++;
case CLIENT_WAR3: //0x57415233:
rettemp++;
case CLIENT_W2BN: //0x5732424E:
rettemp++;
case CLIENT_D2XP: //0x44325850:
rettemp++;
case CLIENT_D2DV: //0x44324456:
rettemp++;
case CLIENT_DSHR: //0x44534852:
rettemp++;
case CLIENT_DRTL: //0x4452544C:
rettemp++;
case CLIENT_JSTR: //0x4A535452:
rettemp++;
case CLIENT_SSHR: //0x53534852:
rettemp++;
case CLIENT_SEXP: //0x53455850:
rettemp++;
}
if ((flags & 1) == 1)
rettemp = 12;
if ((flags & 2) == 2)
rettemp = 13;
if ((flags & 4) == 4)
rettemp = 14;
if ((flags & 8) == 8)
rettemp = 15;
if ((flags & 32) == 32)
rettemp = 16;
if ((flags & 64) == 64)
rettemp = 17;
return rettemp;
}


Well really I have only one good point. I don't think anyone touched on this directly, but they beat around the bush a little.  In my opinion, that switch statement shouldn't be there at all. The statement itself has no part in "getting the icon" so it is just extra code that does nothing really, as you can see rettemp is later written over in one of the following if statements.

So assuming his code actually works, this should be more effecient.


unsigned int GetIcon(unsigned long flags) {
       unsigned int rettemp = 1;

if ((flags & 1) == 1)
rettemp  = 12;
if ((flags & 2) == 2)
rettemp = 13;
if ((flags & 4) == 4)
rettemp = 14;
if ((flags & 8) == 8)
rettemp = 15;
if ((flags & 32) == 32)
rettemp = 16;
if ((flags & 64) == 64)
rettemp = 17;
return rettemp;
}


Hell, you really shouldn't even need a local variable to store the result in.  You could probaly just do return #;
#7
Ugly RkShadow Is Newbie Etheopian

Cuntisaurus
#8
Smart, its more likely that the memory address you found is a string.  The string is built and then passed to a print text function for display.  Its likely the health is actually stored in a different address, some sort of numerical data type, probably a unsigned short.  But, your method works either way I guess ;)
#9
Oh mighty dickhead betawarz, what else may you tell us, besides the fact you're a dickhead wannabe?

In reply to Hdx's post on page 1:
Quote
not sure if hard parts is the right phrase - more like the large parts.

Yeah, so I'm kinda talking without actually having looked at your code or having looked at lockdown in a debugger/disassembler, But why would you only port portions of the code.  It would seem that if you planned on using the DLL you would only port code needed to load and call the dll.

i.e. lets say that the dll have four functions named one, two, three, and four and the application had two functions called load and call, lets say function two is small and the the rest in the dll are large.

it would seem that you should either a) port all the functions so you don't need a dll or b) port the load and call functions from the application.  it would seem a waste of time to only port function one just so you don't have to call it from the dll

I dunno, i'm talking about something i don't entirely know you reasons behind... just seemed illogical to me how you decided to take your approach.  please explain warz ;p thanks
#10
Quote from: Joex86] link=topic=16610.msg168254#msg168254 date=1177265059]
They are not BSTRs. I tested that code and it's output is exactly as intended.

Also, this was only meant as a demonstration. Correct calling to the base of the byte array would be byteArray(LBound(byteArray)).

For defining the length of the string, I didn't really have to do that either. I could have done Len(str).

Using Step 1 is a good coding habit -- it prepares you for stepping up to C++, and makes it easier for your code to be understood by non-VB users. I'll reiterate the demonstration only clause for the repeated MsgBox calls.

Lastly, VB6 is not smart at all, let alone smart enough to position the bytes correctly. That is done by the Win32 API, but doesn't take any smartness on it's behalf. The lowbound of the byte array points to the first byte in memory. A byte array is stored in memory as a pointer to a bunch of bytes, that pointer pointing to the first one. RtlMoveMemory works somewhat like this:

; void RtlMoveMemory(void dest, void src, int length)
; {

    xor esi, esi
_start:
    cmp esi, length
    je _bottom
    inc esi

    lea [dest+esi], [src+esi]

    jmp _start:

_bottom:
: }


EDIT -
If you want a pointer to the string, pass an Integer ByVal in dest. Make sure you specifiy ByVal, though, because if it's passed ByRef it will be returned with the value 0x33323130 (little endian) and the 6 bytes following it will be murdified. Well.. the bytes after it will get owned anyhow, which is why the API is dangerous if you don't know what you're doing.

Joe, I didn't even read your whole reply but the first sentence.  You retarded pig dog of a communist mother frackin pile of hot shit, VB6 strings ARE FRACKING BSTRS!!! LOOK AT MSDN YOU FRACKIN WHORE

A BSTR has a Long prepended to it containing the strings length, then a unicode string followed by a null terminator you silly peice of shiat

Further more, you don't "call" a byte array, you should have said correct reading, of the memory, of the base of the byte array... yadda yadda anywho i'm done busting on your ass... but I assume you meant "calling rtlmovememory on a byte array" you should be more clear ;)
#11
Quote
I want to make an array version of this, anyone have any ideas? I think I would just need to change VarPtr to VarPtrArray or something like that....... I saw "VarPtrArray" somewhere on msdn. And for the record, if anyone says the AddressOf operator and VarPtr() do the same thing, you're totally wrong! At least 3 people already said they're the same today and it's starting to piss me off -_____-;; Uh... so could anyone help?

To find the pointer to an array, all you need to do is find the address of the first item in the array.  Or if you want to find a pointer to the middle or an item other than the first you simply get the address like so

VarPtr(Array(firstindex)) ' returns pointer to first item in array
VarPtr(Array(lastIndex)) ' returns pointer to last item in array
VarPtr(Array(middleindex)) 'returns pointer to the item in the middle of the array

where Array is the variable name for the array, and ...index is the index which address you want.  To get a pointer to the next item in the array without having to call varptr again,you would simply do arraypointer + sizeofarraytype (sizeofarraytype for instance, if it was an array of integers would be 2, longs would be 4, bytes would be 1, etc etc)

Quote
Many thanks to Ante, he made this function while i was taking a poo. Anyways I'm still faced with the problem of finding the string len, any ideas on how to do this? :}

A vb6 string is a BSTR, there is a variable that holds the length of the string above the string, i believe a long (4 bytes wide).

So (VarPtr(string)-4) should hold the length.

Quote
Private Function PtrString(ptrPointerType As PointerType) As String
    Dim tmp$, i&
    tmp = String(ptrPointerType.lngLen, vbNullChar)
    CopyMemoryRead tmp, ptrPointerType.lngPtr, ptrPointerType.lngLen
    For i= 1 To (ptrPointerType.lngLen * 2) - 1 Step 2
        PtrString = PtrString & Mid$(tmp, i, 1)
    Next i
End Function

This function is completely retarded imho, ante is a lame ass programmer he must smell like dog shiat.  He is a horrible programmer.  I wont even touch on how many bad programming practices are in this function, you should delete this one and consult msdn on writing your own.

On a further note, there aren't pointers in vb6 as a language feature.  Is "psuedo" pointers and I don't really recommend using them unless you have to.  The only cases in which you have to get an address for a variable is if your using an API (probably a few other rare cases as well).  But most tasks can be accomplised in vb with minimal use of "pointers"
#12
Warcraft / Re: Burning Crusade
February 24, 2007, 09:22 PM
joe you couldn't gank a lvl 1 newbie standing outside the alliance starting point.  you newbie.
#13
Gaming Discussion / Re: W2BN
February 24, 2007, 09:17 PM
Once again joe, you're wrong.  Just try not to say anything unless its factual, cause your opinions smell like rotten asshole roasting over a fire.
#14
Java Programming / Re: Event-driven Socket Wrapper
February 23, 2007, 11:09 PM
joe your such a newbie, why don't you do what you'e always talking about how you make everything you use and you don't like using 3rd party code and all that other bullcrap and do it the as you say '31337 w4y' and code it on your own

oh and yeah, i know this thread is over three months old cause it warned me... so don't try to play that "i'm gonna make him look dumb and call him a dumbass for bumping an old thread" just go ahead and die for me plz
#15
I'm a bit confused by your description of the problem, but I read over it once and it sounds like maybe its a problem with winlogon.exe?