Skip to content

Instantly share code, notes, and snippets.

@fipso
Created June 9, 2017 08:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fipso/0cfaf98a16af4aa88c9c638a50c55f80 to your computer and use it in GitHub Desktop.
Save fipso/0cfaf98a16af4aa88c9c638a50c55f80 to your computer and use it in GitHub Desktop.
Socks5
static void Main(string[] args)
{
var server = new Socks5Server(IPAddress.Any, 1080);
server.Start();
var client = new Socks5Client("127.0.0.1", 1080, "mx.freenet.de", 993);
client.Connect();
var stream = new NetworkStream(client.Client.Sock);
var ssl = new SslStream(stream);
ssl.AuthenticateAsClient("mx.freenet.de");
var br = new BinaryReader(ssl);
var bw = new BinaryWriter(ssl);
string line = "";
while (true)
{
char c = br.ReadChar();
line += c;
if(c == '\n')
{
Console.WriteLine(line);
line = "";
break;
}
}
bw.Write(". login fipso@freenet.de <SECRET>");
bw.Flush();
while (true)
{
byte b = br.ReadByte();
Console.WriteLine(b);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment