Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Commit ce970f3

Browse files
committed
Default CSFtp with dynamic PASV listener port
1 parent 480ba25 commit ce970f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+5262
-0
lines changed

App/AboutForm.cs

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
using System;
2+
using System.Drawing;
3+
using System.Collections;
4+
using System.ComponentModel;
5+
using System.Windows.Forms;
6+
7+
namespace CSFtp
8+
{
9+
/// <summary>
10+
/// Summary description for AboutForm.
11+
/// </summary>
12+
public class AboutForm : System.Windows.Forms.Form
13+
{
14+
private System.Windows.Forms.Button m_buttonCancel;
15+
private System.Windows.Forms.Label label1;
16+
private System.Windows.Forms.Label label2;
17+
private System.Windows.Forms.Label label3;
18+
/// <summary>
19+
/// Required designer variable.
20+
/// </summary>
21+
private System.ComponentModel.Container components = null;
22+
23+
public AboutForm()
24+
{
25+
//
26+
// Required for Windows Form Designer support
27+
//
28+
InitializeComponent();
29+
30+
//
31+
// TODO: Add any constructor code after InitializeComponent call
32+
//
33+
}
34+
35+
/// <summary>
36+
/// Clean up any resources being used.
37+
/// </summary>
38+
protected override void Dispose( bool disposing )
39+
{
40+
if( disposing )
41+
{
42+
if(components != null)
43+
{
44+
components.Dispose();
45+
}
46+
}
47+
base.Dispose( disposing );
48+
}
49+
50+
#region Windows Form Designer generated code
51+
/// <summary>
52+
/// Required method for Designer support - do not modify
53+
/// the contents of this method with the code editor.
54+
/// </summary>
55+
private void InitializeComponent()
56+
{
57+
this.m_buttonCancel = new System.Windows.Forms.Button();
58+
this.label1 = new System.Windows.Forms.Label();
59+
this.label2 = new System.Windows.Forms.Label();
60+
this.label3 = new System.Windows.Forms.Label();
61+
this.SuspendLayout();
62+
//
63+
// m_buttonCancel
64+
//
65+
this.m_buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
66+
this.m_buttonCancel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
67+
this.m_buttonCancel.Location = new System.Drawing.Point(106, 120);
68+
this.m_buttonCancel.Name = "m_buttonCancel";
69+
this.m_buttonCancel.TabIndex = 0;
70+
this.m_buttonCancel.Text = "Cancel";
71+
//
72+
// label1
73+
//
74+
this.label1.Location = new System.Drawing.Point(10, 8);
75+
this.label1.Name = "label1";
76+
this.label1.Size = new System.Drawing.Size(272, 16);
77+
this.label1.TabIndex = 1;
78+
this.label1.Text = "C# FTP Server";
79+
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
80+
//
81+
// label2
82+
//
83+
this.label2.Location = new System.Drawing.Point(10, 40);
84+
this.label2.Name = "label2";
85+
this.label2.Size = new System.Drawing.Size(272, 24);
86+
this.label2.TabIndex = 1;
87+
this.label2.Text = "Author : David McClarnon";
88+
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
89+
//
90+
// label3
91+
//
92+
this.label3.Location = new System.Drawing.Point(10, 80);
93+
this.label3.Name = "label3";
94+
this.label3.Size = new System.Drawing.Size(272, 24);
95+
this.label3.TabIndex = 1;
96+
this.label3.Text = "Email : [email protected]";
97+
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
98+
//
99+
// AboutForm
100+
//
101+
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
102+
this.CancelButton = this.m_buttonCancel;
103+
this.ClientSize = new System.Drawing.Size(292, 152);
104+
this.ControlBox = false;
105+
this.Controls.Add(this.label1);
106+
this.Controls.Add(this.m_buttonCancel);
107+
this.Controls.Add(this.label2);
108+
this.Controls.Add(this.label3);
109+
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
110+
this.Name = "AboutForm";
111+
this.ShowInTaskbar = false;
112+
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
113+
this.Text = "About C# FTP Server";
114+
this.ResumeLayout(false);
115+
116+
}
117+
#endregion
118+
}
119+
}

