|
||||||
| Python Discussion forum for Python, a high-level language with simple syntax, but yet powerful. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
You know in the beginning of MI:II where Tom Cruise throws his glasses and they explode after he see what his mission is? Well, I am looking to write some code (maybe even just an autoplay .bat file) that would delete or corrupt a file (or the entire CD) after it has been run.
The exact use I have in mind is this: I am creating a video, burning it to a CD (could be R or RW), and giving it to someone. Easy enough, but I only want them to be able to watch the video ONCE (assume they are running XP on a Dell E1505), and so I am looking for something that will prevent them from being able to watch it again. Whether this is a registry key created that disallows access to this particular CD, or a script that corrupts the video file in question, I have no idea. Even something that would forbid access to ALL CDs (or even just disable the CD-ROM drive) would work, because then I could just undo it myself. Truth be told, I'm not totally sure where to start - or even if Python would be able to do what I'm looking for - and am just looking for some ideas. If I'm in the wrong place, a pointer in the right direction would be great; I'm just posting in the Python forum because it's the language I'm currently learning and thought this would be an interesting project to build toward (even if it is a little above my pay-grade at the moment). Thanks in advance, Chuck |
| Sponsored Links |
|
|
|
|||
|
After a little bit of trying to narrow down where I'm looking, I think there's two areas that I could influence that would result in what doing I'm looking for.
The computer The CD Personally, I don't really have any idea how I would create a self-corrupting file on a burned CD without using some sort of burning program to improperly overwrite the files. This would likely require running a CMD script or something that would automatically run burning software on my CD after the clip was finished in a pre-determined sequence. I don't think code that would accomplish this is within my grasp, especially to run it quickly enough that the user wouldn't be able to stop it. My next option is to attack the computer itself (I'm testing it on my own before my friend's, so I don't really want anything that I can't reverse later). Off the top of my head, I can see doing this through altering the CD-drive's drivers, or creating some sort of registry key that identifies itself with the CD and, upon autoplay, sets the maximum run times for the video file to "1" (kind of like what commercial companies do when they provide trial software that they only want run a certain number of times before you buy it). Does this get anyone else's gears churning? |
|
|||
|
Okay, so for the sake of argument, let's assume they were dumb enough.
My primary goal is to put together something that accomplishes what I want it to do. I can always work on the tweaks (and social engineering ) later once I've got the foundation down. My primary goal is this: "learn to design an autonomous package that renders itself unusable after being used". This is regardless of what the media may be, or how exactly it's done; I am using a video file as an example because I thought it would be a pretty cool application for it and might make for an interesting and worthwhile tutorial if I can figure it out.Anyways, I struck upon your idea of using an executable to run both the file and the corrupter, setting a time delay on the executable (Batch file examples - Wait) for however long the video file was (plus a little more to take into account opening the media player of choice, etc.). Then, once the time limit was up (and the video file had played), the "self-corrupt" phase could be enabled and we're done. Now, all I'm looking for is where to start. The executable that would run the video file is simple enough, and I'm sure I could figure out a way to set it up to auto-play (i.e. Autorun.inf Editor - Create Autoplay CDs - though I still need to look into how it works a little more). I think if I can figure those things out first we'll be off to a good start. For now, I'm still moving into my house so I've got to go pick up some boxes I left at a friend's over the summer. Cheers |
|
|||||
|
Why would you use a batch file, they are complete and utter ****?
Just write a program in python or C or whatever that waits for the video to be over. Then have the program write random bits over the video part of itself or if the video is a separate file, basically you would be patching it. That's all you need to do. |
| Sponsored Links |
|
|
|
|||
|
.bat files are good for doing things that .bat files are designed for. i.e. Short and simple scripts that you don't want to repeat over and over. For the 1300+ asset network I was an admin for before I returned to school, we would frequently use .bat files to execute scripts for mass-installs and policy configuration among other things.
Anyways, I know *what* I have to do, but what I don't know is *how* to do it. I am now looking for the library of code, the syntax and the commands I would be using to complete this prokect. At this point in time, my expertise remains in working with all forms of media (and related software), network management, hardware assembly/management, and user assistance. Want to set up some DHCP, print, exchange, and offline storage servers (along with the rest of the usual suspects), all managed through a central administrative console along with appropriate network security protocols? I'm your man. Code a self-deleting CD? Hopeless. That's why I came here. I am *not* fluent with coding in any language (other than HTML, ActionScript, and some cmd-line scripting), and am only beginning to learn python, so I don't really know where to start in terms of what you are saying I should do. What would help is an example of code (in whatever language) that would "write random bits of information over the video part" if you know how to do it. |
|
|||||
|
.Bat are worthless for almost everything at this point. I'm don't much feel like getting in to it with you about all of your 'talents', although that is really nothing spectacular.
However, I'm in class right now, but when I get home I'll put some code together for you. It will probably be in C++. |
|
|||
|
Each to their own.
I was just illustrating that what might be easy for you in regards to this won't be for me because I haven't really gotten into it thus far; there's really no need to be condescending. Looking forward to the code. |
|
|||||
|
Here is a C program that removes itself when run.
Code:
#include "stdio.h"
int main(int argc, char ** argv){
remove(argv[0]);
}
* You need the privileges to remove it. |
| Sponsored Links |
|
|
![]() |
| Tags |
| automatic deletion, scripting, tom cruise |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Visual Studio 2008 C# Folder Information | Jordan | CSharp Tutorials | 1 | 05-20-2008 04:05 PM |
| Basic Calculator | AfTriX | VB Tutorials | 3 | 02-29-2008 09:53 AM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |