Created
June 9, 2017 08:42
-
-
Save fipso/0cfaf98a16af4aa88c9c638a50c55f80 to your computer and use it in GitHub Desktop.
Socks5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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