Monday, March 9, 2015

As per the topic, this is a post to show how to create a (i) Wifi AP, (ii) redirect users to a captive portal, and (iii) how to allow user to use the internet after they accept the terms and condition on the captive portal.

This is the environment we will be using:
Local interface which is connected to the internet.

8)
Time to start DHCPD and hostapd. once started use another device to see if there is a myhotspot. Everytime you try to surf the internet, you will be redirected to your localhost webserver. Whatever your are serving is called the captive portal.

dhcpd
hostapd /etc/hostapd/hostapd.conf
/etc/init.d/apache2 start

9)
So how do you enable internet for users? One possible way is to use your captive portal to create Iptable rule which enable a particular device (mac address). For example if your device is 11:22:33:11:22:33

Monday, September 29, 2014

I am in need for analyzing google search result, fortunately there are multiple opensource solution out there. But google hates scrapers and would block your IP should they determine that you are breaking their terms and condition.

Enter current password for root (enter for none):
OK, successfully used password, moving on...
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
$

Based on the code above, i have added regular expression to parse for OS, Webkit and Browser information. Feel free to try it: (Place Useragent information in column B of your excel sheet and execute this macro)