Friday, April 5, 2019

Can a UNC Network Share be Unicode

Well the answer is partially, but the formal documents say otherwise and are incorrect.

Given a UNC Path is represented as

"\\" host-name "\" share-name  [ "\" object-name ]

host-name must be a NetBIOS computer name according to

https://support.microsoft.com/en-us/help/909264/naming-conventions-in-active-directory-for-computers-domains-sites-and


however, the share-name can be Unicode

An lastly, the object-name can be Unicode and is widely understood.

object-name = *path-name [ "\" file-name ]


Example : \\centos7\Ȧunicode\build

Here's the UNC Path Specification from Microsoft
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/62e862f4-2a51-452e-8eeb-dc4ff5ee33cc


The filespace selector is a null-terminated Unicode character string in the following ABNF syntax:


  •  UNC                = "\\" host-name "\" share-name  [ "\" object-name ]
  •  host-name          = "[" IPv6address "]" / IPv4address / reg-name  
  •     ; IPv6address, IPv4address, and reg-name as specified in [RFC3986] 
  •  share-name         = 1*80pchar
  •  pchar              = %x20-21 / %x23-29 / %x2D-2E / %x30-39 / %x40-5A / %x5E-7B / %x7D-FF  
  •  object-name        = *path-name [ "\" file-name ]
  •  path-name          = 1*255pchar
  •  file-name          = 1*255fchar [ ":" stream-name [ ":" stream-type ] ]
  •  fchar              = %x20-21 / %x23-29 / %x2B-2E / %x30-39 / %x3B / %x3D / %x40-5B / %x5D-7B / %x7D-FF 
  •  stream-name        = *schar
  •  schar              = %x01-2E / %x30-39 / %x3B-5B /%x5D-FF
  •  stream-type        = 1*schar
where Augmented Backus–Naur Form (ABNF) is a metalanguage based on Backus–Naur form (BNF), but consisting of its own syntax and derivation rules.

But 
  •  share-name         = 1*80pchar
pchar is defined as a pointer to a CHAR, which is ANSI

But share-name can be UNICODE therefore; 

  •  share-name         = 1*80pcwstr 
pcwstr (A pointer to a constant null-terminated string of 16-bit Unicode characters)

How to set an Unicode Net Share?

Remember in CMD Window set code page first to 

chcp 65001

which will change the code page to UTF-8. Also, you need to use Lucida console fonts in CMD Window.




Wednesday, March 27, 2019

SPAM Email - PAYMENT OF ONE MILLION British Pounds £1,000, 000.00

For the record, here a recently circulating SPAM email caught by SPAM filters.

From The Coca-Cola National Lottery 
Office Address: 30 Leicester Square London
Leicester Square London, United Kingdom WC2H 7LA 
Tel: +447430573081
Fax: +448447742671
Contact Agent: MRS.ELIZABETH OWEN ON THIS E-MAIL : elizabethowen1@yandex.com
REFERENCE NO: MSW-L/200-26937 
BATCH NO: 2009MARL#L03 
WINNER NO: 5
   
Dear Winner,
We are pleased to inform you that your emails/company address has been selected for a cash prize offer as registered member of Internet E-mail user. You have subsequently won the sum of One Million British Pounds £1,000,000.00 from the Coca-Cola National Lottery international email promotion. 
  
All participants were selected from worldwide websites through our Microsoft computer ballot system drawn from 21,000 names, 3,000 names from each continent (Canada, Asia, Australia, United State, Europe, Middle East, Africa and Oceania, as part of international "e-mail" promotions program, which is conducted annually for prominent ms -word users all over the world, and to encourage the use of internet and alleviate poverty worldwide

As part of our security protocol you are to quote this security code MSW/MAR/XX09, 
REFERENCE NO: MSW-L/200-26937, BATCH NO: 2009MARL#L03 to your claiming agent. 
(Regarding the process to transfer your prize, kindly contact your claim agent immediately with below information:  
Contact Claim Agent: MRS.ELIZABETH OWEN ON THIS E-MAIL : elizabethowen1@yandex.com
 Provide us with your full details for your payment  

Full Name Surname/First: ....... 
                                                                           
Cell phone number: .......
                                                                                     
Address: ..........

City: ..........
                                                                                               
Country Origin: .........
                                                                                           
Occupation: .........
                                                                                                  
Date of Birth: ........
                                                                                               
Gender: ..........
                                                                                                       
Email: .........
                                                                                                   
Endeavor to call or email the agency your full details such as your winning information. 
If you do not contact your claims (AGENT) within 72 hours of this notification, your winning could be revoked. Winners are advised to keep their winning information secret to avoid fraudulent claim (IMPORTANT) pending the transfer/claim by Winner. 
Congratulations once again!!! 
Regards, 
Mrs. Patricia Barry (Announcement) 
---------------------------------------------------------
Mrs. theresa may (PM)
Mr. Evans Cooper [Director].
MRS.MICHAEL BLESSING  ADAMA COCA-COLA REPRESENTATIVE IN GERMANY