Sunday, February 25, 2007

Woot! 100%


It's been quite a long time since I last got a perfect score at JBB. The last time was almost a month ago in the SQL & RDB - Basic exam. But today I got a perfect score again. What can I say? Great! Thanks for my years of experience as a challenger. Anyway, kampai for now!

Wednesday, February 21, 2007

Java-Applet tutorial?

Do you want a Java-Applet tutorial? What would you like to be included in the tutorial? Cast your vote here ;)

Do you want a Java-Applet tutorial?
Yes, please!
No, I know enough Java for these challs
No, it's more fun to solve them all by myself ;)
No - other
Doesn't matter, I don't want to touch those evil challs you created :P
Free polls from Pollhost.com

New version of qtj 1?

Since many are having difficulty in picking the right solution from the many that give a perfect score, I'm considering to add some more checks into the challenge to make it easier. What do you think?

Do you want a new and easier version of "quangntenemy teaches Java"?
Yes, it's a real pain to find the only solution among the "perfect score"
Yes, it's too hard for me
Yes - other
No, it's more fun as it is
No, it's not hard at all
No - other
Doesn't matter, I already solved it :P
Doesn't matter, I wouldn't want to touch it :P
Free polls from Pollhost.com

Thursday, February 15, 2007

Green belt

Yes, I finally got a green belt at Java BlackBelt. It turned out that my experience of solving challs and creating Java applets for tbs has finally paid off ;)
On my way to the next blue belt ;)

Monday, February 12, 2007

OOP

No this post is not about the famous hit Oops! I did it again. It's about Object-Oriented Programming in Java.
Some of you might think, as I recently created the new quangntenemy teaches Java 2 applet challenge, which is mostly about OOP in Java, I should be very good at it. Well, the fact is that I am just above the beginner level, as classified by Java BlackBelt.
While roaming around the Internet looking for resources in preparation for the next belt, I came across this tutorial at Java Boutique. Very good one ;)
I am looking for more tutorials like this, or better, some ebooks about OOP in Java at intermediate level. If you have any recommendation, please let me know :)

No title

Arg, can't think of a cool title for today.
Anyway, my stupid ISP didn't let me connect to this blog for the last few days - Looking for a good proxy for the job.
Despite their suckiness, I was still alive ;)
Got myself an orange belt at Java BlackBelt.
Updated my homepage at freewebs.
And the new All The Strings crackit challenge is up at tbs thanks to Inferno ;) Enjoy guys

Wednesday, February 7, 2007

New host

Hey there, the penguin rider is still around here.
This time I've got myself an awesome webspace with 500MB storage, some cgi support (need to look at it a little more), and absolutely no ads (yay :D). Many thanks to alt3rn4tiv3. Maybe you should beg him for a free account too *cough*
Give it a try at http://quangntenemy.searix.net/. The new applet challenge quangntenemy teaches Java 2 is already hosted there. I am planning to migrate some other challenges too.
Oh and even if you see the directory listing there you shouldn't try to hack it - Nothing exploitable's there for you :P Go hack alt3rn4tiv3 instead, he's already put something there :P

Monday, February 5, 2007

Virus? No single chance!

Well, not many people are lucky enough to have something other than Windows at work. Really, just a few have that pleasure. I am among the unlucky ones. But not like the others who want to protect their comp with a huge security package (anti-virus + firewall + anti-spyware etc.), I wouldn't want any. Not because I'm not aware of the security risk, it's just that those things consume quite a lot of your system resources.
Right, just don't click on any suspicious link, and don't open any suspicious attachment, I'll be fine. That's what I used to think. It had been right. Until a few weeks ago. Heh, how funny it could be when you look at the processes in your task manager and see a winzip process running there, when the only thing you're using is WinRar? :P Anyway, nice try. The virus attacked some noob in my network and found a way to my computer. It didn't live long, though. A quick search took me to this page from McAfee and a quick manual delete wiped the virus out from my comp ;)
Anyway, yes, you might have guessed, the virus was not completely wiped out. Today while browsing some local folders, I saw the files again. The virus was not active, of course. But I would prefer wiping out all the infected files. Thus the following solution in Java:


import java.io.File;
import java.io.RandomAccessFile;
import java.security.MessageDigest;
import java.util.Hashtable;

public class Scanner {

private Hashtable hash;

public Scanner() {

hash = new Hashtable();
hash.put("WinZip_Tmp.exe", "165b15075a22b0825f286f8f2de8cf71");
hash.put("Temp.Htt", "ea7d7bd6eece99eb35daa1e5f1decd60");
hash.put("desktop.ini", "c06c6123a8d3723eeefe8ed813b0658d");

} // end constructor

public static String md5(File f) {

try {

MessageDigest md = MessageDigest.getInstance("MD5");
RandomAccessFile r = new RandomAccessFile(f, "r");
byte[] b = new byte[(int)r.length()];
md.update(b);
b = md.digest();
StringBuffer hexString = new StringBuffer();
for (int i = 0; i < b.length; i++)
hexString.append(Integer.toHexString((b[i] & 0xFF) | 0x100).substring(1));
return hexString.toString();

} catch (Exception e) {

return null;

} // end try catch

} // end md5

public void scan(File f) {

File[] files = f.listFiles();
if (files == null) return;
for (File file : files) {

if (file.isDirectory()) scan(file);
else {

String s = file.getName();
if (hash.containsKey(s) && hash.get(s).equals(md5(file))) {

if (file.delete())
System.out.println("Successfully deleted: " + file.getAbsolutePath());
else
System.out.println("Failed: " + file.getAbsolutePath());

} // end if

} // end if else

} // end for

} // end scan

public static void main(String[] args) {

String pathname = args.length > 0 ? args[0] : "./";
File f = new File(pathname);
Scanner s = new Scanner();
s.scan(f);

} // end main

} // end class

The code might be extendable to create a complete anti-virus engine. But you know, I'm too lazy. So if you're interested in completing the job, please do it and let me know ;)
And no, I'm not installing any anti-virus software on my comp. I wouldn't need one ;)

Friday, February 2, 2007

New host

OK, quangntenemy teaches Java 2 and Message Me have been moved to my site hosted at t35.com. The new links for the challenges are:
http://quangntenemy.t35.com/javalesson2/
http://quangntenemy.t35.com/messageme/
The only bad thing about t35 is that their ads scripts are really BADC0DED, therefore spoiled my W3C "valid" icons :P They sure need some brainwash.
Anyway, enjoy the challenges (and slap Inferno with relee's frozen trout for the delay in uploading them :P)

Thursday, February 1, 2007

"Message Me" ready for beta-testing

OK, finally it's out for beta-testing at http://quangntenemy.googlepages.com/messageme.html. Enjoy!
Google doesn't allow some special characters in the filename so some parts just don't work. When you're there just download the file for local testing ;) I'll be moving the challenge to freewebs soon.