Tuesday, March 24, 2009
adsttnmq1/sdioyslkjs2 attack
I’ve just found the my website has been hacked.
I’ve found a new directory “guiex” (but the name can change) containing two files: “m” a text file just listing “index.php” and a php file named “mnq.php” (the code of this file is at the end of this post).
Now we have two questions to answer:
1) How the hell these files have arrived here?
2) What the f**k are these files doing here?
[Read More…]
Monday, February 23, 2009
Bug 4724038
Today I stumbled upon the Java bug 4724038 (although Sun considers it an RFE).
The bug is related to the fact that Java memory mapping does not provide an unmap() method, due to security/efficiency issues.
It is 6 years old and it is currently ranked third in the top 25 RFEs list.
Looking at the comments its page, this bug has upset many developers along the years.
The final words in the bug evaluation section are really disarming:
[..] We at Sun have given this problem a lot of thought, both during the original development of NIO and in the time since. We have yet to come up with a way to implement an unmap() method that’s safe, efficient, and plausibly portable across operating systems. We’ve explored several other alternatives aside from the two described above, but all of them were even more problematic. We’d be thrilled if someone could come up with a workable solution, so we’ll leave this bug open in the hope that it will attract attention from someone more clever than we are. [..]
I’m going to try some of the proposed workarounds to the problem, and the I’ll post a comment on which one as worked best for me.
Thursday, February 12, 2009
GUI design question
Most text editors have the option of horizontally splitting the view of the currently edited document, thus enabling to use a part of the view for editing and the other part for browsing sections of the document that are distant from the currently edited one, but related.
Why most text editors do not offer a vertical split option?
[Read More…]
Wednesday, February 11, 2009
Small Javascript, great annoyance
What happens if a browser loads an HTML page like this one?
<html> <head> <title>Test 1</title> <script language="JavaScript"> while(true); </script> </head> <body> </body> </html>
Or this one?
<html>
<head>
<title>Test 2</title>
<script language="JavaScript">
while(true)
alert("free porn movies one click ahead ;)");
</script>
</head>
<body>
</body>
</html>
Or this one?
<html>
<head>
<title>Test 3</title>
<script language="JavaScript">
var x = new Array();
var y = x;
while(true) {
y[0] = new Array();
y = y[0];
}
</script>
</head>
<body>
</body>
</html>
Wednesday, February 4, 2009
Keeping things in (partial) order, 2nd part
In the previous post I have discussed a typical case in which the use of a heap structure is very useful, presenting some code that allows to build and manage a heap structure on-top of a vector.
To complete the discussion this time I’m posting the C# code that implements a “clean” heap data structure.
[Read More…]