Since MAC address authentication is based on the MAC address we need to change the MAC address to an address that is not in the list of allowed MAC addresses of the WiFi access point.
Usually the MAC address is fixed in hardware but most operating systems allow you to change the address.
To change the MAC address in Ubuntu Linux follow these steps:
ifconfig wlan0
to look up your old IP address, write it down.sudo su
ifconfig wlan0 down
ifconfig wlan0 hw ether 00:11:22:33:44:55
ifconfig wlan0 up
The multiprocessing
library uses functional programming patterns to enable simple multithreading.
So to load and parse a website a simple solution looks like this (_ are used instead of spaces because the platform doesn't support spaces in code-tags):
def load_parse_page(url):
____request = urllib2.Request(url)
____page = urllib2.urlopen(request).read()
____print page # do the parsing
_
urls = ["http://localhost:80", "http://localhost:90"]
_
p = multiprocessing.dummy.Pool(10)
p.map(load_parse_page, urls)
This will create a thread-pool consisting of 10 threads.
Then the method map
is called which takes a function and a list of arguments.
For each argument the function is called inside a thread.