Archive for the ‘Tools’ Category

Hacking Facebook “Like & Win” competition

No Comments »

 

Yappy,

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):
    HTMLParser.__init__(self)
    self.recording = 0 
    self.data = []
  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 
				break


  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:
      self.data.append(data)

var = 1
print "Checking current likes (remember 2000th and 2011th will get the price):"
while var == 1 :
	print "......"
	p = MyHTMLParser()
	f = urllib2.urlopen('http://www.facebook.com/pages/Some_URL_for_like_and_win')
	html = f.read()
	p.feed(html)
	#print p.data
	print p.data[4];
	string=p.data[4];
	if string.startswith( '1,999' ):
		winsound.PlaySound("SystemExclamation", winsound.SND_ALIAS)
		print "Check the page and get the price"
	p.close()
	print "Sleeping for 5 minutes"
	time.sleep(300)

Change this URL to the URL of your choice [http://www.facebook.com/pages/Some_URL_for_like_and_win]

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

Aloha


TPing – Latency Monitor

3 Comments »

Like most administrators, you’ve probably received a call from a user complaining that the network was “slow.” The good news is that with TPing you can monitor network latency, set maximum thresholds, and resolve problems before your users complain. Understanding your network, its performance, and its problems often requires a suite of tools that allows you to examine various aspects of your network. This tool provide solid data that let you baseline your network, troubleshoot problems, and measure anomalies and improvements.

TPing is a network monitoring tool written in Python. It uses its own low level socket programming to send ICMP ECHO_REQUEST to a host or device. With each collection, it sends 1 pings to get the latency. Results are then displayed in real-time so you can monitor network latency.

TPing  can be used to continuously monitor a number of servers, routers, workstations, or other devices and continually show real-time response rates.

TPing  is a simple console based utility that allows you to view ping results in a console window, TPing  can even track the network latency high/low limit recorded during the sample period.


(Click on the image to view full scale)

The TPing network latency application has the ability to concurrently store network latency results in a log file for later review and analysis.

The different colors are a function of packet loss. Yellow means life is good; red means you’ve got troubles.

Please download the TPing Package from here TPing and extract in same folder

For executing TPing (with Administrative Rights), syntax is :-
TPing.exe IP,MaximumLatency IP,MaximumLatency and so on
e.g. TPing.exe 192.168.0.1,100 yahoo.com,300 google.com,200

Incase of VC2008 Dlls missing error you might need to download & Install VCRedist package from here vcredist_x86