Jump to content

how do i hide my ini file


Recommended Posts

is there a way to hide my ini file when it gets created when I use IniWrite to update/create it?

There is something called Memory INI, a UDF someone wrote that allows you to do INI functions off of the memory.

What is it you are trying to do? Hide processes, hide files... It LOOKS malicious. Care explain why you need this stuff?

Link to comment
Share on other sites

You could make it hidden or system, which means that the user will have to set some special options to view them (the program itself can read them)

To set attributes use FilSetAttrib (don't know exact function name, I am on my Phone)

I must say though that it's a bad idea to hide your preferences. If you place

them

in @appdatadir you won't have "normal" user to see them. but advanced users, who knows what they are doing.

If your ini contains sensitive data like passwords, encrypt them or use hashes to verify instead

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

There is something called Memory INI, a UDF someone wrote that allows you to do INI functions off of the memory.

What is it you are trying to do? Hide processes, hide files... It LOOKS malicious. Care explain why you need this stuff?

Give me the link to where I asked for help on hiding a process. If you don't come up with one you're a liar and need to get off this forum.

And I don't give a flying F*** on how it looks, because I am tired of being accused of my intentions "looking" suspicious. The reason I'm hiding this is because my program does a lot of reading and writing (as you can see by looking at my 10 or so threads) and it dumps the data it reads to a temporary .ini file and I don't want the users to tamper with these files.

You could make it hidden or system, which means that the user will have to set some special options to view them (the program itself can read them)

To set attributes use FilSetAttrib (don't know exact function name, I am on my Phone)

I must say though that it's a bad idea to hide your preferences. If you place

them

in @appdatadir you won't have "normal" user to see them. but advanced users, who knows what they are doing.

If your ini contains sensitive data like passwords, encrypt them or use hashes to verify instead

I think FileSetAttrib() is exactly what I was looking for. Thanks.

geez >_<

@Hypertrophy, using registry will almost automatically solve most of your problems.

Just a suggestion, nothing more.

Already do this in other areas of my script. Thanks for the tip though.

Link to comment
Share on other sites

Why bump? I thought that your question was answered >_

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

Why bump? I thought that your question was answered >_<

He asked for the link I guess... shrug.

@OP

http://www.autoitscript.com/forum/index.php?showtopic=99730&st=0&p=715329&#entry715329

^^^ There is where you asked to hide a process. ^^^

Look Hypertrophy and trancexx, I don't have anything against asking for help. But I get a little flag raised when the past several posts have been about hiding items from the user.

Link to comment
Share on other sites

Give me the link to where I asked for help on hiding a process. If you don't come up with one you're a liar and need to get off this forum.

And I don't give a flying F*** on how it looks, because I am tired of being accused of my intentions "looking" suspicious. The reason I'm hiding this is because my program does a lot of reading and writing (as you can see by looking at my 10 or so threads) and it dumps the data it reads to a temporary .ini file and I don't want the users to tamper with these files.

I think FileSetAttrib() is exactly what I was looking for. Thanks.

Already do this in other areas of my script. Thanks for the tip though.

As Szhloppsaid, there is not any reason to hide items or processes from a user. Ihope a mod will read this thread and give a thumbs up or down aboutthis. ANY MAJOR PROGRAMS INCLUDING ANTIVIRUS DON'T HIDE PROCESSES AND/OR FILES, THEY PROTECT! THERE IS NO LIGIT REASON TO!

Funny that you ask this another time after a mod said no. If you want to, go learn it. Mods, developers, and members will not give you the code. I don't think that autoit and the comunity want to be part of your "F*** on how it looks" suspicious program (quote Hypertrophy). Please don't ask..

Anyway, if you have a "ligit" program:

I recommend that you don't write to the hard drive, this will slow it down. Use the memory, this is faster and can't be easly copied/viewed. Anyway why does your program need to:

The reason I'm hiding this is because my program does a lot of readingand writing (as you can see by looking at my 10 or so threads) and itdumps the data it reads to a temporary .ini file and I don't want theusers to tamper with these files.

U.. This sounds like a n00b keylogger, anyway:

FileSetAttrib() will not really solve this problem (I always have hidden files shown) >_<. Process Monitor can help a user to find the file and tell a program to copy this file. :( If you

Sorry for this nice "solution" but my recommendation would to be: A, Dump the data to a random folder and random name in the WIN\TEMP dir. This will make it hard to find it. Then Encrypt the data with _StringEncrypt to level 5+ and hard-code a key into the program (or use ). Then finally use FileSetAttrib() to hide the dir and file. This will ensure that it will not edited :(.

Link to comment
Share on other sites

Please settle down kiddies. This thread is getting out of hand and deserves to be locked for it's general aggravation level and, with the possible exception of Valik, a MOD won't likely say please.

@Hypertrophy

As you can probably notice from the replies trhat you have received, there is no 100% sure way of doing what you want. I don't care what you do with the file, if someone wants to mess with it they will.

This is about as close as I can think of off the top of my head. It uses an unknown file type and stores the data in Binary, plus the file is hidden (no help but what the hell) and read-only (See the notation for hidden).

;
$sIniFile = @AppDataDir & "\data.mni"
If Not FileExists($sIniFile) Then FileWrite($sIniFile, "") ;; Create the file which won't exist on the first run.
FileSetAttrib($sIniFile, "+hr")
;; Then wherever required to write the ini in the script
FileSetAttrib($sIniFile, "-hr")
IniWrite($sIniFile, "Section", "Key", StringToBinary("Value"))
FileSetAttrib($sIniFile, "+hr")

;; When you have to read from the file use
$sVal = BinaryToString(IniRead($sIniFile, "Section", "Key", "Default"))
;
EDIT:Also notice that the file is in the users AppData folder. They can find it there if tyhey think to look but at least it's not in @ScriptDir or @WindowsDir which are the first places that people usually look. DON'T put it in @TempDir, there are too many apps written that clean out that folder.

EDIT 2: corrected a major Ooooops in the IniRead()

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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...