Archive for July, 2011

Hacking Facebook “Like & Win” competition

No Comments »



I just won a price by "Liking" a page on facebook "Like & Win" competition

Actually some company announced that they will give free gifts to the 2000th and 2011th users, who like their facebook page.

So what I did was simple,  I just made a python script (that's not hacking, just power of programming) to win that price and start that script to check the page status and alert me when page like is near 1998-1999 🙂

import urllib2,time,winsound
from HTMLParser import HTMLParser  

class MyHTMLParser(HTMLParser):

  def __init__(self):
    self.recording = 0 = []
  def handle_starttag(self, tag, attrs):
	if tag == 'div':
		for name, value in attrs:
			if name == 'id' and value == 'profile_header':
				#print "Encountered the beginning of a %s tag" % tag 
				self.recording = 1 

  def handle_endtag(self, tag):
    if tag == 'div':
      self.recording -=1 
      #print "Encountered the end of a %s tag" % tag 

  def handle_data(self, data):
    if self.recording:

var = 1
print "Checking current likes (remember 2000th and 2011th will get the price):"
while var == 1 :
	print "......"
	p = MyHTMLParser()
	f = urllib2.urlopen('')
	html =
	if string.startswith( '1,999' ):
		winsound.PlaySound("SystemExclamation", winsound.SND_ALIAS)
		print "Check the page and get the price"
	print "Sleeping for 5 minutes"

Change this URL to the URL of your choice []

Please note I am NOT responsible if that company sues you for cheating & for using programming skills in competition 🙂