Friday, September 12, 2014

Java Hack --- external private method access

Using reflection, you can access the private methods out side the scope of the class and get the method values.
 Reference: Java World

Our victim class:

public class Victim
 private String getPassword() 
  return "Password";
 private int getAge() 
  return 15;
 private String getMyName()
  return "Noob";

Now lets get busy hacking the victim.
import java.lang.reflect.Method;

public class HackVictim 
 public static void main(String[] args) 
   Class cls = Class.forName("");
   Object obj = cls.newInstance();
   Method[] methods =  cls.getDeclaredMethods();
   for( int i = 0 ; i < methods.length ; i++ )
    System.out.println("Method Name--->>>"+methods[i].getName());
    System.out.println("Method Return Type--->>>"+methods[i].getReturnType());
    System.out.println("Method Value--->>>"+methods[i].invoke(obj));
  catch( Exception e )
You are all set. :)

Thursday, March 19, 2009

run an application automatically on system boot

How to configure your system to run an application automatically whenever you boot your system?

First create a shortcut of the application you want to run & put this shortcut in the following location-

D:\Documents and Settings\\Start Menu\Programs\Startup

You can put that application directly to this location if you don’t want to put the shortcut.

Following are some typical examples one would like to start automatically whenever he starts system-

à Microsoft Office

à Web Browser

à Your mostly used IDE

à Any exe file

Bottom line Revenue and Top Line Revenue

Did you know the difference between Bottom line Revenue and Top Line Revenue, the terms that the Management uses during Quarterly Results?

A company's bottom line is its net income, or the "bottom" figure on a company's income statement. More specifically, it's a company's income after all expenses have been deducted from revenues. These expenses include interest charges paid on loans, salary to teams, general and administrative costs and income taxes. A company's bottom line can also be referred to as net earnings or net profits.

The top line refers to a company's gross sales or revenues. Therefore, when people comment on a company's "top line growth" they are making reference to an increase in gross sales or revenues.

Both these figures are useful in determining the financial strength of a company, but they are not interchangeable. Bottom line describes how efficient a company is with its spending and operating costs and how effectively it has been controlling total costs. Top line, on the other hand, only indicates how effective a company is at generating sales and does not take into consideration operating efficiencies which could have a dramatic impact on the bottom line.

Remote Desktop-maximum no of allowed users

Sometimes we are not able to login to a machine via Remote Desktop because maximum no of allowed users is over.

There is a trick to by pass this problem.

I would like to explain it by a live example.

Sometimes, Me & A friend, both need to work on a machine via Remote Desktop simultaneously.

But only one person is allowed at a time because of this restriction.

What we do is, one person log in there twice & then log off one session. At this moment if another person tries to login, he become able to login.

I am not sure, whether this will work in all conditions, just thought to share with you.

MS Word to PDF converter

Step are-

1) Upload your word document in gmail.

2) Open this in Google docs from there, it will be online only.

3) Modify online if you want.

4) Save as PDF on your desktop.