View Full Version: Freindfinder/netfinder somethin like that

C++ Learning Community > C++ Works in Progress > Freindfinder/netfinder somethin like that


Title: Freindfinder/netfinder somethin like that
Description: find out where an internet adderess is


ih8censorship - July 4, 2003 02:36 PM (GMT)
i am making a program so you can tell what country a certain adderess is from like .ru .aq stuff like that. what else should i try to add?


**edit**

CODE

#include <iostream>
using namespace std;

string country;

int main()
{

cout<<"enter a country extention:"<<"\n";
cin>>country;

if(country=="ad")          // these are all the adderess type things i could find
cout<<"Andorra";
else if (country=="ae")
cout<<"United Arab Emirates";
else if (country=="af")
cout<<"Afghanistan";
else if (country=="ag")
cout<<"Antigua and Barbuda";
else if (country=="ai")
cout<<"Anguilla";
else if (country=="al")
cout<<"Albania";
else if (country=="am")
cout<<"Armenia";
else if (country=="an")
cout<<"Netherlands Antilles";
else if (country=="ao")
cout<<"Angola";
else if (country=="aq")
cout<<"Antarctica";
else if (country=="ar")
cout<<"Argentina";
else if (country=="arpa")
cout<<"Old style Arpanet";
else if (country=="as")
cout<<"American Samoa";
else if (country=="at")
cout<<"Austria";
else if (country=="au")
cout<<"Australia";
else if (country=="aw")
cout<<"Aruba";
else if (country=="az")
cout<<"Azerbaidjan";
else if (country=="ba")
cout<<"Bosnia-Herzegovina";
else if (country=="bb")
cout<<"Barbados";
else if (country=="bd")
cout<<"Bangladesh";
else if (country=="be")
cout<<"Belgium";
else if (country=="bf")
cout<<"Burkina Faso";
else if (country=="bg")
cout<<"Bulgaria";
else if (country=="bh")
cout<<"Bahrain";
else if (country=="bi")
cout<<"Burundi";
else if (country=="bj")
cout<<"Benin";
else if (country=="bm")
cout<<"Bermuda";
else if (country=="bn")
cout<<"Brunei Darussalam";
else if (country=="bo")
cout<<"Bolivia";
else if (country=="br")
cout<<"Brazil";
else if (country=="bs")
cout<<"Bahamas";
else if (country=="bt")
cout<<"Bhutan";
else if (country=="bv")
cout<<"Bouvet Island";
else if (country=="bw")
cout<<"Botswana";
else if (country=="by")
cout<<"Belarus";
else if (country=="bz")
cout<<"Belize";
else if (country=="ca")
cout<<"Canada";
else if (country=="cc")
cout<<"Cocos (Keeling) Islands";
else if (country=="cf")
cout<<"Central African Republic";
else if (country=="cg")
cout<<"Congo";
else if (country=="ch")
cout<<"Switzerland";
else if (country=="ci")
cout<<"Ivory Coast (Cote D'Ivoire)";
else if (country=="ck")
cout<<"Cook Islands";
else if (country=="cl")
cout<<"Chile";
else if (country=="cm")
cout<<"Cameroon";
else if (country=="cn")
cout<<"China";
else if (country=="co")
cout<<"Colombia";
else if (country=="com")
cout<<"Commercial";
else if (country=="cr")
cout<<"Costa Rica";
else if (country=="cs")
cout<<"Former Czechoslovakia";
else if (country=="cu")
cout<<"Cuba";
else if (country=="cv")
cout<<"Cape Verde";
else if (country=="cx")
cout<<"Christmas Island";
else if (country=="cy")
cout<<"Cyprus";
else if (country=="cz")
cout<<"Czech Republic";
else if (country=="de")
cout<<"Germany";
else if (country=="dj")
cout<<"Djibouti";
else if (country=="dk")
cout<<"Denmark";
else if (country=="dm")
cout<<"Dominica";
else if (country=="do")
cout<<"Dominican Republic";
else if (country=="dz")
cout<<"Algeria";
else if (country=="ec")
cout<<"Ecuador";
else if (country=="edu")
cout<<"Educational";
else if (country=="ee")
cout<<"Estonia";
else if (country=="eg")
cout<<"Egypt";
else if (country=="eh")
cout<<"Western Sahara";
else if (country=="es")
cout<<"Spain";
else if (country=="et")
cout<<"Ethiopia";
else if (country=="fi")
cout<<"Finland";
else if (country=="fj")
cout<<"Fiji";
else if (country=="fk")
cout<<"Falkland Islands";
else if (country=="fm")
cout<<"Micronesia";
else if (country=="fo")
cout<<"Faroe Islands";
else if (country=="fr")
cout<<"France";
else if (country=="fx")
cout<<"France (European Territory)";
else if (country=="ga")
cout<<"Gabon";
else if (country=="gb")
cout<<"Great Britain";
else if (country=="gd")
cout<<"Grenada";
else if (country=="ge")
cout<<"Georgia";
else if (country=="gf")
cout<<"French Guyana";
else if (country=="gh")
cout<<"Ghana";
else if (country=="gi")
cout<<"Gibraltar";
else if (country=="gl")
cout<<"Greenland";
else if (country=="gm")
cout<<"Gambia";
else if (country=="gn")
cout<<"Guinea";
else if (country=="gov")
cout<<"USA Government";
else if (country=="gp")
cout<<"Guadeloupe (French)";
else if (country=="gq")
cout<<"Equatorial Guinea";
else if (country=="gr")
cout<<"Greece";
else if (country=="gs")
cout<<"S. Georgia & S. Sandwich Isls.";
else if (country=="gt")
cout<<"Guatemala";
else if (country=="gu")
cout<<"Guam (USA)";
else if (country=="gw")
cout<<"Guinea Bissau";
else if (country=="gy")
cout<<"Guyana";
else if (country=="hk")
cout<<"Hong Kong";
else if (country=="hm")
cout<<"Heard and McDonald Islands";
else if (country=="hn")
cout<<"Honduras";
else if (country=="hr")
cout<<"Croatia";
else if (country=="ht")
cout<<"Haiti";
else if (country=="hu")
cout<<"Hungary";
else if (country=="id")
cout<<"Indonesia";
else if (country=="ie")
cout<<"Ireland";
else if (country=="il")
cout<<"Israel";
else if (country=="in")
cout<<"India";
else if (country=="int")
cout<<"International";
else if (country=="io")
cout<<"British Indian Ocean Territory";
else if (country=="iq")
cout<<"Iraq";
else if (country=="ir")
cout<<"Iran";
else if (country=="is")
cout<<"Iceland";
else if (country=="it")
cout<<"Italy";
else if (country=="jm")
cout<<"Jamaica";
else if (country=="jo")
cout<<"Jordan";
else if (country=="jp")
cout<<"Japan";
else if (country=="ke")
cout<<"Kenya";
else if (country=="kg")
cout<<"Kyrgyzstan";
else if (country=="kh")
cout<<"Cambodia";
else if (country=="ki")
cout<<"Kiribati";
else if (country=="km")
cout<<"Comoros";
else if (country=="kn")
cout<<"Saint Kitts & Nevis Anguilla";
else if (country=="kp")
cout<<"North Korea";
else if (country=="kr")
cout<<"South Korea";
else if (country=="kw")
cout<<"Kuwait";
else if (country=="ky")
cout<<"Cayman Islands";
else if (country=="kz")
cout<<"Kazakhstan";
else if (country=="ky")
cout<<"Cayman Islands";
else if (country=="la")
cout<<"Laos";
else if (country=="lb")
cout<<"Lebanon";
else if (country=="lc")
cout<<"Saint Lucia";
else if (country=="li")
cout<<"Liechtenstein";
else if (country=="lk")
cout<<"Sri Lanka";
else if (country=="lr")
cout<<"Liberia";
else if (country=="ls")
cout<<"Lesotho";
else if (country=="lt")
cout<<"Lithuania";
else if (country=="lu")
cout<<"Luxembourg";
else if (country=="lv")
cout<<"Latvia";
else if (country=="ly")
cout<<"Libya";
else if (country=="ma")
cout<<"Morocco";
else if (country=="mc")
cout<<"Monaco";
else if (country=="md")
cout<<"Moldavia";
else if (country=="mg")
cout<<"Madagascar";
else if (country=="mh")
cout<<"Marshall Islands";
else if (country=="mil")
cout<<"USA Military";
else if (country=="mk")
cout<<"Macedonia";
else if (country=="ml")
cout<<"Mali";
else if (country=="mm")
cout<<"Myanmar";
else if (country=="mn")
cout<<"Mongolia";
else if (country=="mo")
cout<<"Macau";
else if (country=="mp")
cout<<"Northern Mariana Islands";
else if (country=="mq")
cout<<"Martinique (French)";
else if (country=="mr")
cout<<"Mauritania";
else if (country=="ms")
cout<<"Montserrat";
else if (country=="mt")
cout<<"Malta";
else if (country=="mu")
cout<<"Mauritius";
else if (country=="mv")
cout<<"Maldives";
else if (country=="mw")
cout<<"Malawi";
else if (country=="mx")
cout<<"Mexico";
else if (country=="my")
cout<<"Malaysia";
else if (country=="mz")
cout<<"Mozambique";
else if (country=="na")
cout<<"Namibia";
else if (country=="nato")
cout<<"NATO (purged in '96-see hq.nato.int)";
else if (country=="nc")
cout<<"New Caledonia (French)";
else if (country=="ne")
cout<<"Niger";
else if (country=="net")
cout<<"Network";
else if (country=="nf")
cout<<"Norfolk Island";
else if (country=="ng")
cout<<"Nigeria";
else if (country=="ni")
cout<<"Nicaragua";
else if (country=="nl")
cout<<"Netherlands";
else if (country=="no")
cout<<"Norway";
else if (country=="np")
cout<<"Nepal";
else if (country=="nr")
cout<<"Nauru";
else if (country=="nt")
cout<<"Neutral Zone";
else if (country=="nu")
cout<<"Niue";
else if (country=="nz")
cout<<"New Zealand";
else if (country=="om")
cout<<"Oman";
else if (country=="org")
cout<<"Non-Profit Organisations";
else if (country=="pa")
cout<<"Panama";
else if (country=="pe")
cout<<"Peru";
else if (country=="pf")
cout<<"Polynesia (French)";
else if (country=="pg")
cout<<"Papua New Guinea";
else if (country=="ph")
cout<<"Philippines";
else if (country=="pk")
cout<<"Pakistan";
else if (country=="pl")
cout<<"Poland";
else if (country=="pm")
cout<<"Saint Pierre and Miquelon";
else if (country=="pn")
cout<<"Pitcairn Island";
else if (country=="pr")
cout<<"Puerto Rico";
else if (country=="pt")
cout<<"Portugal";
else if (country=="pw")
cout<<"Palau";
else if (country=="py")
cout<<"Paraguay";
else if (country=="qa")
cout<<"Qatar";
else if (country=="re")
cout<<"Reunion (French)";
else if (country=="ro")
cout<<"Romania";
else if (country=="ru")
cout<<"Russian Federation";
else if (country=="rw")
cout<<"Rwanda";
else if (country=="sa")
cout<<"Saudi Arabia";
else if (country=="sb")
cout<<"Solomon Islands";
else if (country=="sc")
cout<<"Seychelles";
else if (country=="sd")
cout<<"Sudan";
else if (country=="se")
cout<<"Sweden";
else if (country=="sg")
cout<<"Singapore";
else if (country=="sh")
cout<<"Saint Helena";
else if (country=="si")
cout<<"Slovenia";
else if (country=="sj")
cout<<"Svalbard and Jan Mayen Islands";
else if (country=="sk")
cout<<"Slovak Republic";
else if (country=="sl")
cout<<"Sierra Leone";
else if (country=="sm")
cout<<"San Marino";
else if (country=="sn")
cout<<"Senegal";
else if (country=="so")
cout<<"Somalia";
else if (country=="sr")
cout<<"Suriname";
else if (country=="st")
cout<<"Saint Tome (Sao Tome) and Principe";
else if (country=="su")
cout<<"Former USSR";
else if (country=="sv")
cout<<"El Salvador";
else if (country=="sy")
cout<<"Syria";
else if (country=="sz")
cout<<"Swaziland";
else if (country=="tc")
cout<<"Turks and Caicos Islands";
else if (country=="td")
cout<<"Chad";
else if (country=="tf")
cout<<"French Southern Territories";
else if (country=="tg")
cout<<"Togo";
else if (country=="th")
cout<<"Thailand";
else if (country=="tj")
cout<<"Tadjikistan";
else if (country=="tk")
cout<<"Tokelau";
else if (country=="tm")
cout<<"Turkmenistan";
else if (country=="tn")
cout<<"Tunisia";
else if (country=="tn")
cout<<"Tunisia";
else if (country=="to")
cout<<"Tonga";
else if (country=="tp")
cout<<"East Timor";
else if (country=="tr")
cout<<"Turkey";
else if (country=="tt")
cout<<"Trinidad and Tobago";
else if (country=="tv")
cout<<"Tuvalu";
else if (country=="tw")
cout<<"Taiwan";
else if (country=="tz")
cout<<"Tanzania";
else if (country=="ua")
cout<<"Ukraine";
else if (country=="ug")
cout<<"Uganda";
else if (country=="uk")
cout<<"United Kingdom";
else if (country=="um")
cout<<"USA Minor Outlying Islands";
else if (country=="us")
cout<<"United States";
else if (country=="uy")
cout<<"Uruguay";
else if (country=="uz")
cout<<"Uzbekistan";
else if (country=="va")
cout<<"Vatican City State";
else if (country=="vc")
cout<<"Saint Vincent & Grenadines";
else if (country=="ve")
cout<<"Venezuela";
else if (country=="vg")
cout<<"Virgin Islands (British)";
else if (country=="vi")
cout<<"Virgin Islands (USA)";
else if (country=="vn")
cout<<"Vietnam";
else if (country=="vu")
cout<<"Vanuatu";
else if (country=="wf")
cout<<"Wallis and Futuna Islands";
else if (country=="ws")
cout<<"Samoa";
else if (country=="ye")
cout<<"Yemen";
else if (country=="yt")
cout<<"Mayotte";
else if (country=="yu")
cout<<"Yugoslavia";
else if (country=="za")
cout<<"South Africa";
else if (country=="zm")
cout<<"Zambia";
else if (country=="zr")
cout<<"Zaire";
else if (country=="zw")
cout<<"Zimbabwe";
else if (country=="end")
system("exit");

else
cout<<"unknown or invalid country";  //an error message
cout<<"\n\n";

if (country !="end") // recursive part that starts main over again
main();               // if the country value is not "end"



return 0;


}


