Ejemplo n.º 1
0
 private string GetYZM()
 {
     string url = "https://dynamic.12306.cn/otsweb/passCodeAction.do?rand=randp";
     Stream stream = null;
     stream = HttpHelper.GetResponseImage(url);
     Image image = Image.FromStream(stream);
     this.BeginInvoke((ThreadStart)delegate() { this.picYZM.Image = image; });
     Cracker cracker = new Cracker();
     var result = cracker.Read((Bitmap)image);
     SetYzm(result);
     return result;
 }
Ejemplo n.º 2
0
 private string GetYZM()
 {
     string url = "https://dynamic.12306.cn/otsweb/passCodeAction.do?rand=sjrand";
     Stream stream = null;
     stream = HttpHelper.GetResponseImage(url);
     Image image = Image.FromStream(stream);
     this.pictureBox1.Image = image;
     Cracker cracker = new Cracker();
     var result = cracker.Read((Bitmap)image);
     SetYzm(result);
     return result;
 }