Shabat Closer

Thursday, February 21, 2013

TECH:postfix mail server: filter email by php script

Howto: create simple scrip using PHP to filter incoming email on POSTFIX MAIL SERVER

read article :  http://www.postfix.org/FILTER_README.html ("Simple content filter example")

for the sample we use /etc/postfix to save the script files.

Step 1: create script file  "/etc/postfix/content-filter.sh"


#!/bin/sh

# Localize these. The -G option does nothing before Postfix 2.3.
INSPECT_DIR=/var/spool/filter
SENDMAIL="/usr/sbin/sendmail -G -i" # NEVER NEVER NEVER use "-t" here.

# Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69

# Clean up when done or when aborting.
trap "rm -f in.$$" 0 1 2 3 15

# Start processing.
cd $INSPECT_DIR || {
 echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }

cat >in.$$ || { 
 echo Cannot save mail to file; exit $EX_TEMPFAIL; }

/./etc/postfix/mail-cleaner.php in.$$
$SENDMAIL "$@" <in.$$

exit $?

Step 2: create php content filter file "/etc/postfix/mail-cleaner.php"



#!/usr/bin/php
<?php
//read mail file.
$file=$argv[1];
$data=file_get_contents($file);

$mail_parts=explode("\n\n",$data);
//Get header
$header=$mail_parts[0];

//Get all mail parts.
$mail_parts[0]="";
$content=implode($mail_parts,"\n\n");

//Remove all email address from  mail content
$content=preg_replace("/[^\s]*@[^@\s]*\.[^@\s]*/", "***@***.***", $content);

//Remove all websites from mail contant
$content=preg_replace("/[a-zA-Z]*[:\/\/]*[A-Za-z0-9\-_]+\.+[A-Za-z0-9\.\/%&=\?\-_]+\.+/i", "www.***.***", $content);

//Save the new email.
file_put_contents($file,$header."\n\n".$content);
?>

Step 3: add configuration to "/etc/postfix/master.cf"

add the following lines to "master.cf"




filter    unix  -       n       n       -       10      pipe
    flags=Rq user=filter null_sender=
    argv=/etc/postfix/content-filter.sh -f ${sender} -- ${recipient}









add option "-o content_filter=filter:dummy" to smtp service 


smtp      inet  n       -       -       -       -       smtpd
 -o content_filter=filter:dummy







Step 4: Create user "filter" and add premissions 
simple run commands :


# (for centOS 6) create new user without home directory
useradd -M filter 

#add execute permissions to script files
chmod +rx /etc/postfix/content-filter.sh   
chmod +rx /etc/postfix/mail-cleaner.php

#create directory filter
mkdir /var/spool/filter

#change owner and group to filter
chown filter /var/spool/filter
chgrp filter /var/spool/filter

Step 5: (*) Disable SELinux security
to running the scripts we must to trun off the selinux security
http://www.crypt.gen.nz/selinux/disable_selinux.html

change the in file "/etc/selinux/config"

from :

SELINUX=enforcing

to:
SELINUX=disabled

Step 6: Reboot.

enjoy!

Attention :
(*) if you don't disable the  SELinux you will see in the maillog file ("/var/log/maillog")
the errors:
Sep 9 18:50:22 localhost postfix/pipe[2960]: 9F2349ABB01: to=<em...@domain.com>, relay=postfixfilter, delay=7441, delays=7441/0.08/0/0.65, dsn=4.3.0, status=deferred (temporary failure. Command output: pipe: fatal: pipe_command: execvp /etc/postfix/content-filter.sh: Permission denied )




Monday, February 11, 2013

Mysql: encode / decode IP to HEX

MYSQL Function to encode IP to HEX

CREATE  FUNCTION `ip_encode`(`ip` VARCHAR(25)) RETURNS char(8) CHARSET utf8
    NO SQL