well thats the code i have so far i am planning on building it into a windows program instead of the console eventually, but not today my wrists hurt from all the typin :lol:

Dragon - July 5, 2003 02:11 AM (GMT)
Why don't you use a switch statement instead of all those ifs? Just a suggestion, it will make your life much easier (at least when you're making that). :)

ih8censorship - July 5, 2003 03:31 AM (GMT)
i was gonna do that but since my variable stated out with char[6] it wouldent work right.. i imagine i will eventually add a switch statement.

dr voodoo - July 5, 2003 07:23 PM (GMT)
QUOTE
i was gonna do that but since my variable stated out with char[6] it wouldent work right..

As far as I know the switch statement compaires values and not arrays (a string/word is an array) and since you probably entered the whole array and not just a member of it you get an error. If you would enter a member of it you would compaire single charachters but not whole strings.

In other words a switch statement doesn't work for strings.

ih8censorship - July 5, 2003 10:48 PM (GMT)
ok so that could be a reason it dident work with a char variable

Stuy GM - July 26, 2003 02:30 PM (GMT)
woah :o thats alot of code ;) i couldnt even come close to that amount <_<

ih8censorship - July 31, 2003 12:56 AM (GMT)
can anyone find a list of the ranges of where different ip adderesses are from for me? i knowthe range of numbers the numbers have to do with the geographic location of a computer/isp

