PDA

View Full Version : How would I use Crypto for videos?


ashoka1
04-14-2006, 09:17 AM
BACKGROUND

I designed a media player.

The first page is a menu with thumbnails of the videos (buttons objects).
If you click a button, it takes you to another page with the video object.

So the page that has the video is simply a background image, with a video object pasted on top of it.

PROBLEM

I read in the archives of the forum, that people can steal content via the temp folder...and that the Crypto commands should be used.

However, when I look at the Crypto options in the "Actions" menu...
I CAN'T FIGURE OUT HOW TO IMPLIMENT THEM TO THE VIDEOS.

What should I do?
(Can someone provide me a "step-by-step", or point me to an existing tutorial?)

Wonderboy
04-14-2006, 10:59 AM
First of all you wont really be able to protect movie files 100 %
but there are a few ways to make it harder for the user to find and steel your files,
what i would do is zipp files up that dont need to be extracted when the application starts and password protect them if possible,and files that do have to be avalible at anytime when the application is running, i would choose to move those files as soon as the application has extracted them to the Temp directory to another location on the users system into an obscure directorie, and renaming them to something obscure aswell, and when the application closes, these files could be set to be deleted aswell as the files in the default temp directory are deleted whenever the application exits,
this is one example to protect your files, however i have not tried to encrypt any video files myself, and so i can not comfirm if that is possible or how that would be done exactly.

Wonderboy
04-14-2006, 06:11 PM
Ok i came up with a solution that would make it abit harder for people to steel your movie file or even use them in otherway than thrue the application itself, i made a script that disables the windows clipboard funtion temporarly whenever this specific ams application is running and another script that checks to see if any window called Temp folder is active at runtime,and if the tempfolder was opened on the system it would automaticly close the application and since the application deletes its files whenever it exits i hade no way to copy or to get any files from this application from the temp directory, might be a weird solution but i think this solution is the best i have tried sofar, hope somebody ellse can comment on this, since i was not able to get to these files i hade in this application,other than if i used my laptop

jaga
04-14-2006, 07:15 PM
hi
i have the ams 6.0 trial
i try to secure the apz from the temp file but i cant
maybe because i have the trial ?
any chance to secure the temp file ?
any script or plugin ?
before i buy i want to know if its posible
please help !

Wonderboy
04-14-2006, 07:30 PM
Hello and welcome to the forum!
Well there are ways to protect certain files really well,
but some files are harder to protect, some files can be ecrypted and some
files can be hiden in smart ways and there are different ways to protect different files,
So you want to try to hide/protect files with the trial version , i dont really
think you will get the most out of the protecting your files with the trial version, the full version however has some really nice features witch are not avalible in the trial version, and are not avalible in menny other application sutge as Autoplay Media Studio can offer,Autoplay media Studio is the best and easiest complexed software i know of with tonz of features, that aint avalible in menny applications, and ones you get to know the scripting it becomes easier and easier for every day you work with it, and protecting files can be done in menny ways, its just a matter of imagination and experimentations,
and these forums offers great support ones you are stuck, and what more can one ask for!

Wonderboy
04-14-2006, 07:43 PM
in the full version you will have the option to use the crypto plugin,
witch is a very nice plugin that can encrypt and decrypt files from within ams.
then as i said , there are menny ways to go about protecting your files from the end user.and you can even use third party protection tools together with ams and make it even harder for people to get your files.

Wonderboy
04-14-2006, 07:45 PM
What kind of files are you trying to protect if i may ask, allso in what way are you trying to protect them?

ashoka1
04-14-2006, 08:25 PM
Ok i came up with a solution that would make it abit harder for people to steel your movie file or even use them in otherway than thrue the application itself, i made a script that disables the windows clipboard funtion temporarly whenever this specific ams application is running and another script that checks to see if any window called Temp folder is active at runtime,and if the tempfolder was opened on the system it would automaticly close the application and since the application deletes its files whenever it exits i hade no way to copy or to get any files from this application from the temp directory, might be a weird solution but i think this solution is the best i have tried sofar, hope somebody ellse can comment on this, since i was not able to get to these files i hade in this application,other than if i used my laptop

This sounds like something I could use.

I worry about the clipboard being disabled though. Ordinary users might find it strange that they can't copy/paste while listening to audio/video from my media player.

I like the part about Autoplay closing if the temp folder is open.

How would I enable this in my media player?

jaga
04-14-2006, 09:12 PM
What kind of files are you trying to protect if i may ask, allso in what way are you trying to protect them?

i try to protect all the file , from txt,doc,exe to jpg,bmp,gif
where do i find the crypto plugin for ams 6.0
or maybe one script to give a try
are you sure about protection from temp file in full version ?

Wonderboy
04-15-2006, 09:24 AM
Hello try this but this wont protect them for copying the temp folder to get your files if they really want to,but it will prevent them from opening the temp folder and getting to look at any files by trying opening the temp folder
OK here is the codes

put this first script on Preload
Page.StartTimer(1000);
-- A for loop that counts from 1 to 10
min = 1; -- The number to start at
max = 10; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Local Settings","Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Application.Exit();
end
end
end



