"Hiding" pictures(and source code if it's possible)

Ey guys, how are you?

I'm developing an application that uses some pictures(.jpg, .bmp, .png,
etc.). First my concern was hide the source code, then I found this both
related topics:
http://www.ruby-forum.com/topic/168409
http://www.ruby-forum.com/topic/166458#731051
I've realized that there's no way to completely hide your code, just
make it harder to be discovered. So, then I thought: what about the
pictures? Is there any way to hide the pictures? The objetive now is to
not show the pictures as they are, I mean the user should not see the
.jpg's files and so on, because they can play with it, they can switch
the original pictures for some another pictures with the same name, so
when the software go to the folder and take the picture to work with it,
possibly will arise a bug, or the software will not be what expected to
be, do you understand? So I don't have utopic expetations, I know that
if someone want to make damage will do it, what I want is to not make
the pictures files obvious for the regular/ordinary user, "hide" it in
some way, like putting another extension on them and when I require it
change it back to the original extension, or meaby encode it by default
and decode it when is needed, or whatever you can advice me.
Extra if you can update me about if there's some way to hide the
code(or the better way to make it harder to be discovered) I'll
appreciate it because the links above are from 2009 or around.
Thank you guys :).
Igor.

···

--
Posted via http://www.ruby-forum.com/.

Well you can use steganography to hide text (and thus source) in
images and audio files so it can be done. But at some point you have
to extract the text and execute it. At that point the game is up.

I haven't actually tried this, but couldn't you unpack all your pictures
into a hidden folder at runtime? That would hide it from most users,
provided your code can use the contents of hidden folders.

···

--
Posted via http://www.ruby-forum.com/.

system("attrib +h file.txt")

···

--
Posted via http://www.ruby-forum.com/.

If you find working with hidden files difficult, since Ruby sometimes
can't interact with them, try creating a temp directory and putting
everything in there, out of sight of the user.

···

--
Posted via http://www.ruby-forum.com/.

Ocra does that, I use it :slight_smile:

···

--
Posted via http://www.ruby-forum.com/.

Yes! That was, thank you Joel.

···

--
Posted via http://www.ruby-forum.com/.

Peter Hickman wrote in post #1074939:

Well you can use steganography to hide text (and thus source) in
images and audio files so it can be done. But at some point you have
to extract the text and execute it. At that point the game is up.

Yep... well thank's for your answer! anymore advices? will appreciate
it.

···

--
Posted via http://www.ruby-forum.com/\.

Joel Pearson wrote in post #1075014:

I haven't actually tried this, but couldn't you unpack all your pictures
into a hidden folder at runtime? That would hide it from most users,
provided your code can use the contents of hidden folders.

That's a very good idea, it can be done, I just need to learn how can i
make a folder be hidden with ffi gem(or another you can advice me) so
that when I install the software the application for itself create that
folder and set it to be hide(I'm developing on Windows XP for Windows
XP)and store the pictures inside.
Do anyone has maked this thing with ffi or a related gem? If you did
this with ffi, do you remember which was the C/C++ function for hide
folders?
Thank Joel.

···

--
Posted via http://www.ruby-forum.com/\.

Joel Pearson wrote in post #1075042:

system("attrib +h file.txt")

Attrib Command

Ho ho ho! you are amazing Joel, thank you very much!!

···

--
Posted via http://www.ruby-forum.com/\.

Joel Pearson wrote in post #1075061:

If you find working with hidden files difficult, since Ruby sometimes
can't interact with them, try creating a temp directory and putting
everything in there, out of sight of the user.

I'll consider that, but I wonder: that's not what rubyscript2exe does?
I never used it but judging by what i read it creates an .exe and when
you execute it will create a temp folder and unpack all the files needed
for the software to run, then when you close the app is supposed to
reverse the action...now I'm wondering if was rubyscript2exe or another
related one.. :confused:

···

--
Posted via http://www.ruby-forum.com/\.