ih8censorship - September 15, 2003 10:36 PM (GMT)
well i found a list of where different ranges of ips were from, and i made up some code to try to see if a given ip is within a certain range, therefore seeing about where it is (well the general continent anyway :lol: ) anyway i need people to test this on their ip adderesses and tell me if it comes close to where they are located. when i figure out how, i will refine this further by allowing for a whois to find the specific isp, and info about that isp. but ill probley need to learn more about winsock to do that. anyway heres a function with the code i want people to test their ips and other known ips to test if it is in the right zone.
CODE
int ip1,ip2,ip3,ip4;

void ipfind()
{
cout<<"enter an IP adderess in 4 parts:";
cin>>ip1;
cin>>ip2;
cin>>ip3;
cin>>ip4;


//LAN reserved adderesses
if(ip1==10 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "local area network.","Finished IP Search",MB_OK);
else if(ip1==172 && ip2 > 15 && ip2 < 132&& ip3<=255 && ip4<=255 )
MessageBox (NULL, "local area network.","Finished IP Search",MB_OK);//got logic help at cpplc
else if(ip1==192 && ip2==168&& ip3<=255 && ip4<=255 )
MessageBox (NULL, "local area network.","Finished IP Search",MB_OK);

//north and south america caribbiean sub sahara africa
else if(ip1==63 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1==64 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1==196 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1==198 xor ip1==199 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1==200 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1<208 && ip1>203  && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1==208 xor ip1==209 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);
else if(ip1==216 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North America, South America,\n the Caribbean and sub-Saharan Africa","Finished IP Search",MB_OK);


//Asia Pacific, from Afghanistan , to Pitcairn in  Pacific
else if(ip1==24 && ip2<196 && ip2>191 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "Asia Pacific, from Afghanistan in\n the Middle East, to Pitcairn in the Pacific Ocean","Finished IP Search",MB_OK);
else if(ip1==169 && ip2<224 && ip2>207 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "Asia Pacific, from Afghanistan in\n the Middle East, to Pitcairn in the Pacific Ocean","Finished IP Search",MB_OK);
else if(ip1==161 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "Asia Pacific, from Afghanistan in\n the Middle East, to Pitcairn in the Pacific Ocean","Finished IP Search",MB_OK);
else if(ip1<204 && ip1>201 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "Asia Pacific, from Afghanistan in\n the Middle East, to Pitcairn in the Pacific Ocean","Finished IP Search",MB_OK);
else if(ip1<212 && ip1>209 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "Asia Pacific, from Afghanistan in\n the Middle East, to Pitcairn in the Pacific Ocean","Finished IP Search",MB_OK);
else if(ip1==218 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "Asia Pacific, from Afghanistan in\n the Middle East, to Pitcairn in the Pacific Ocean","Finished IP Search",MB_OK);


//now for RIPE net... whatever that is
else if(ip1==24 && ip2<136 && ip2>131 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==62 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==139 && ip2<30 && ip2>19 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==141 && ip2<=85 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==145 && ip2<255 && ip2>223 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==149 && ip2<205 && ip2>201 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==149 && ip2<252 && ip2>205 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==150 && ip2==254 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==151 && ip2<82 && ip2>12 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==151 && ip2<6 && ip2>2 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==151 && ip2<6 && ip2>2 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==151 && ip2==82 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==151 && ip2<94 && ip2>90 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==151 && ip2==95 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==160 && ip2<221 && ip2>215 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==160 && ip2<64 && ip2>43 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==163 && ip2<176 && ip2>155 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==164 && ip2<41 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==164 && ip2<144 && ip2>127 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==171 && ip2<34 && ip2>15 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==192 && ip2==106 && ip3<198 && ip3>195 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==192 && ip2==162 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==192 && ip2<168 && ip2>163 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==192 && ip2==71 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==193 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==194 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==195 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==198 && ip2==17 && ip3==117 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==212 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==213 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);
else if(ip1==217 && ip2<=255 && ip3<=255 && ip4<=255 )
MessageBox (NULL, "North Africa, Russia \n and the Middle East, Eurpoen","Finished IP Search",MB_OK);





system("pause");
}
oh yeah and include iostream and windows.h this code is far from done, i know i could compress it down a bit, but i was trying to keep as exact to the list as i could.




* Hosted for free by InvisionFree