private async Task <EaistoApi> SignIn() { var api = new EaistoApi(new MemoryStorage(), null); var captcha = await api.InitRemoteSession(); var path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".jpg"); using (var file = new FileStream(path, FileMode.Create)) { captcha.CopyTo(file); captcha.Dispose(); } //Process.Start(path); Process.Start(new ProcessStartInfo("cmd", $"/c start {path}") { CreateNoWindow = true }); var code = Console.ReadLine(); File.Delete(path); await api.SignIn("login", "pass", code); return(api); }
public async Task <Stream> Init() { return(await _api.InitRemoteSession()); }