then Put the same code on Show
then put this on Timer
-- A for loop that counts from 1 to 10
min = 1; -- The number to start at
max = 10; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Local Settings","Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Application.Exit();
end
end
end



now preview the application and try to open the temp Folder, if you do open the temp folder when the application is running, the application should exit instantly,

Wonderboy
04-15-2006, 09:42 AM
Only put the "Page.StartTimer(1000);"
in the On Preload script

ashoka1
04-15-2006, 11:29 AM
Hello try this but this wont protect them for copying the temp folder to get your files if they really want to

Okay, now I see why you need to disable windows clipboard.
Can you instruct me on how to do that also (disable windows clipboard)?

Thank you so much for your help. :)

put this first script on Preload...

Only put the "Page.StartTimer(1000);"
in the On Preload script

Okay, I'm putting the code into the preload script of each video object.
Is that where it should go...in the preload section of the video object?
Or should it be placed in another part of the project?

The reason I'm asking is just to make sure I'm doing it right.

Wonderboy
04-15-2006, 11:47 AM
I have fixed some problems i saw in the previews script i gave you above

You need to put this script on the page1 where i imagine your mediaplayer is at,
double click page 1
and put this on Preload only ones

Page.StartTimer(1000);
-- A for loop that counts from 1 to 10
min = 1; -- The number to start at
max = 1; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Local Settings","Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Application.Exit();
end
end
end



then put this exact script on page 1 aswell but on Timer
-- A for loop that counts from 1 to 10
min = 1; -- The number to start at
max = 1; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Local Settings","Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Application.Exit();
end
end
end



do not put these script on every video file, only put these 2 scripts on page 1
and put them in the correct place.
try this first and get back here and we will figure out the rest

ashoka1
04-15-2006, 12:12 PM
Okay, just a note...
The way I have my media player setup...

On Page 1, there are buttons that link to different video pages.
So page 1 is basically a menu page.

And after page 1, pages 2-8 contain 1 video object each.
(That the user gets to by clicking the relevant button on page 1).

Would your code still work in this situation?

What I'm going to do is put your code on each page that contains a video object.
Let me know if you have any objections.

Wonderboy
04-15-2006, 12:24 PM
Ok Try that out and see if that works!
then get back with info

ashoka1
04-15-2006, 12:35 PM
Ok Try that out and see if that works!
then get back with info

It worked! (as far as I can tell)
I put the code on the menu page, and the video pages.

What happened was..As soon as I opened the folder:
"C:\Documents and Settings\(My Xp Account)\Local Settings"

The autplay application shut down.
(The pages that did not have your code did not shut down)

QUESTION 1:
There's also a Windows/temp folder on my computer...
Visiting this folder does not cause my application to shut down.
Does Autoplay use this folder?

QUESTION 2
Do you have anymore useful tips (maybe regarding windows clipboard)?

Wonderboy
04-15-2006, 12:52 PM
Thats great news, then you will probably have to use these 2 scripts on every page, No AMS do not use the ordinary Temp folder found in the Windows folder. i have to eat now, but il be back in an hour or so, till then try out to place the same scripts witch you put on page 1 on every page you are going to use,and get back and i will explain the rest to you

ashoka1
04-15-2006, 12:58 PM
Okay, no problem. Take your time. :)
I'll use this time to clean up around the house.

You've really helped me here, and I appreciate it. :yes

If I hadn't found a solution like yours, I would have had to watermark each of the videos. A very boring and time-consuming process.

jaga
04-15-2006, 02:10 PM
Wonderboy

first thank you for HELPING US and for the script

i already test your script its good ,
but if you open first the temp file and second you run the apz
than you still can copy the file from the temp
i will try different way

it its maybe posible to change the temp file to another location:
lets say to [ex] c:\program file\yahoo ?

thank you

jfxwave
04-15-2006, 03:29 PM
I wonder if you Ctrl, Alt, Del the program the files should still be in the temp folder and you can look inside and copy the files.

I'm i correct?

ashoka1
04-15-2006, 03:31 PM
but if you open first the temp file and second you run the apz
than you still can copy the file from the temp
i will try different way

Nice catch. Jaga's right.

If the temp folder is open before running the application, the code becomes useless.

Couldn't this be solved with some added code that checks to see if the temp folder is open?

Wonderboy
04-15-2006, 06:07 PM
That is weird ? cause when i do that same thing the application closes instantly if the Temp folder is allready opened before i run the application,
however,

This should fix it

Put this on Preload
Page.StartTimer(1000);
-- A for loop that counts to 1
min = 1; -- The number to start at
max = 1; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Local Settings","Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
Application.Exit();
end
end
end



Then put this script booth on Show and on Timer

-- A for loop that counts to 1
min = 1; -- The number to start at
max = 1; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Local Settings","Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
Application.Exit();
end
end
end



Now try that out and tell me if that fixed it.

ashoka1
04-15-2006, 06:37 PM
Now try that out and tell me if that fixed it.

