Hi again.
Today I have some new problems. I am trying to create bo which will register new accounts on this forum :
http://www.alopezie.de/fud/index.php/re/0/
As you see, there is one smart captcha made from text . I have already created a jpg file using c# code
But now I do not know how to send this captcha jpg file to captcha breaking service. Can you help me?
Today I have some new problems. I am trying to create bo which will register new accounts on this forum :
http://www.alopezie.de/fud/index.php/re/0/
As you see, there is one smart captcha made from text . I have already created a jpg file using c# code
Код:
HtmlElement he = instance.ActiveTab.FindElementByAttribute("div","style","white-space.+","regexp",0);
int heHeight = Convert.ToInt32(he.GetAttribute("height"));
int heWidth = Convert.ToInt32(he.GetAttribute("width"));
int step =1000;
int countOfIterations = heHeight/step;
var bitmaps = new List<System.Drawing.Bitmap>();
int count =0;
for(int i =0;i<countOfIterations;i++)
{
var text = he.DrawPartToBitmap(0, i*step, heWidth, step, true);
byte[] imageBytes = Convert.FromBase64String(text);
var ms = new System.IO.MemoryStream(imageBytes, 0, imageBytes.Length);
var img = (System.Drawing.Bitmap)System.Drawing.Image.FromStream(ms);
img.Save(@"C:\images\captcha.jpg");
count++;
}
int lastPieceHeight = heHeight%step;
if (lastPieceHeight>10)
{
var text = he.DrawPartToBitmap(0, heHeight-lastPieceHeight, heWidth, lastPieceHeight, true);
byte[] imageBytes = Convert.FromBase64String(text);
var ms = new System.IO.MemoryStream(imageBytes, 0, imageBytes.Length);
var img = (System.Drawing.Bitmap)System.Drawing.Image.FromStream(ms);
img.Save(@"C:\images\captcha.jpg");
}