25 May 2017


System: Microsoft Windows 10 Home Edition
CPUs: Intel(R) Celeron(R) CPU N3060 @1.60GHz
64-bit Operating System, x64-based processor
Deps: vs_community__1560150700.1495339730.exe,

Installation of C. Lohmann's proof‐of‐concept 9pc.


See the previous post for the Visual Studio setup.


Try Igor Pavlov's 7-Zip (64-bit x64) for extraction.

Create a new Project directory named 9pc with the 2 .cs files.

Open VS and create a new C# project from the code.

Running code analysis on the solution resulted in the following output.

CA2237: Microsoft.Usage : Add [Serializable] to 'ninepexception' as this type implements ISerializable.

CA1001: Microsoft.Design : Implement IDisposable on 'ninep' because it creates members of the following IDisposable types: 'Socket'.

CS0618: 'Dns.Resolve(string)' is obsolete: 'Resolve is obsoleted for this type, please use GetHostEntry instead. http://go.microsoft.com/fwlink/?linkid=14202'

There were also 41 naming rule violations pertaining to words which must begin with upper case characters.

A partial update to the code (which I haven't applied or tested).


+   [Serializable]
     class ninepexception : Exception
         public ninepexception(string str)
             Console.WriteLine("9P error: {0}", str);

-            iphost = Dns.Resolve(host);
+           iphost = Dns.GetHostEntry(host);
addr = iphost.AddressList;
ep = new IPEndPoint(addr[0], port);

Renaming the 32-bit executable and running it.

sources.cs.bell-labs.com% ls
drwxrwxr-x 9grid 9grid 0 9grid
-rw-rw-r-- bootes sys 0 _sources
drwxrwxr-x adm sys 0 adm
drwxrwxr-x sys sys 0 contrib
drwxrwxr-x bootes sys 0 dist
-rw-rw---- geoff sys 396576 du
drwxrwxr-x sys sys 0 extra
drwxrwx--- fastos fastos 0 fastos
-rw-rw-r-- sys sys 9142602 lsr
drwxrwxr-x geoff nix 0 nix
drwxrwxrwx glenda sys 0 patch
drwxrwxr-x sys sys 0 plan9
drwxrwxr-x sys sys 0 wiki
drwxrwxr-x xen xen 0 xen
sources.cs.bell-labs.com% q


Copes of 9pc's AssemblyInfo.cs and a partially updated Main.cs are in the sidebar.

<noreply-comment@blogger.com> has left a comment for this post, but I do not understand
how a comment can be submitted from such an address, so I am not posting that comment

No comments:

Post a Comment