Author Topic: c# pointers help needed  (Read 5547 times)

0 Members and 2 Guests are viewing this topic.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
c# pointers help needed
« on: August 04, 2012, 05:09:32 am »
So, in mw3 there's a pointer for your nickname (p->09C97AF2) , how can i write/read to that pointer?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: c# pointers help needed
« Reply #1 on: August 04, 2012, 07:04:28 am »
I don't know C#, but I'll give it a go in explanation.

Code: [Select]

char*[] p = 09C97AF2; //The nickname will be an array of chars, so we set a pointer to that address

p* = "New Nickname"; //Assign the new data to the pointer



And that *should* work, but I don't know C#, only C/C++. :P

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: c# pointers help needed
« Reply #2 on: August 04, 2012, 07:39:42 am »
Hmm, in c# it is a string, if i looked it up Ith cheatengine i looked for a string but thx anyway
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: c# pointers help needed
« Reply #3 on: August 04, 2012, 08:04:20 am »
A string is nothing more than an array of chars, at least in C++. No reason it's not the same for C#

Just to note, I believe I've heard it somewhere that each program has it's own memory space for pointers, so an address in one program wouldn't equal the address in another. So you might not be able to easily access the memory of an external program like that. But, then again I'm not 100% sure.

If it's in cheat engine, you should be able to modify the string through that.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: c# pointers help needed
« Reply #4 on: August 04, 2012, 08:50:10 am »
You cant use pointers in C#.
A pointer is only in existance as long as the program is running, what are you trying to do?

Also HOMER-16 is correct, almost all os's use something called virtual memory, so that address is actualy not the physical address.
« Last Edit: August 04, 2012, 08:52:19 am by jwalker »
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: c# pointers help needed
« Reply #5 on: August 04, 2012, 09:01:04 am »
jwalker, you can use pointers in c#.

http://msdn.microsoft.com/en-us/library/y31yhkeb(v=vs.80).aspx

I believe he is trying to write a program that will change his MW3 nickname. He's trying to read/write to the address that contains it.

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: c# pointers help needed
« Reply #6 on: August 04, 2012, 09:07:38 am »
You can indeed use pointers like in C, but you have to use an unsafe block.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: c# pointers help needed
« Reply #7 on: August 04, 2012, 09:18:49 am »
A string is nothing more than an array of chars, at least in C++. No reason it's not the same for C#

Just to note, I believe I've heard it somewhere that each program has it's own memory space for pointers, so an address in one program wouldn't equal the address in another. So you might not be able to easily access the memory of an external program like that. But, then again I'm not 100% sure.

C# is not a language in the same family as C/C++. It's much closer to Java than any compiled language. The name is just confusing in that respect.

As for whether you can use pointers, generally you can. The most common form of "pointer" in C# is what's called a "reference." It's basically meaningless obfuscation to call it that, but you can think of them as effectively pointers with some associated metadata for the interpreter.

@Homer, you should NEVER be accessing another program's memory space, so virtual memory isn't an issue. Besides, physical pointers in modern computers are far more complex to deal with than virtual pointers. Either way, use the interface the other code exposes. It is the best way to interact with other code.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: c# pointers help needed
« Reply #8 on: August 04, 2012, 09:23:31 am »
I think i first had to get the adress of the external prog, for mw3 that would be looking for the adress for "iw5", google it and i find the method, but i don't get how to write/read it's pointers then, just adresses work, but pointers are a lot more difficult, as for changing it with cheatengine, that works, but i want it to be a feature in my hack, there are(/were) namechangers before...
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: c# pointers help needed
« Reply #9 on: August 04, 2012, 04:23:19 pm »
Sorry for double post

But does someone know if it's possible to use a little part of c/++ code in c#?

Cause that would be much easyer for pointers
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER