Michal 'GiM' Spadlinski 16:o3:1o CET 2oo7-11-11
Just for presentation purposes, I've made available small application, that shows working Object database server, that I have implemented on one of courses. Here's link for those who'd like to take a look. I'd like to change all the stuff that operates this page, but I don't have enough time. I'm working on some small and fun application, I'm also working on mine MSc, besides that I'm learning D :) really cool programming language.
Michal 'GiM' Spadlinski 15:37:37 CEST 2oo7-o3-o6

back cracking, backward debugging, reverse debugging

This is quite popular technique used by AV researchers and crackers. It is mainly possible with use of virtual machine, that is able to create images of current state of operating system. it's really simple, but quite powerful, and speeds up software analyze.
All you have to do is run your favourite debugger on VM. When you get to the fragment of code, where you're not sure, where to go next, you simply create snapshot of VM (VMware has such a functionality, also bochs if I'm not mistaken). then you continue analyze, if you went wrong path, you simply restart VM from yor last snapshot. simple, huh?
Michal 'GiM' Spadlinski 12:51:18 CEST 2oo7-28-o4
As You have probalby noticed I'm updating this page really really rarely.
I've recently improved script for E17 found on gentoo wiki page. You can take a look at it here: e17-backup-bindings.sh. I was working on few thing recently, but most of them are not quite ready to be shown in public ;). I will maybe organise small contest on my jogger connected with those recently written applications.
Michal GiM Spadlinski 22:o5:56 CET 2oo6-17-12

Be(a)ware of Java Script eval()

Recently I've been dealing with some Java Script code. I was using some interface that after small investigation (well in fact I was looking for bug for three hours ;/) looked like this:
function myfunc(something, somethingelse, ..)
{
  ..
  for (i=0; i≤yetanothersomething; i++)
  {
    ..
    eval(somethingelse);
    ..
  }
}
I was calling this function like this:
myfunc("var i=6; ..");
Because I didn't knew the structure of 'myfunc', I had no idea it calls eval in a loop and that it also used 'i' variable. Simple sollution to this would be to surrand the code with anonymous function like:
myfunc("(function(){var i=0;})();");
You can test this by clicking on following link [or cut-n-pasting this link to your location bar]
javascript:var z=5; for(var i=0;i≤7;i++){alert(i); 
    eval("(function() {var i=z; z++; alert(i);})();");}
Michal GiM Spadlinski 16:57:58 CEST 2oo6-14-o9
I'm creating small ajax-based cms and I was fighting with small problem. I needed to include image that is generated.
When user entered page for the first time, everything was fine, he clicked on a link, ajax call was made, image showed. But it seems my browser (Opera 9) has cached the image, and second click on link, showed the same image again. I've added no-cache, but nothing changed.
So I've found simple solution. In ajax response, I had src of image set to:
'generated-image.php'
so I've changed it to:
'generated-image.php?'.uniqid(rand());
And the problem is solved :)
<-- newer ]=[ older -->