• 大小: 99KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-04
  • 语言: Java
  • 标签:

资源简介

c#调用次世代AntiVC.dll 完整实例 复杂验证码识别 有完整的例子 string code; //************* //URL 识别 code = avc.GetVcodeUrl("http://bbs.ent.163.com/bbs/checkcode.jsp?1201359681906"); Console.WriteLine("URL 识别:" + code); //************* //路径识别 code = avc.GetVcodeFile("temp.tmp"); Console.WriteLine("路径识别:" + code); //************* FileStream fsMyfile = File.OpenRead("temp.tmp"); int FileLen = (int)fsMyfile.Length; byte[] Buffer = new byte[FileLen]; fsMyfile.Read(Buffer, 0, FileLen); fsMyfile.Close(); //Buffer 识别 code = avc.GetVcodeBuffer(Buffer); Console.WriteLine("Buffer 识别:" + code); //************* FileStream fs = File.OpenRead("temp.tmp"); //OpenRead int filelength = 0; filelength = (int)fs.Length; //获得文件长度 byte[] image = new Byte[filelength]; //建立一个字节数组 fs.Read(image, 0, filelength); //按字节流读取 System.Drawing.Image result = System.Drawing.Image.FromStream(fs); fs.Close(); Bitmap bmp = new Bitmap(result); //Bitmap 识别 code = avc.GetVcodeBitmap(bmp); Console.WriteLine("Bitmap 识别:"+code); //*************

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UserTool;

namespace AntiVCDemo
{
    public partial class Form1 : Form
    {
        AntiVcClass avc;
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender EventArgs e)
        {
            avc = new AntiVcClass(“wylt.cds“ ““);
        }
        private void button1_Click(object sender EventArgs e)
        {
            Code();
        }
        public void Code()
        {
            string code;
            //*************
            //URL 识别
            code = avc.GetVcodeUrl(“http://bbs.ent.163.com/bbs/checkcode.jsp?1201359681906“);
            Console.WriteLine(“URL 识别:“ + code);
            //*************
            //路径识别
            code = avc.GetVcodeFile(“temp.tmp“);
            Console.WriteLine(“路径识别:“ + code);

            //*************
            FileStream fsMyfile = File.OpenRead(“temp.tmp“);
            int FileLen = (int)fsMyfile.Length;
            byte[] Buffer = new byte[FileLen];
            fsMyfile.Read(Buffer 0 FileLen);
            fsMyfile.Close();
            //Buffer 识别
            code = avc.GetVcodeBuffer(Buffer);
            Console.WriteLine(“Buffer 识别:“ + code);

            //*************
            FileStream fs = File.OpenRead(“temp.tmp“); //OpenRead
            int filelength = 0;
            filelength = (int)fs.Length; //获得文件长度 
            byte[] image = new Byte[filelength]; //建立一个字节数组 
            fs.Read(image 0 filelength); //按字节流读取 
            System.Drawing.Image result = System.Drawing.Image.FromStream(fs);
            fs.Close();
            Bitmap bmp = new Bitmap(result);
            //Bitmap 识别
            code = avc.GetVcodeBitmap(bmp);
            Console.WriteLine(“Bitmap 识别:“+code);
            //*************
            Console.WriteLine(“\r\n\r\n AntiVcClass.dll\r\n有问题可以联系\r\n淘豪乐QQ:774592666  \r\n备注:C#验证码识别问题\r\n“);
        }
       
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-02-24 12:44  AntiVCDemo\
     文件        3924  2016-02-24 12:20  AntiVCDemo\AntiVCDemo.csproj
     文件         187  2016-02-24 12:18  AntiVCDemo\App.config
     文件        2091  2016-02-24 12:34  AntiVCDemo\Form1.Designer.cs
     文件        2351  2016-02-24 12:44  AntiVCDemo\Form1.cs
     文件        5817  2016-02-24 12:34  AntiVCDemo\Form1.resx
     文件         522  2016-02-24 12:18  AntiVCDemo\Program.cs
     目录           0  2016-02-24 12:18  AntiVCDemo\Properties\
     文件        1344  2016-02-24 12:18  AntiVCDemo\Properties\AssemblyInfo.cs
     文件        2872  2016-02-24 12:18  AntiVCDemo\Properties\Resources.Designer.cs
     文件        5612  2016-02-24 12:18  AntiVCDemo\Properties\Resources.resx
     文件        1097  2016-02-24 12:18  AntiVCDemo\Properties\Settings.Designer.cs
     文件         249  2016-02-24 12:18  AntiVCDemo\Properties\Settings.settings
     目录           0  2016-02-24 12:18  AntiVCDemo\bin\
     目录           0  2016-02-24 12:23  AntiVCDemo\bin\Debug\
     文件       47104  2011-12-08 10:33  AntiVCDemo\bin\Debug\AntiVC.dll
     文件        9216  2016-02-24 12:44  AntiVCDemo\bin\Debug\AntiVCDemo.exe
     文件         187  2016-02-24 12:18  AntiVCDemo\bin\Debug\AntiVCDemo.exe.config
     文件       24064  2016-02-24 12:44  AntiVCDemo\bin\Debug\AntiVCDemo.pdb
     文件       24224  2016-02-24 12:44  AntiVCDemo\bin\Debug\AntiVCDemo.vshost.exe
     文件         187  2016-02-24 12:18  AntiVCDemo\bin\Debug\AntiVCDemo.vshost.exe.config
     文件         490  2013-06-18 20:28  AntiVCDemo\bin\Debug\AntiVCDemo.vshost.exe.manifest
     文件        7168  2016-02-24 12:42  AntiVCDemo\bin\Debug\AntiVcClass.dll
     文件        1409  2016-02-24 12:42  AntiVCDemo\bin\Debug\AntiVcClass.xml
     文件        1590  2016-02-23 16:45  AntiVCDemo\bin\Debug\temp.tmp
     文件         953  2010-05-17 15:45  AntiVCDemo\bin\Debug\wylt.cds
     目录           0  2016-02-24 12:18  AntiVCDemo\obj\
     目录           0  2016-02-24 12:44  AntiVCDemo\obj\Debug\
     文件         180  2016-02-24 12:42  AntiVCDemo\obj\Debug\AntiVCDemo.Form1.resources
     文件         180  2016-02-24 12:42  AntiVCDemo\obj\Debug\AntiVCDemo.Properties.Resources.resources
     文件        1097  2016-02-24 12:44  AntiVCDemo\obj\Debug\AntiVCDemo.csproj.FileListAbsolute.txt
............此处省略11个文件信息

评论

共有 条评论

相关资源