The app gets a text files as input and gets the ip-addresses of the domain names and saves them out to another file. This app has been developed for those who want to keep a backup of website's ip-addresses just incase the SOPA and/or PIPA get passed, and they can not access their favorite websites by using the domain names. Then the ip-addresse…
C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
getipaddressfromdomainnames
README
data.txt

README

/******************
 * 
 * 
    Copyright (C) 2012  Mustafa Neguib
    Copyright (C) 2008-2012 MN Tech Solutions (www.mntechsolutions.net)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
 * 
 * 
 */


The app gets a text files as input and gets the ip-addresses of the domain names and saves them out to another file. This app has been developed for those who want to keep a backup of website's ip-addresses just incase the SOPA and/or PIPA get passed, and they can not access their favorite websites by using the domain names. Then the ip-addresses will come to the rescue.
This is an open source project and the license is given above and you may further work on developing this project and use it in your project, however 
follow the rules and regulations of the license and abide by them.
This app currently works only on Linux, and i have tested it on Ubuntu 11.04. You may port it to other platforms.

The files contained in this project are as follows:

(1) getipaddresses.cpp
(2) domainnames.txt
(3) data.txt
(4) getip

The file getipaddresses.cpp is the app written in C++. This app takes the domain names listed in domainnames.txt as input, and then one by one using the function gethostbyname of Berkeley Sockets to get the IP-Address of the domain name. Then we concatenate the domain name and the IP-Address and saves that in a string object. Eventually the whole of the input file will be read and copied into the string variable. Then we will write the string variable to the output file data.txt.

At the moment, we have some domain names in the input file, and have also uploaded the file with the results in data.txt. When ever the app is run, the data.txt file is truncated and all previous data is removed and new data is written in it.

Since this app is being released as an open source app, you are allowed to modify this app in any way as you like, but do follow the rules and regulations set by the open source licence. Also you may update the file domainnames.txt and add more domain names to the file. Remember, this app is for every one, and this will act as a database for the IP-Address of the domain names just incase the SOPA and/or PIPA get passed and websites get their dns records messed up with. Even though the dns records get messed up, we can still access those websites using their IP-Addresses as long as the server hosting the website is still online. I recommend you to fork this project and imporve this app, and also add more domain names to the input file.

The file getip is the executable file compiled on Ubuntu 11.04. Run the file in the terminal to start the app.

We have to protect ourselves against the SOPA and PIPA and have to protect our interests.


Mustafa Neguib of MN Tech Solutions (www.mntechsolutions.net)