473,837 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using file memory to store hidden data

Say I'm writting a program. In this program for some reason I need to
store data somewere were I will be able to access it again. I don't
want to store it in a file because then it could be deleted by another
program or user. So, is there anyway to save data onto a computer so
that it will not apear as a file (actually idealy not apear as anything
at all), but will not get overwritten by any other program or file. If
this is OS spacific tell me because the more I think about it the more
it seems like it would be. Let me give an example of what I am looking
for:

/* getfmemloc() doesn't really exist */
/* putfmemloc() doesn't really exist */

getfmemloc(fmem loc); /* This would get data from the hard disk */
putfmemloc(fmem loc, data); /* This would put data to the hard disk at
that spot */

Is there anyway to do that (put data on to the hard disk and read it
off without using files and without having to worry about other
programs overwritting it)?

Thanks in advanced for anyone who may offer some sort of hint as to if
is this possible.
Nori

Apr 27 '06 #1
3 3152
no*********@gma il.com wrote:
Say I'm writting a program. In this program for some reason I need to
store data somewere were I will be able to access it again. I can't imagine why; my programs never work on data. They just...
execute themselves. I don't
want to store it in a file because then it could be deleted by another
program or user. So, is there anyway to save data onto a computer so
that it will not apear as a file (actually idealy not apear as anything
at all), but will not get overwritten by any other program or file.
Well, my iPod runs standard C, and if I take a knife to it then any data
you had "safely stored" will be overwritten. I know because I tried that. If
this is OS spacific tell me because the more I think about it the more
it seems like it would be. Let me give an example of what I am looking
for:

/* getfmemloc() doesn't really exist */
/* putfmemloc() doesn't really exist */

getfmemloc(fmem loc); /* This would get data from the hard disk */
putfmemloc(fmem loc, data); /* This would put data to the hard disk at
that spot */

Is there anyway to do that (put data on to the hard disk and read it
off without using files and without having to worry about other
programs overwritting it)?

Thanks in advanced for anyone who may offer some sort of hint as to if
is this possible.
Nori

It's not possible, and I can't see why any OS would give you that
capability unless it was inviting spyware. Are you writing spyware? And
please use a spellchecker.

--
Andrew Poelstra <http://www.wpsoftware. net/blog>
Every prime number in a series as a joke
Made all the patterns clear when I took that final toke
Apr 27 '06 #2
"no*********@gm ail.com" <no*********@gm ail.com> writes:
Say I'm writting a program. In this program for some reason I need to
store data somewere were I will be able to access it again.
There's a term for "somewhere where I will be able to access it
again". It's called a "file".
I don't
want to store it in a file because then it could be deleted by another
program or user. So, is there anyway to save data onto a computer so
that it will not apear as a file (actually idealy not apear as anything
at all), but will not get overwritten by any other program or file.
I think what you really want is to store the data in a file that can't
be deleted by another program or user. Many systems provide ways of
controlling who or what has permission to manipulate a specified file.

No such mechanism can be 100% secure. The information is going to be
stored in some form on some kind of hardware. Tossing the hardware
into a blast furnace will more than likely destroy the information.
Ways to alleviate this include controlling both physical and network
access to the hardware, and making frequent backups.

I have some important pieces of data that I store on a USB thumb
drive; it's connected to a computer only when I'm actually using it.
The data is, of course, stored as files.
If
this is OS spacific tell me because the more I think about it the more
it seems like it would be.


Standard C lets you read and write files; anything beyond that is
system-specific.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Apr 27 '06 #3
no*********@gma il.com wrote:
Say I'm writting a program. In this program for some reason I need to
store data somewere were I will be able to access it again. I don't
want to store it in a file because then it could be deleted by another
program or user. So, is there anyway to save data onto a computer so
that it will not apear as a file (actually idealy not apear as anything
at all), but will not get overwritten by any other program or file. If
this is OS spacific tell me because the more I think about it the more
it seems like it would be. Let me give an example of what I am looking
for:

