• 大小: 6.56MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-02
  • 语言: C#
  • 标签: C#调用dll  

资源简介

花了很久在网站找资料做的C#用来调用亦思验证码源码,可以从网络或本地进行验证码识别,文件包括: 1. 亦思验证码3.1破解; 2. C#调用DLL源码;3. VB调用源码; 4. VB.NET调用源码 源码调用中有Sina网站的字库,可以完全正常识别; 如果要识别不同的验证码,则需要使用“亦思验证码3.1破解版”进行做字库

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Net;
using System.IO;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        [DllImport(“ycode.dll“)]
        public static extern int loadcode(int code int Length String address String pass);
        [DllImport(“ycode.dll“ EntryPoint = “Recognition“)]
        public static extern string Recognition(int ItemNo int picin int Length string Address1 string Address2 out int lppicout out int lpLength out int cLength);
        [DllImport(“ycode.dll“ EntryPoint = “Recognitiond“)]
        public static extern int Recognitiond(int ItemNo int picin int Length string Address1 string Address2);

        int no1;
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            no1 = loadcode(0 0 “sina.fc“ “sina“);
        }

        private void button1_Click(object sender EventArgs e)
        {
            string url=“http://cardid.sina.com.cn/cgi_interface/check_code_snow.php“;

            MessageBox.Show(“识别到的验证码:“ + getCode(url));
        }

        private void button2_Click(object sender EventArgs e)
        {
            pictureBox1.Image = Image.FromFile(Application.StartupPath + @“\CODE.bmp“);
            MessageBox.Show(“识别到的验证码:“+ getCode_Local());
        }

        public string getCode(string url)
        {
            string returnzhi = ““;
            try
            {

                int n1 n2 n3 = 0;
                string strd = ““;

                string temp = url;
                returnzhi = Recognition(1 0 0 temp strd out n1 out n2 out n3);//得到验证码

            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            return returnzhi;
        }

        public string getCode_Local()
        {
            string returnzhi = ““;
            try
            {

                int n1 n2 n3 = 0;
                string strd = Application.StartupPath + @“\CODE.bmp“;//验证码图片路径

                string temp = ““;
                returnzhi = Recognition(1 0 0 temp strd out n1 out n2 out n3);//得到验证码

            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            return returnzhi;
        }
       
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-05-16 08:46  亦思验证码\
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\.vs\
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\.vs\WindowsFormsApplication1\
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\.vs\WindowsFormsApplication1\DesignTimeBuild\
     文件         232  2019-05-16 08:45  亦思验证码\C#调用\.vs\WindowsFormsApplication1\DesignTimeBuild\.dtbcache
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\
     文件       46080  2019-05-16 08:45  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\.suo
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\Server\
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\Server\sqlite3\
     文件           0  2019-05-16 08:44  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\Server\sqlite3\db.lock
     文件        4096  2019-05-16 08:44  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide
     文件       32768  2019-05-16 08:44  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide-shm
     文件      659232  2019-05-16 08:44  亦思验证码\C#调用\.vs\WindowsFormsApplication1\v15\Server\sqlite3\storage.ide-wal
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\WindowsFormsApplication1\
     文件         914  2018-04-15 22:09  亦思验证码\C#调用\WindowsFormsApplication1.sln
     文件       20480  2018-04-15 22:40  亦思验证码\C#调用\WindowsFormsApplication1.suo
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\WindowsFormsApplication1\bin\
     目录           0  2019-05-16 08:46  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\
     文件        2075  2018-04-15 22:28  亦思验证码\C#调用\WindowsFormsApplication1\bin\DebugCODE.bmp
     文件        2149  2018-04-15 22:34  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\code.bmp
     文件         852  2011-03-20 01:06  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\sina.fc
     文件       10752  2019-05-16 08:44  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
     文件       22016  2019-05-16 08:44  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
     文件       11600  2018-04-15 22:39  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
     文件      373248  2007-07-31 15:53  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\y260xxxx.CLL
     文件       48128  2008-11-02 14:49  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\ycode.dll
     文件      450299  2008-08-24 13:55  亦思验证码\C#调用\WindowsFormsApplication1\bin\Debug\yxxxx.CLL
     目录           0  2018-04-15 22:09  亦思验证码\C#调用\WindowsFormsApplication1\bin\Release\
     文件        2749  2018-04-15 22:39  亦思验证码\C#调用\WindowsFormsApplication1\Form1.cs
     文件        4229  2018-04-15 22:37  亦思验证码\C#调用\WindowsFormsApplication1\Form1.Designer.cs
............此处省略125个文件信息

评论

共有 条评论