App/AboutForm.resx

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 1.3
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">1.3</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1">this is my long string</data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
[base64 mime encoded serialized .NET Framework object]
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
[base64 mime encoded string representing a byte array form of the .NET Framework object]
27+
</data>
28+
29+
There are any number of "resheader" rows that contain simple
30+
name/value pairs.
31+
32+
Each data row contains a name, and value. The row also contains a
33+
type or mimetype. Type corresponds to a .NET class that support
34+
text/value conversion through the TypeConverter architecture.
35+
Classes that don't support this are serialized and stored with the
36+
mimetype set.
37+
38+
The mimetype is used forserialized objects, and tells the
39+
ResXResourceReader how to depersist the object. This is currently not
40+
extensible. For a given mimetype the value must be set accordingly:
41+
42+
Note - application/x-microsoft.net.object.binary.base64 is the format
43+
that the ResXResourceWriter will generate, however the reader can
44+
read any of the formats listed below.
45+
46+
mimetype: application/x-microsoft.net.object.binary.base64
47+
value : The object must be serialized with
48+
: System.Serialization.Formatters.Binary.BinaryFormatter
49+
: and then encoded with base64 encoding.
50+
51+
mimetype: application/x-microsoft.net.object.soap.base64
52+
value : The object must be serialized with
53+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
54+
: and then encoded with base64 encoding.
55+
56+
mimetype: application/x-microsoft.net.object.bytearray.base64
57+
value : The object must be serialized into a byte array
58+
: using a System.ComponentModel.TypeConverter
59+
: and then encoded with base64 encoding.
60+
-->
61+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:element name="root" msdata:IsDataSet="true">
63+
<xsd:complexType>
64+
<xsd:choice maxOccurs="unbounded">
65+
<xsd:element name="data">
66+
<xsd:complexType>
67+
<xsd:sequence>
68+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
69+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
70+
</xsd:sequence>
71+
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
72+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
73+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
74+
</xsd:complexType>
75+
</xsd:element>
76+
<xsd:element name="resheader">
77+
<xsd:complexType>
78+
<xsd:sequence>
79+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
80+
</xsd:sequence>
81+
<xsd:attribute name="name" type="xsd:string" use="required" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
</xsd:choice>
85+
</xsd:complexType>
86+
</xsd:element>
87+
</xsd:schema>
88+
<resheader name="resmimetype">
89+
<value>text/microsoft-resx</value>
90+
</resheader>
91+
<resheader name="version">
92+
<value>1.3</value>
93+
</resheader>
94+
<resheader name="reader">
95+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
96+
</resheader>
97+
<resheader name="writer">
98+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
99+
</resheader>
100+
<data name="m_buttonCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
101+
<value>False</value>
102+
</data>
103+
<data name="m_buttonCancel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
104+
<value>Private</value>
105+
</data>
106+
<data name="m_buttonCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
107+
<value>Private</value>
108+
</data>
109+
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
110+
<value>False</value>
111+
</data>
112+
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
113+
<value>Private</value>
114+
</data>
115+
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
116+
<value>Private</value>
117+
</data>
118+
<data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
119+
<value>False</value>
120+
</data>
121+
<data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
122+
<value>Private</value>
123+
</data>
124+
<data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
125+
<value>Private</value>
126+
</data>
127+
<data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
128+
<value>False</value>
129+
</data>
130+
<data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
131+
<value>Private</value>
132+
</data>
133+
<data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
134+
<value>Private</value>
135+
</data>
136+
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
137+
<value>False</value>
138+
</data>
139+
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
140+
<value>(Default)</value>
141+
</data>
142+
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
143+
<value>False</value>
144+
</data>
145+
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
146+
<value>False</value>
147+
</data>
148+
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
149+
<value>8, 8</value>
150+
</data>
151+
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
152+
<value>True</value>
153+
</data>
154+
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
155+
<value>80</value>
156+
</data>
157+
<data name="$this.Name">
158+
<value>AboutForm</value>
159+
</data>
160+
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
161+
<value>True</value>
162+
</data>
163+
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
164+
<value>Private</value>
165+
</data>
166+
</root>

App/App.ico

1.05 KB
Binary file not shown.

App/AssemblyInfo.cs

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
4+
//
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
//
9+
[assembly: AssemblyTitle("C# FTP Server")]
10+
[assembly: AssemblyDescription("FTP Server using C#")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCompany("")]
13+
[assembly: AssemblyProduct("C# FTP Server")]
14+
[assembly: AssemblyCopyright("Copyright (c) David McClarnon 2004")]
15+
[assembly: AssemblyTrademark("")]
16+
[assembly: AssemblyCulture("")]
17+
18+
//
19+
// Version information for an assembly consists of the following four values:
20+
//
21+
// Major Version
22+
// Minor Version
23+
// Build Number
24+
// Revision
25+
//
26+
// You can specify all the values or you can default the Revision and Build Numbers
27+
// by using the '*' as shown below:
28+
29+
[assembly: AssemblyVersion("1.1.0.0")]
30+
31+
//
32+
// In order to sign your assembly you must specify a key to use. Refer to the
33+
// Microsoft .NET Framework documentation for more information on assembly signing.
34+
//
35+
// Use the attributes below to control which key is used for signing.
36+
//
37+
// Notes:
38+
// (*) If no key is specified, the assembly is not signed.
39+
// (*) KeyName refers to a key that has been installed in the Crypto Service
40+
// Provider (CSP) on your machine. KeyFile refers to a file which contains
41+
// a key.
42+
// (*) If the KeyFile and the KeyName values are both specified, the
43+
// following processing occurs:
44+
// (1) If the KeyName can be found in the CSP, that key is used.
45+
// (2) If the KeyName does not exist and the KeyFile does exist, the key
46+
// in the KeyFile is installed into the CSP and used.
47+
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
48+
// When specifying the KeyFile, the location of the KeyFile should be
49+
// relative to the project output directory which is
50+
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
51+
// located in the project directory, you would specify the AssemblyKeyFile
52+
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
53+
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
54+
// documentation for more information on this.
55+
//
56+
[assembly: AssemblyDelaySign(false)]
57+
[assembly: AssemblyKeyFile("")]
58+
[assembly: AssemblyKeyName("")]

0 commit comments

Comments
 (0)