Archive for the 'Skill - Advanced' Category

Monitoring Your Event Log - The Code

April 23rd, 2008 | Category: Coding, Defense, Skill - Advanced

So yesterday we talked about the event log, you could were you so inclined, just keep the event log open and periodically refresh it thereby keeping an ‘eye’ on the event log.  However, in the end this is impractical.  So what you do is access the event log in code and monitor the events you are interested in, then when one of them fires off you notify yourself via some mechanism that suits you.  So how, you ask, might I monitor the event log in code?  Well I am glad you asked, lets look at the code after the break. Read more

No comments

Monitoring Key Presses … The Lazy Way

April 18th, 2008 | Category: Coding, Skill - Advanced

So several of the applications I have written these last two weeks have involved monitoring the keyboard for key presses in one way or another.  There are a couple of ways to go about this sort of thing, one easy way and one hard (but less resource intense).  The first way is to loop (using a timer) checking the state of the keyboard every so often.  The second way is to use a global keyboard hook, which is a little bit difficult to implement since you have to have an outside dll do some of the work. 

So obviously I am going to show you the lazy easy way since that is what I have been using.  The easy way is the only way to really do it when you are knocking out code quickly for small amusing apps. 

Lets look at the code Read more

No comments

Protecting your Executables Part II

April 08th, 2008 | Category: Coding, Defense, Skill - Advanced

Welcome back today we are going to talk about a hole left in yeasterdays protection of executables.  That hole lies in the fact that if you rename an executable then kill it, there is no way for a watcher processes to restart it.  So what we do to solve that problem is watch the executables to make sure their names dont change, and if they do, you just change them back.  Lets look at the code. Read more

No comments

Protecting your Executables

April 07th, 2008 | Category: Coding, Defense, Skill - Advanced

So a common problem you may imagine when engaging in office warfare is that it is quite easy to just end task on an executable.  The problem with this is that once your program is killed it can no longer defend you or attack your friends.  So how do we handle this problem? Well there is a fairly simple way to go about it, and fortunately for you I am about to share that with you.

Here is the general idea, you create another program to go along with your application you are sending, this programs sole purpose is to watch the list of processes and if your main program gets killed it just restarts it.  Then you add a little code to your main program that does the same thing for the watcher program.  Then if either program is killed they rerun the other one before the evil killer of little cute programs has s chance to kill the other. Read more

No comments