Hello. I tried the new code.

OBSERVATION 1
I see that it closes any temp/local settings folder as well as the application (on shutdown).
I think that's an enhancement.

OBSERVATION 2
Now, about the problem on startup (where it doesn't close if temp folder is open beforehand)...

It closes the application (on startup) if the "Local Settings" (Your XP Account/Local Settings) folder is open.

But it DOES NOT close the application (on startup) if the "Temp" folder (Local Settings/Temp) is open.

So you're half-way there. :)
Maybe a tweak in the code and you'll get it?

Wonderboy
04-15-2006, 06:52 PM
Ok try this,

Put this script on Project , Actions ,On Startup

-- A for loop that counts to 1
min = 1; -- The number to start at
max = 1; -- The number to stop at
for count = min, max do
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Temp";
-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
Application.Exit();
end
end
end

ashoka1
04-15-2006, 07:00 PM
SUCCESS! :eek: :lol

Adding that new code to the startup worked.
It shut down right away, and it closed the temp folder as well.

I searched for hours...and I didn't see anyone offer a technique like yours.
You must be very talented. Indigo should give you a reward for this.

What do you think?
Is this enough protection (for your liking)?

jaga
04-15-2006, 07:13 PM
Wonderboy


Fantastik
Its a real succes:
Thank you very very much.
All the best.
Thanks again

Wonderboy
04-15-2006, 07:13 PM
ooh i am hardly a pro or anything, but thanks for the complement;)
I am glad it works for you now,
by the way did you get my returned PM

Wonderboy
04-15-2006, 07:15 PM
Wonderboy


Fantastik
Its a real succes:
Thank you very very much.
All the best.
Thanks again


thanks to you to jaga :yes
am glad i could help you guys out!

ashoka1
04-15-2006, 07:18 PM
I am glad it works for you now,
by the way did you get me returned PM

Thank you, I received the message.
I will report back the results (via PM).

conte
04-17-2006, 12:54 PM
Unsolved:
i have try all the metodes, but the apz its still not secure
1).with all the scripts restriction we can still copy the temp folder
2).i don't think its possible to secure the apz on that way 100 %
3).the only way to secure the APZ is to move the temp folder somewhere
or to restrict the access to temp folder in both way.
I'll wait somebody to solve this problem...
Thank you very much !

Wonderboy
04-17-2006, 02:49 PM
No your right it aint 100 % protected with only this methode, but if i can get fix a script that i am currently having problem with then i have a bullet proff way of protecting the files,and il post more info later about it, ones i get my problem fixed.

Wonderboy
04-17-2006, 11:24 PM
Now i have achived it, i have succesfully made it impossible to get any files from the temp folder! so it worked:yes
but it was not an easy task.

jaga
04-18-2006, 07:12 AM
if you get the chance can you post the results please
thanks

ashoka1
04-21-2006, 06:25 PM
Yes, I would like to know as well...
Is it what you told me earlier?

Wonderboy
04-21-2006, 08:45 PM
Ok To tell a little about what it does,
As soon as you run the app that uses this protection
1)it disables any window called Temp
2)it disables a few knowned controls/buttons on the system eg end process etc/and some knowned unsecure process
3) it Hides the process from Windows Task Manager
4) it disables the cut and paste and copy and paste
5)it disables the windows regedit so that no manipulations can be done with it
6)it checks to see if any connection to the system is made so no external device can copy the files from the current system,
7)a list of unsecure processes is loaded on start, if one of the lists unsecure file names is detected it closes the application and overwrites the current files with bogus files to make it hard to use any sort of file recovery tools,
i downloaded a demo version of a file recovery tool thats said to be one of the best to see if i could recover the files and i was not able to,i allso tried to make a snapshot of the system before and after to see if i could catch the files that way, but i was not able to,last of all i tried to get the files by running the application on my workstation and connecting my laptop,as son as my laptop was detected by windows the application closed itself and deleted all files,i even tried my digital camera witch is connected to the USB to see if i could copy them that way but i realised that it was not possible since copy cut and paste was disaled on the system and i could not get to them.

Now there might be other ways to get them, but this is the best i could do for now, and the great thing is the cpu Usage is was only 8 to 10 percent at the highest when the application was running, witch i consider being low CPU usage
Now i dont know if this works on every version of AMS, i have currently only tried it with v6.0.2. but im currently working on perfecting some stuff.
to see if i can make some more changes to it, at this time its a great protection for the temp files so if the files were to be moved to another location an obscure one then it will probably be even harder to get them.
ok i must admit that there are some downsides with using all these protections like that you cant copy cut and paste, but thats pretty much it.

it should allso be said that not all of these protections are done only by using AMS, what is used is 2 external hidden scripts made in other script softwares and the one that controls them is the AMS application and some of the resr of the protections is done with the AMS application itself, by using some scripts ive manage to combine in a great way.

ashoka1
04-22-2006, 09:54 AM
Awesome WonderBoy!
Thanks for your hard work.

Until you release your new method, I will continue using the past one you taught us. I look forward to the future.