Friday, January 1, 2016

Chat conversation between a Hacker kid and a victim(website owner).

How it feels when you open your favourite website and if you see a skull symbol on it? Awful right .. Imagine the feeling of website owner. 

Owner of faced the same issues, ofcourse he restored the site after hacker attack using wordpress vulnerability and after the obvious restore, he didn't leave the hacker and he traced out him using his email address which used as master email to hack and had a chat with him. 

Below is the conversation(source : and the hacker is a kid. I Hope you enjoy reading too...

 Blog Owner : Hi  
 Hacker Kid : Hey!  
 Blog Owner : Hi Sorry, was busy for a moment there. So how are you today?  
 Hacker Kid :Fine and you?  
 Blog Owner :Very good. Can U ask you a few questions about hacking my blog?
 Will use it for a blogpost on  
 Hacker Kid : Yes you can  
 Blog Owner :Cool. First: how did you do it?  
 Hacker Kid :Well, I used a vulnerability to bypass the admin account.  
 Blog Owner :A vulnerability in an old version of PHPMyAdmin, right?  
 Hacker Kid :No in the wordpress itself.  
 Blog Owner :Really? Cool. And that allowed you to reset the master
 email address?  
 Hacker Kid :Yes, exactly.  
 Blog Owner :So how did you find out my blog was vulnerable and
 why did you pick my blog?  
 Hacker Kid :Well, I just searched with google some blogs and I found yours.  
 Blog Owner :You searched for blogs running older versions of WordPress?
 There must me millions of those right?  
 Hacker Kid :Yes, but they are not all vulnerable and I didn't hacked 
 just your website.  
 Blog Owner :Ah, so how many websites do you hack a week and how many have you
 hacked in total?  
 Hacker Kid :Well, in total I don’t know but in a week if
 I have time I can hack a maximum of 50 thousand website, it depends 
 if I found a vulnerability or not.  
 Blog Owner :50,000 websites??? Amazing! So why do you do it?  
 Hacker Kid :Well, we are a hacking team so we do this to protest 
 against somethings, for example the last month I think there 
 was a genocide agains the Uygurs
 in the west of China and we just hacked around one thousand 
 websites of the chinesse government.  
 Our web page is:  
 Blog Owner :On my website you replaced my blog with a Turkish text
 (which i couldn’t read) and an animated GIF of the turkish flag, 
 right? What was that for?  
 Hacker Kid :Well, it was a power demonstration operation against our ennemies
 so that’s it.  
 Blog Owner :Enemies? Who are your enemies then? Are they Turkish?  
 Hacker Kid :Well, we have a lot of ennemies, our bigest ennemies are 
 Russian hackers and Brazilian hackers.  
 Blog Owner :How much traffic or attention does it get you to hack blogs? I mean,
 it seems not so effective to go through all the trouble of hacking blog 
 and then displaying a message that only Turkish people can read, right?  
 Hacker Kid :Yes, of course your right, but it was because of a 
 power demonstration, we hacked the United Union this year and there was 
 a message to them, if you want you can search about it, I saw it in the 
 European press.  
 Blog Owner :Okay, that sounds like you could learn a lesson in marketing 
 if you ask me. If I would hack 50,000 blogs a week I would make sure to have 
 a multi-language message there, a link to my website and a cool design.  
 do you know how long blogs stay hacked on average? My host restored my blog 
 within the hour and I’m wondering how long it generally takes before 
 blogs get restored?  
 Hacker Kid :Well, it depends,
 in general it takes 2 or 3 days.  
 Blog Owner :Do you have a link to a blog you hacked this week that hasn’t
 been restored yet?  
 Hacker Kid :Wait a moment I will look. There is one I think:  
 Well :D, actually if I don’t hack those websites some other people will find the
 vulnerability and hack it so I don’t think about it. But yes I know 
 it ruins some peoples day because I had also I website hacked.  
 Blog Owner :That really isn’t a good excuse right? You can always make the
 personal choice not to do it. Just because some people steal doesn’t 
 mean you have to do it too? But okay, next question: how old are you?  
 Hacker Kid : I’m 17 years old.  
 Blog Owner :What are your plans for the future?  
 Hacker Kid : Well, I’m a student and I’m in the economies section of my school,
 in the future
 I would like to be a broker or something like that but I won’t 
 stop hacking because it’s just like a game for me.  
 Blog Owner :A game that could get you jailed and annoys a lot of people? 
 Next question: You mentioned that you were surprised that I contacted you.
 Why? How many people contact you when their blogs get hacked?  
 Hacker Kid :Well, generally if somebody contacts me he or she just insults me
 and his or her situation becames more bad.
 :yes I was surprised to be contacted for a short interview.  
 Blog Owner :I see, and if they insult you you take that as an 
 invitation to hack them again?  
 Hacker Kid : There’s an article about the UN but it’s Turkish:  
 Hacker Kid : Well, yes and sometimes I just bomb their e-mail
 account so that they can’t use it more.  
 Blog Owner :You sounds like a skilled hacker. Don’t you think you could 
 use those skills for more interesting stuff? 
 Like starting a company online or working as a developer?  
 Hacker Kid :Yes, of course I think I can start a company but for starting a
 company we need time and that’s the biggest problem,
 as I’m a student I have to study.  
 Blog Owner :But you do find the time to hack 50,000 websites a week? :-) So,
 thank you for your time. Is there anything you would 
 like to tell me or our readers?  
 Hacker Kid : Well, I thank you too for spending your time and no 
 I don’t want to say something special to your readers.  
 Blog Owner :Well, I do have one last request: please don’t hack me any more…  
 Hacker Kid : Okey :)  

