Skip to content

Instantly share code, notes, and snippets.

@fipso
Created June 9, 2017 08:42
Show Gist options
  • 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 [email protected] <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