Jump to content

Get Memory Adress


Recommended Posts

Hello,

I want to get the memory adress of my Variable using Autoit.

$myvar = 'Something'

So, I want to get the memory adress of $myvar.

I thought I use _MemoryOpen($iv_Pid[, $iv_DesiredAccess[, $iv_InheritHandle]]) in NomadMemory.au3, but I don't know how to fill the params correctly.

Any help? :s

Link to comment
Share on other sites

Can you please tell us why you need the memory address of an AutoIt variable?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

But why? Which purpose does this serve?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Learning Purposes? Expanding my knowledge.

If you think I like to learn this because I like to create a bot, then I must dissapoint you. I don't like to use this for any malicous purpose. I only like to learn how I can handle variables in the memory. I hope you get my point of view.

Edited by MadaraUchiha

Link to comment
Share on other sites

That was one part of my question: I suspected you try to write some kind of a bot.

But the other part is: Why learn something for which you have no real use for? We are no longer in school so everything we do should serve a purpose. Another point: Memory handling isn't an easy task. So why not learn something you have a real need for?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I am thinking about (maybe) creating a protection system/licence system for my AutoIt application. And that's of course not an easy task, so I thought about expanding my knowledge in Memory manipulation.

To store licence keys or other sensible data this is important though.

So, I start with the basic stuff, like getting the memory adress of my variable I've created, as explained above.

(Excuse my poor English, I am not a native English speaker)

Edited by MadaraUchiha

Link to comment
Share on other sites

You know that nothing is 100% save when stored in an AutoIt exe?

Regarding the licence system, did you have a look at XProtec in the Example Scripts section? Seems to be the most advanced tool here.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I know, but please dont miss understand me. XProtect is fine, I just like to learn to develop my own stuff instead of using other peoples work. And to do this I decided to learn something regarding this. So memory editing is one point of this. And I know nothing is 100% save, sure, but I just like to learn, and I don't think that's a problem for you. So please, don't give me more functions, instead explain me the problem above. Self is the man!;-)

Link to comment
Share on other sites

_MemoryOpen($iv_Pid[, $iv_DesiredAccess[, $iv_InheritHandle]])

$iv_Pid is the process ID whose memory you want to access

$iv_DesiredAccess is the access mode (read, write) and is optional

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

_MemoryOpen($iv_Pid) should be enough if you just want to read the memory.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

In autoit is not posible get memory adress of the variable

you can use dllcreatestruct.

 

$mvar=dllstructcreate("int") 'this should be a interget var. obiusly its a structure.

Link to comment
Share on other sites

you can do something like this:

Local $iMyvar=dllstructcreate("int") ;declare the int structure

DllStructSetData($iMyvar,1,255) ; set data to my variable

Local $pMyvar=DllStructGetPtr($iMyvar,1) ;get the pointer to my var

msgbox(0,"Pointer","MyVar pointer is: " & $pMyvar)

and something better. read the help file. lol

 

saludos mate

Link to comment
Share on other sites

  • 6 months later...

That was one part of my question: I suspected you try to write some kind of a bot.

But the other part is: Why learn something for which you have no real use for? We are no longer in school so everything we do should serve a purpose. Another point: Memory handling isn't an easy task. So why not learn something you have a real need for?

Sry for quote a bit older post, but i am not agree with this. Why most of an experienced AutoIT user become selfish, suspicious and makeing all the time conspiracy theorys. Some ppl like me, like to learn stuffs and like to get fk up with things, when try to solve problems, cause it is chalange me, make my mind working, finding new ways, make my logic better, and give me more experience. One of my friend start laugh on me, when i start learning this language... Why not? Interested, for me, chalangeing me, and can learn something new, and maaaaaaybe in a future, i can use this knowleadge in other language, etc. My other friend supriced, what stuffs i could made with useing help file and seeking info on forum, to understand stuffs better. First of all, all my programing knowleadge before AutoIT was like my brother show me few basic simple stuffs in Delphi, how to make $a + $b = ?

So just simple primary school mathematics stuffs.

Everyone have to start somewhere, and if you know the basics, you wana be advenced, and when you rich that difficult lvl you wana be better. Humans are like that.

Example if i wanted to get help in pixelgetcolor, (did not got any replay on my topic, so nvm) ppls start comming up, oooo you wana make bot for sure... I do not understand, why always that is the first idea. :( Btw do not need anymore help in pixelgetcolor... Find out by myself, how to use perfectly. You can use it for bots, true! But you can use it for other programs as well. Example for my PCTV ;-)

When i wanted to record movie but i do not wana store the commercial (evry commercial are like ~10 min long, and they appear like every 20-25 min after the commercial, and in uncompressed Avi take a lot space on high resolution). Maybe i live in a crapy country, and we have crapy TV stations, but still... With PixelGetColor, i can identify when the movie brake up with commercial, since the chanel emblem is gone, so the program can stop the record and start when the emblem is back, example. I do not wana buy a stuff for recording movie from TV, if i can make it by myself for free, and anyway after i watch the movie i delete them always, so to buy stuff for that, it is waste of cash for me. But i am sure, someone could come up with that solution, instead of eplaining stuffs. :D

I also saw, ppls offering stuffs as a solution, what someone else selfmade. That is nice, and good, etc, but not always that what the person need. If ppl get the full stuff he / she will never learn anything, but if they get advice and explanation, they can try to understand, how that stuff should work, so they will take questions less times, at next time.

P.S.: The next stuff what i am thinking to make is a filtering system for outlook, since the basic filter in it start fk up my emails, and puting them into a wrong folders, when i try to filter them as spam like "Buy cheap viagra" stuffs. -,- The spams are very anoying, but when you have missing emails cause of outlook somehow made mistake and put your email in spam folder, that is pain in azz, if that email is important.

That is my opinion.

If i get warning cause of this, then fine...

Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

Link to comment
Share on other sites

I've been here going on 10 years. The number of times where I've seen memory reading or pixel search NOT being used for gaming - 1 out of a 100.

You can throw up word walls with arguments all you want saying otherwise. For us old timers - experience says otherwise.

Link to comment
Share on other sites

Couldn't have said it better :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Well can be, but there are the exception, and for them they alredy have a stamp on theyr head. I am not useing this forum that long time, and when i was searching here, to find solution on my problems, i also saw many topic locked cause of that issue.

Just simple do not understand, why ppls wana make bot for game with this language... With out hack they can not make useful bot for any kinda game. If they have hack, they can make better bot with other program language, cause all my game experience say that, 99% of online games have bot and hack protection. To go behind the protection, you need a hack program, what will disable or cheat out the detection system. If you have that, then you can get much better bot, what have a decent AI, then your AutoIT bot for games.

Maybe ppls do not know that, or i am think wrong. But if the first option, just simple can not understand, if they have enough brain / knowleadge to make bot for games, why they can not think on that protection system? o,O

They can download a lots of bot program for all the games, and hacks etc, and all are final version, and some of them have support with uptadeing the bot / hack. And that will be 100000 times much better then the bot what was made with AutoIT.

Do i think wrong?

Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...