/* getfmemloc() doesn't really exist */
/* putfmemloc() doesn't really exist */

getfmemloc(fmem loc); /* This would get data from the hard disk */
putfmemloc(fmem loc, data); /* This would put data to the hard disk at
that spot */
What is "femloc"? An inode? An int? Something else? This value is
key to your question. Even if you can actually get at the persistent
storage in some reasonable way, your approach will be tied to a specific
implementation of a filesystem. That is, there is no universal value
you can use for this argument that will translate into "a place on the
disk".

Anyway, this is security by obscurity which has very limited value.
Is there anyway to do that (put data on to the hard disk and read it
off without using files and without having to worry about other
programs overwritting it)?

Most operating systems offer resources like disk space in a highly
abstract way.

This is easily solved with a combination of file locking or memory
mapping (and perhaps encryption).

This is why some operating systems have high-level abstractions of
encrypted file systems that look and taste just like ordinary resources
that things like open() can get a handle on, even though they might be
doing some magic under the covers.

Another option is to do what databases did in the old days when they
could neither trust the filesystem or the other processes present on a
machine: build your own abstract filesystem out of big files. Grab some
chunks of disk as regular files (perhaps a linked-list of chunks so you
can dynamically grow and shrink as needed) and write your data to those
file(s) in some clever manner. You can obfuscate or munge that data how
you like. Judicious use of hashes and such will let you know if the
data is not to be trusted because it was changed outside of normal
processing.

Locking and file protection is still an OS abstraction, and you have to
trust that other process honour any ACLs (if present) you may have on
those files.

A related option is a small embedded database that you persist
serialized data to. Row locking is pretty robust, and most people will
never know your app has a little config file and database directory
squirrelled away.
Apr 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2932
by: Pete | last post by:
I having a problem reading all characters from a file. What I'm trying to do is open a file with "for now" a 32bit hex value 0x8FB4902F which I want to && with a mask 0xFF000000 then >> right shift 24 bits storing in result then printing the result. I thing a while or for loop is needed but I'm not quite sure how to go about it. How do I step through each character in this case and store it for use and passing to another function. ...
0
3947
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen. It is almost like it is trying to implement it's own COM interfaces... below is the header, and a link to the dll+code: Zip file with header, example, and DLL:...
17
2467
by: Davíð Þórisson | last post by:
now in my web I have some global variables to be used in many different subpages, in the old ASP I simply loaded a variables.asp file into memory using the eval() function. Now I'd like to use XML but what method would I use to load the entries from the xml file into memory and make them quickly accessible globally in the web code? Just need to know what functions specifically I should start reading about! Thx
21
2988
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have updated this system and changed the pages that are saved to the server as aspx - everything works fine and pages can be served - but Its not impossible for a single client to request 100 plus pages in one session - as each page is requested it is...
62
17883
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image(); img.src = ; Then I use the image a few more times by adding it into an Array object:
3
4518
by: kksandeep | last post by:
i am using this three files to uplod file. i got this file from net but i think these have some error. i am new to this field plz help the script i found is some helpful but not too that i need my objective is this that when i uplod a file it should be desply on same page with ajax uplod after when i refresh page this should be not remains longer and on clicking other image its replase previous image plz help how i can do this the...
2
3175
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand whats the prob.this is the code i m using: <? include("config.inc.php"); //error_reporting(0); ...
7
1935
by: pereges | last post by:
I've to store an array of structures: typedef struct { double origin; double e_field_at_origin_real, e_field_at_origin_imag; double direction; double pathlength; int depth; }ray;
8
28396
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found (correct me if I'm wrong about this) that can write excel 2007 files. The program works. I've tested it out on very small files (I will include the commented out main method that you can use to test this out yourself if you'd like, that is assuming you...
0
9842
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9682
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10271
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7806
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7000
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5668
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3124
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.