return concat(
conv(SUBSTRING_INDEX( ip , '.', 1 ),10,16 ) ,
conv(SUBSTRING_INDEX(SUBSTRING_INDEX( ip , '.', 2 ),'.',-1) ,10,16),
conv(SUBSTRING_INDEX(SUBSTRING_INDEX( ip , '.', -2 ),'.',1) ,10,16),
conv(SUBSTRING_INDEX( ip , '.', -1 ),10,16 )


MYSQL Function to decode ip (HEX to IP)


CREATE FUNCTION `ip_decode`(`session_ip` VARCHAR(25)) RETURNS char(50) CHARSET utf8
    DETERMINISTIC
RETURN concat_ws('.',
CONV(substr(session_ip,1,2),16,10),
CONV(substr(session_ip,3,2),16,10),
CONV(substr(session_ip,5,2),16,10),
CONV(substr(session_ip,7,2),16,10),
CONV(substr(session_ip,9,2),16,10))

Sunday, February 10, 2013

PHP: filezilla ftp server - auto create user

html + php script to create new user in filezilla ftp server


<?php
define("FTP_CONF_FILE",'C:/Program Files/FileZilla Server/FileZilla Server.xml');
define("FTP_EXE_FILE","C:\\Program Files\\FileZilla Server\\FileZilla server.exe");

function create_user($user_name,$password,$ftpUserFolder,$createBackup=true,$reloadFTP=true){ 
 $xmlfile = FTP_CONF_FILE;
 $xmlfolder=dirname($xmlfilename);
 
 $xmlbackupfile = $xmlfolder . @date("Y-m-d-H-i-s") . '_FileZilla_Server.xml';
 
 $xml = simplexml_load_file($xmlfile);
 // Copy Config for backup before each change, too.
 

 $isvalid = isUserID($user_name);
 if (!$isvalid){
  echo  "Username $user_name is invalid\n";
  return false;
 }
 
 
 if(check_user_exists($xml,$user_name)){
  echo "Username $user_name already exists...\n";
  return false;
 }
 if ($createBackup){
  if (!copy($xmlfile,$xmlbackupfile)){
   echo "Problem creating xml backup file";
   return false;
  }
 }


 $user = $xml->Users->addChild('User');
 $user->addAttribute('Name', $user_name);
 
 add_option($user,'Pass',md5($password));
 add_option($user,'Group',null);
 add_option($user,'Bypass server userlimit','0');
 add_option($user,'User Limit','0');
 add_option($user,'IP Limit','0');
 add_option($user,'Enabled','1');
 add_option($user,'Comments','none');
 add_option($user,'ForceSsl','0');

 $filter = $user->addChild('IpFilter');
 $filter->addChild('Disallowed');
 $filter->addChild('Allowed');

 $permissions = $user->addChild('Permissions');
 $permission = $permissions->addChild('Permission');

 $permission->addAttribute('Dir', str_replace("/","\\",$ftpUserFolder));

 add_option($permission,'FileRead','1');
 add_option($permission,'FileWrite','1');
 add_option($permission,'FileDelete','1');
 add_option($permission,'FileAppend','1');
 add_option($permission,'DirCreate','1');
 add_option($permission,'DirDelete','1');
 add_option($permission,'DirList','1');
 add_option($permission,'DirSubdirs','1');
 add_option($permission,'IsHome','1');
 add_option($permission,'AutoCreate','1');

 $speed = $user->addChild('SpeedLimits');
 $speed->addAttribute('DlType', '1');
 $speed->addAttribute('DlLimit', '10');
 $speed->addAttribute('ServerDlLimitBypass', '0');
 $speed->addAttribute('UlType', '1');
 $speed->addAttribute('UlLimit', '10');
 $speed->addAttribute('ServerUlLimitBypass', '0');
 $speed->addChild('Download');
 $speed->addChild('Upload');

 if(!$rv = $xml->asXML($xmlfile)){
  echo ('SimpleXML could not write file');
  return false;
 }


 //Change file encoding from UTF8 to ISO-8859-1
 $dom = new DOMDocument("1.0","ISO-8859-1");
 $dom->preserveWhiteSpace = false;
 $dom->formatOutput = true;
 if(!$dom->load($xmlfile) || !$dom->save($xmlfile)){
  echo ('DOMDocument could not change file enconding from UTF8 to ISO-8859-1');
  return false;
 }
 
 
 if ($reloadFTP){
  $ftpExecutable = '"'.FTP_EXE_FILE.'" /reload-config';
  $command = $ftpExecutable;
  system($command, $retval);
 }
 
 return true;
 
}
function isUserID($username){return preg_match('/^[A-Za-z0-9][A-Za-z0-9]*(?:_[A-Za-z0-9]+)*$/', $username);}
function isValid($str){return !preg_match('/[^A-Za-z0-9\_\-]/', $str);}
function add_option($xmlobj,$name,$value){
 $option = $xmlobj->addChild('Option', $value);
 $option->addAttribute('Name', $name);
}

function check_user_exists($xml,$username){
 $children=$xml->Users->children();
 foreach($children as $child){
  if ($child->getName()=='User'){
   foreach($child->attributes() as $attributes ){
    if(trim($attributes) == trim($username)){
     echo "Username $username already exits... \n";
     return true;
    }
   }
  }
 }
 return false;
}







if ($_POST){
 create_user($_POST["user_name"],$_POST["password"],$_POST["ftp_folder"]);
}

?><html><body>
Create FTP User in filzilla server.<br/><br/><form method="POST">
 <table>
  <tr>
   <td>User name : </td>
   <td><input typr="text" name="user_name"/></td>
  </tr>
  <tr>
   <td>Password : </td>
   <td><input typr="text" name="password" /></td>
  </tr>
  <tr>
   <td>FTP root folder : </td>
   <td><input typr="text" name="ftp_folder" /></td>
  </tr>
 </table>
 <input type="submit"></form></body></html>

Enjoy!

Friday, February 8, 2013

TECH: windows 7 SP1 multi rdp session(x86/x64)


windows 7 with SP1 multi rdp session (32/64bit)


download the file :
https://docs.google.com/file/d/0BxpqhwvDEFKvaVBwVUpSUERhMjQ/edit?usp=sharing

extract files and run the file Install.cmd("run as administrator")

enjoy!

C#: extract all domains from text

simple function to find all domain in text:

using : System.Text.RegularExpressions (regex)

public void get_all_domains(string text) {
const string MatchEmailPattern =
@"((http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])?)";
Regex rx = new Regex(MatchEmailPattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
// Find matches.
MatchCollection matches = rx.Matches(text);
// Report the number of matches found.
int noOfMatches = matches.Count;
// Report on each match.
foreach (Match match in matches) {
string dst_domain=match.Value.ToString();
if (dst_domain == "")
continue;
      //do something with  dst_domain like :
      //DB.Insert(dst_domain);
}
} 

C#: extract all emails from text

simple function to find all email in text.
using :
System.Text.RegularExpression(regex)

public void get_emails(string text) {
const string MatchEmailPattern = @"(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@" +
@"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\."+
@"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|"+
@"([a-zA-Z]+[\w-]+\.)+[a-zA-Z]{2,4})";
Regex rx = new Regex(MatchEmailPattern,RegexOptions.Compiled | RegexOptions.IgnoreCase);
// Find matches.MatchCollection matches = rx.Matches(text);
// Report the number of matches found.int noOfMatches = matches.Count;// Report on each match.
foreach (Match match in matches) {
string email = match.Value.ToString();if (email == "")
continue;
    //do somthing with email variable like.
    //db.insert(email);
}
}

usage:
get_emails("<a href='my@emsil.com'>email2@domain.com</a>");
//found : my@emsil.com , email2@domain.com

Thursday, February 7, 2013

TECH: owa 2007/2010 auto login script (JS)

simple javascript(JS) script to make auto login "outlook web access"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<form action="http://owa.domain.com/auth/owaauth.dll" method="POST"
       name="logonForm" ENCTYPE="application/x-www-form-urlencoded" id="logonFormId">
<input type="hidden" name="destination" value="http://owa.domain.com/">
<input type="hidden" name="flags" value="0">
<input type="hidden" name="forcedownlevel" value="0">
<input id="rdoPrvt" type="radio" name="trusted" value="0" class="rdo" checked><br>
<input id="username" name="username" type="text" value="username@domain.com" ><br>
<input id="password" name="password" type="password" value="userpassword">
<input name="isUtf8" type="hidden" value="1">
<script language="JavaScript">

//Autosubmit the form. Yeah.

document.getElementById('logonFormId').submit();
</script>
</form>
</body>

</html>



Enjoy!

Wednesday, February 6, 2013

TECH : shortcut to lock computer


How to Quickly Lock Your Computer
 
create a new windows shortcut :
location: C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation

MYSQL : Countries list for mysql

Countries list for mysql

SQL format:


CREATE TABLE IF NOT EXISTS `world_countries` (
  `country_id` int(5) NOT NULL AUTO_INCREMENT,
  `iso2` char(2) DEFAULT NULL,
  `short_name` varchar(80) NOT NULL DEFAULT '',
  `long_name` varchar(80) NOT NULL DEFAULT '',
  `iso3` char(3) DEFAULT NULL,
  `numcode` smallint(6) DEFAULT NULL,
  `un_member` varchar(12) DEFAULT NULL,
  `calling_code` varchar(8) DEFAULT NULL,
  `continent_code` char(2) NOT NULL,
  PRIMARY KEY (`country_id`),
  KEY `iso2` (`iso2`),
  KEY `iso3` (`iso3`),
  KEY `short_name` (`short_name`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=242 ;
--
-- Dumping data for table `world_countries`
--
INSERT INTO `world_countries` (`country_id`, `iso2`, `short_name`, `long_name`, `iso3`, `numcode`, `un_member`, `calling_code`, `continent_code`) VALUES
(6, 'AD', 'Andorra', 'Principality of Andorra', 'AND', 20, 'yes', '376', 'EU'),
(11, 'AR', 'Argentina', 'Argentine Republic', 'ARG', 32, 'yes', '54', 'SA'),
(12, 'AM', 'Armenia', 'Republic of Armenia', 'ARM', 51, 'yes', '374', 'AS'),
(14, 'AU', 'Australia', 'Commonwealth of Australia', 'AUS', 36, 'yes', '61', 'OC'),
(15, 'AT', 'Austria', 'Republic of Austria', 'AUT', 40, 'yes', '43', 'EU'),
(16, 'AZ', 'Azerbaijan', 'Republic of Azerbaijan', 'AZE', 31, 'yes', '994', 'AS'),
(18, 'BH', 'Bahrain', 'Kingdom of Bahrain', 'BHR', 48, 'yes', '973', 'AS'),
(20, 'BB', 'Barbados', 'Barbados', 'BRB', 52, 'yes', '1+246', 'NA'),
(21, 'BY', 'Belarus', 'Republic of Belarus', 'BLR', 112, 'yes', '375', 'EU'),
(22, 'BE', 'Belgium', 'Kingdom of Belgium', 'BEL', 56, 'yes', '32', 'EU'),
(28, 'BA', 'Bosnia and Herzegovina', 'Bosnia and Herzegovina', 'BIH', 70, 'yes', '387', 'EU'),
(31, 'BR', 'Brazil', 'Federative Republic of Brazil', 'BRA', 76, 'yes', '55', 'SA'),
(34, 'BG', 'Bulgaria', 'Republic of Bulgaria', 'BGR', 100, 'yes', '359', 'EU'),
(37, 'KH', 'Cambodia', 'Kingdom of Cambodia', 'KHM', 116, 'yes', '855', 'AS'),
(39, 'CA', 'Canada', 'Canada', 'CAN', 124, 'yes', '1', 'NA'),
(44, 'CL', 'Chile', 'Republic of Chile', 'CHL', 152, 'yes', '56', 'SA'),
(45, 'CN', 'China', 'People''s Republic of China', 'CHN', 156, 'yes', '86', 'AS'),
(48, 'CO', 'Colombia', 'Republic of Colombia', 'COL', 170, 'yes', '57', 'SA'),
(52, 'CR', 'Costa Rica', 'Republic of Costa Rica', 'CRI', 188, 'yes', '506', 'NA'),
(54, 'HR', 'Croatia', 'Republic of Croatia', 'HRV', 191, 'yes', '385', 'EU'),
(56, 'CY', 'Cyprus', 'Republic of Cyprus', 'CYP', 196, 'yes', '357', 'AS'),
(57, 'CZ', 'Czech Republic', 'Czech Republic', 'CZE', 203, 'yes', '420', 'EU'),
(59, 'DK', 'Denmark', 'Kingdom of Denmark', 'DNK', 208, 'yes', '45', 'EU'),
(63, 'EC', 'Ecuador', 'Republic of Ecuador', 'ECU', 218, 'yes', '593', 'SA'),
(64, 'EG', 'Egypt', 'Arab Republic of Egypt', 'EGY', 818, 'yes', '20', 'AF'),
(65, 'SV', 'El Salvador', 'Republic of El Salvador', 'SLV', 222, 'yes', '503', 'NA'),
(68, 'EE', 'Estonia', 'Republic of Estonia', 'EST', 233, 'yes', '372', 'EU'),
(70, 'FK', 'Falkland Islands (Malvinas)', 'The Falkland Islands (Malvinas)', 'FLK', 238, 'no', '500', 'SA'),
(73, 'FI', 'Finland', 'Republic of Finland', 'FIN', 246, 'yes', '358', 'EU'),
(74, 'FR', 'France', 'French Republic', 'FRA', 250, 'yes', '33', 'EU'),
(80, 'GE', 'Georgia', 'Georgia', 'GEO', 268, 'yes', '995', 'AS'),
(81, 'DE', 'Germany', 'Federal Republic of Germany', 'DEU', 276, 'yes', '49', 'EU'),
(83, 'GI', 'Gibraltar', 'Gibraltar', 'GIB', 292, 'no', '350', 'EU'),
(84, 'GR', 'Greece', 'Hellenic Republic', 'GRC', 300, 'yes', '30', 'EU'),
(85, 'GL', 'Greenland', 'Greenland', 'GRL', 304, 'no', '299', 'NA'),
(86, 'GD', 'Grenada', 'Grenada', 'GRD', 308, 'yes', '1473', 'NA'),
(95, 'HN', 'Honduras', 'Republic of Honduras', 'HND', 340, 'yes', '504', 'NA'),
(96, 'HK', 'Hong Kong', 'Hong Kong', 'HKG', 344, 'no', '852', 'AS'),
(97, 'HU', 'Hungary', 'Republic of Hungary', 'HUN', 348, 'yes', '36', 'EU'),
(98, 'IS', 'Iceland', 'Republic of Iceland', 'ISL', 352, 'yes', '354', 'EU'),
(99, 'IN', 'India', 'Republic of India', 'IND', 356, 'yes', '91', 'AS'),
(100, 'ID', 'Indonesia', 'Republic of Indonesia', 'IDN', 360, 'yes', '62', 'AS'),
(103, 'IE', 'Ireland', 'Ireland', 'IRL', 372, 'yes', '353', 'EU'),
(105, 'IL', 'Israel', 'State of Israel', 'ISR', 376, 'yes', '972', 'AS'),
(106, 'IT', 'Italy', 'Italian Republic', 'ITA', 380, 'yes', '39', 'EU'),
(108, 'JP', 'Japan', 'Japan', 'JPN', 392, 'yes', '81', 'AS'),
(110, 'JO', 'Jordan', 'Hashemite Kingdom of Jordan', 'JOR', 400, 'yes', '962', 'AS'),
(111, 'KZ', 'Kazakhstan', 'Republic of Kazakhstan', 'KAZ', 398, 'yes', '7', 'AS'),
(114, 'KW', 'Kuwait', 'State of Kuwait', 'KWT', 414, 'yes', '965', 'AS'),
(115, 'KG', 'Kyrgyzstan', 'Kyrgyz Republic', 'KGZ', 417, 'yes', '996', 'AS'),
(117, 'LV', 'Latvia', 'Republic of Latvia', 'LVA', 428, 'yes', '371', 'EU'),
(122, 'LI', 'Liechtenstein', 'Principality of Liechtenstein', 'LIE', 438, 'yes', '423', 'EU'),
(123, 'LT', 'Lithuania', 'Republic of Lithuania', 'LTU', 440, 'yes', '370', 'EU'),
(124, 'LU', 'Luxembourg', 'Grand Duchy of Luxembourg', 'LUX', 442, 'yes', '352', 'EU'),
(125, 'MO', 'Macao', 'The Macao Special Administrative Region', 'MAC', 446, 'no', '853', 'AS'),
(126, 'MK', 'Macedonia', 'The Former Yugoslav Republic of Macedonia', 'MKD', 807, 'yes', '389', 'EU'),
(129, 'MY', 'Malaysia', 'Malaysia', 'MYS', 458, 'yes', '60', 'AS'),
(132, 'MT', 'Malta', 'Republic of Malta', 'MLT', 470, 'yes', '356', 'EU'),
(138, 'MX', 'Mexico', 'United Mexican States', 'MEX', 484, 'yes', '52', 'NA'),
(139, 'MR', 'Mauritania', 'Islamic Republic of Mauritania', 'MRT', 478, 'yes', '222', 'AF'),
(140, 'MD', 'Moldava', 'Republic of Moldova', 'MDA', 498, 'yes', '373', 'EU'),
(141, 'MC', 'Monaco', 'Principality of Monaco', 'MCO', 492, 'yes', '377', 'EU'),
(143, 'ME', 'Montenegro', 'Montenegro', 'MNE', 499, 'yes', '382', 'EU'),
(145, 'MA', 'Morocco', 'Kingdom of Morocco', 'MAR', 504, 'yes', '212', 'AF'),
(151, 'MM', 'Myanmar', 'Republic of the Union of Myanmar', 'MMR', 104, 'yes', '95', 'AS'),
(152, 'NL', 'Netherlands', 'Kingdom of the Netherlands', 'NLD', 528, 'yes', '31', 'EU'),
(154, 'NZ', 'New Zealand', 'New Zealand', 'NZL', 554, 'yes', '64', 'OC'),
(162, 'NO', 'Norway', 'Kingdom of Norway', 'NOR', 578, 'yes', '47', 'EU'),
(163, 'OM', 'Oman', 'Sultanate of Oman', 'OMN', 512, 'yes', '968', 'AS'),
(167, 'PA', 'Panama', 'Republic of Panama', 'PAN', 591, 'yes', '507', 'NA'),
(171, 'PH', 'Phillipines', 'Republic of the Philippines', 'PHL', 608, 'yes', '63', 'AS'),
(172, 'PE', 'Peru', 'Republic of Peru', 'PER', 604, 'yes', '51', 'SA'),
(173, 'PL', 'Poland', 'Republic of Poland', 'POL', 616, 'yes', '48', 'EU'),
(174, 'PT', 'Portugal', 'Portuguese Republic', 'PRT', 620, 'yes', '351', 'EU'),
(176, 'QA', 'Qatar', 'State of Qatar', 'QAT', 634, 'yes', '974', 'AS'),
(178, 'RO', 'Romania', 'Romania', 'ROU', 642, 'yes', '40', 'EU'),
(179, 'RU', 'Russia', 'Russian Federation', 'RUS', 643, 'yes', '7', 'EU'),
(191, 'SA', 'Saudi Arabia', 'Kingdom of Saudi Arabia', 'SAU', 682, 'yes', '966', 'AS'),
(193, 'RS', 'Serbia', 'Republic of Serbia', 'SRB', 688, 'yes', '381', 'EU'),
(196, 'SG', 'Singapore', 'Republic of Singapore', 'SGP', 702, 'yes', '65', 'AS'),
(197, 'SK', 'Slovakia', 'Slovak Republic', 'SVK', 703, 'yes', '421', 'EU'),
(198, 'SI', 'Slovenia', 'Republic of Slovenia', 'SVN', 705, 'yes', '386', 'EU'),
(201, 'ZA', 'South Africa', 'Republic of South Africa', 'ZAF', 710, 'yes', '27', 'AF'),
(203, 'KR', 'South Korea', 'Republic of Korea', 'KOR', 410, 'yes', '82', 'AS'),
(204, 'ES', 'Spain', 'Kingdom of Spain', 'ESP', 724, 'yes', '34', 'EU'),
(209, 'SZ', 'Swaziland', 'Kingdom of Swaziland', 'SWZ', 748, 'yes', '268', 'AF'),
(210, 'SE', 'Sweden', 'Kingdom of Sweden', 'SWE', 752, 'yes', '46', 'EU'),
(211, 'CH', 'Switzerland', 'Swiss Confederation', 'CHE', 756, 'yes', '41', 'EU'),
(213, 'TW', 'Taiwan', 'Taiwan, Province of China', 'TWN', 158, 'no', '886', 'AS'),
(214, 'TJ', 'Tajikistan', 'Republic of Tajikistan', 'TJK', 762, 'yes', '992', 'AS'),
(216, 'TH', 'Thailand', 'Kingdom of Thailand', 'THA', 764, 'yes', '66', 'AS'),
(222, 'TN', 'Tunisia', 'Republic of Tunisia', 'TUN', 788, 'yes', '216', 'AF'),
(223, 'TR', 'Turkey', 'Republic of Turkey', 'TUR', 792, 'yes', '90', 'AS'),
(224, 'TM', 'Turkmenistan', 'Turkmenistan', 'TKM', 795, 'yes', '993', 'AS'),
(228, 'UA', 'Ukraine', 'Ukraine', 'UKR', 804, 'yes', '380', 'EU'),
(229, 'AE', 'United Arab Emirates', 'United Arab Emirates', 'ARE', 784, 'yes', '971', 'AS'),
(230, 'GB', 'United Kingdom', 'United Kingdom of Great Britain and Nothern Ireland', 'GBR', 826, 'yes', '44', 'EU'),
(232, 'US', 'United States', 'United States of America', 'USA', 840, 'yes', '1', 'NA'),
(233, 'UY', 'Uruguay', 'Eastern Republic of Uruguay', 'URY', 858, 'yes', '598', 'SA'),
(234, 'UZ', 'Uzbekistan', 'Republic of Uzbekistan', 'UZB', 860, 'yes', '998', 'AS'),
(237, 'VE', 'Venezuela', 'Bolivarian Republic of Venezuela', 'VEN', 862, 'yes', '58', 'SA'),
(238, 'VN', 'Vietnam', 'Socialist Republic of Vietnam', 'VNM', 704, 'yes', '84', 'AS'),
(241, 'NG', 'Nigeria', 'Nigeria', 'NGA', NULL, 'yes', '234 ', 'AF');