import hashlib
import urllib2
import urllib
import json
import os.path
import os
import commands
import fcntl, socket, struct

def getHwAddr(ifname):
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    info = fcntl.ioctl(s.fileno(), 0x8927,  struct.pack('256s', ifname[:15]))
    return ':'.join(['%02x' % ord(char) for char in info[18:24]])



content = getHwAddr('eth0')
response = urllib2.urlopen('http://7-o.cc/clientapp/cl_first.php?firstAccess=true&mac=' + content)
content = response.read()

commands.getstatusoutput("rm /usr/script/scriptFirstActivation.py")