flat assembler
Message board for the users of flat assembler.

Index > Windows > saving settings

Author
Thread Post new topic Reply to topic
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
I`m curious about saving settings not in the .ini but in the executable itself. Is there any possibility?

_________________
dream of mind creates a monster
Post 19 Nov 2004, 07:32
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
Smile
of course, but some anti viruses will track your code down.
Post 19 Nov 2004, 07:44
View user's profile Send private message Visit poster's website Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
How is it possible? Should I work with crc calculation or just reserve some bytes and knowing their address write into as in a binary file?

Quote:
anti viruses will track your code down

coze of self modifying code?
Post 19 Nov 2004, 08:24
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
yeah, anti viruse used to track executables with crc32 or some hashing.
just reserve a variable, and then you might calculate the offset in your file, or you can simply modify unexecuted data after exe end, seek there, read/write, its a nice way to set up variables but be aware that some viruses do similar things even modifying itself entirely, so it will be hart to detect.
Post 19 Nov 2004, 09:35
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Quote:
I`m curious about saving settings not in the .ini but in the executable itself. Is there any possibility?

If you meant saving in the executable currently run, so it's impossible. Windows won't let you open file for writing when it's put in memory, read-only mode is then activated.

Although there are ways of fooling Windows in such situations, but these are meant only to be put in viruses Wink
You can always check some sources from 29A virii group
Post 19 Nov 2004, 20:26
View user's profile Send private message Visit poster's website Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1
I saw some sources of selfdeleting executables. The way I think is to copy .exe at startup (for example with .exx extension), work out, save settings in the .exx file, before exiting delete the original and rename .exx into .exe. Or to make little supporting (controlling) program that`ll handle all the operation I described above.
Post 20 Nov 2004, 07:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.