Sunday, December 6, 2015

Java Interview questions - Beginner level - 1

What is a final variable and effectively final variable in Java ? And give an example ?

final variable :  A variable or parameter whose value is never changed after it is initialized is final.

effectively  final variable : A variable or parameter is not declared as final and still the whose value is never changed after it is initialized is effectively final.

Why is the below program never generate a NullPointerException even the instance is null ? 

  Test t = null;

   public static void someMethod() {

There is no need for an instance while invoking static member or method.

Since static members belongs to class rather than instance.

A null reference may be used to access a class (static) variable without causing an exception.

What is the output of the below lines of codes ? 



Why you are not allowed to extends more than one class in Java where as you are allowed to implement multiple inheritance?

In case of extends Ambiguity problems may raise where as in case of interfaces, single method implementation in one class servers for both the interfaces.

 int a = 1L; Won't compile and int b = 0; b += 1L; compiles fine. Why ? 

When you do += that's a compound statement and Compiler internally casts it. Where as in first case the compiler straight way shouted at you since it is a direct statement.

Why it is printing true in the second and false in the first case?? 

public class Test
    public static void main(String[] args)
        Integer a = 1000, b = 1000;
        System.out.println(a == b);

        Integer c = 100, d = 100;
        System.out.println(c == d);



The second output is true though we are comparing the references, because the JVM tries to save memory, when the Integer falls in a range (from -128 to 127). At point 2 no new reference of type Integer is created for 'd'. Instead of creating new object for the Integer type reference variable 'd', it only assigned with previously created object referenced by 'c'. All of these are done by JVM.

What is the access level of default modifier in Java 

Default access modifier is package-private - visible only from the same package

Write a Program to check below the given 2 Strings are Anagrams or Not ?
For ex, below 2 strings are anagrams
String s1="home";
String s2="mohe";

Write program to reverse String("Java Programming")without using Iteration and Recursion?

Give me a real world example, where I have to choose ArrayList and Where I have to choose a LinkedList ?

What is the difference between a Iterator and a ListIterator ? 

What is the advantage of generic collection?

When can an object reference be cast to an interface reference?

Friday, September 18, 2015

Initialize byte array in Java and converting byte array to String

Just like any other Array, Byte array also have  the same syntax.

Below is  just an example to initialize a byte array.

byte[] bytes = [69, 121, 101, 45, 62, 118, 101, 114, 61, 101, 98];

But when you try to initialize your byte array, you will get compile time errors some times for bigger values.

For ex :

byte[] bytes = [69, 121, 101, 45, 62, 118, 101, 114, 196, 195, 61, 101, 98];

That code won't compile and you'll see a compile time error at the numbers, 196,195. The reason is that, Byte can hold up to the values  -128 to 127 only since it is 8 bits. Values greater or lesser than that should explicitly cast to byte so that they become bytes and not int's.

Hence here is the array after the  cast from int to  byte.

byte[] bytes = {69, 121, 101, 45, 62, 118, 101, 114, (byte) 196, (byte) 195, 61, 101, 98};

If you see, we casted the int values to bytes so that they sit in place of bytes.

Converting byte array to String : -

 Here is a small example to convert out byte array to a String in required charset format.

  String data = new String(bytes, StandardCharsets.UTF_8); 

Tuesday, September 15, 2015

Orphaned case error in Java Switch case

Orphaned Case Error in Java is one of the rarest errors you can see in Java. You can see this error  in cases like

  • When you write your case statements outside your switch statement. 

 switch (var) {  
       case 1:  
       //some code here....  
   case 2:  
       //some code here....  

  • If by mistake if you terminated your switch testaments unexpectedly 

 switch (var); { <--- statement terminated by ;   
     case 1:   
     //some code here....   

And in another case  where a case statement doesn't belong to switch and became orphan.

Note : Errors like this won't be seen if you are using an IDE since they compile your code on the fly and show the error message immediately, only traditional compilers will show this error, when you compile through your command line.

Wednesday, September 9, 2015

List of applications using GWT

In my initial days of GWT programming, with so many features why Google is not using GWT in it's own web applications. 

Later I found the below list of applications from Google which using GWT as their framework.




Hotel Finder



The New Blogger

Chrome Webstore  

Product Search

Public Data

New Google Groups


It seems there are many companies and famous websites also built with GWT. Will be back with complete list soon. 

Share it GWT lovers.