• 大小: 562KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-10
  • 语言: 其他
  • 标签:

资源简介

微信通信协议,包括登录,获取好友信息,获取消息,心跳检查,发送信息,接收图片,接收分享信息,连接外部机器人自动回答。

资源截图

代码片段和文件信息

using FluorineFx.Json;
using HttpSocket;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using System.xml;

namespace demo_win_httpsocket
{
    /// 
    /// 全局信息
    /// 
    
    public partial class MainForm : Form
    {
        LxwHttpSocket WEB = new LxwHttpSocket();

        public MainForm()
        {
            InitializeComponent();

            var tt = MimeMapping.GetMimeMapping(“.mp3“);
            var tt2 = MimeMapping.GetExtByMime(“application/x-cpio“);
            //return;

            this.Load += MainForm_Load;
        }
        private void MainForm_Load(object sender EventArgs e)
        {
            WEB.Add(“DEVICEID“ generateDeviceId());
            WEB.Add(“APPID“ “wx782c26e4c19acffb“);
            //第一步
            _1_JSLOGIN();

            //第二个 获取二维码
            _2_QRCODE();

            _3_LOGIN();
        }
        /// 
        /// 打开主界面
        /// 

        private void OpenMain()
        {
            foreach (Control c in this.Controls)
            {
                if (c.GetType() == typeof(PictureBox))
                    c.Visible = false;
                else
                    c.Visible = true;
            }

            _4_REDIRECT_URL();

            _5_WEBWXINIT();
            _6_WEBWXGETCONTACT();


            //第七步心跳检测
            _7_SYNCCHECK();
        }

        T xml2Json(string xml string root = “error“)
        {
            xmlDocument doc = new xmlDocument();
            doc.Loadxml(xml);

            javascriptobject obj = new javascriptobject();
            foreach (xmlNode node in doc.SelectSingleNode(root).ChildNodes)
            {
                //获取内容
                obj[node.Name] = node.InnerText;
            }

            return javascriptConvert.Deserializeobject(javascriptConvert.Serializeobject(obj));
        }

//        string upload_header = @“POST https://file.wx.qq.com/cgi-bin/mmwebwx-bin/webwxuploadmedia?f=json HTTP/1.1
//Host: file.wx.qq.com
//Connection: keep-alive
//Content-Length: 3386
//Origin: https://wx.qq.com
//User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML like Gecko) Chrome/47.0.2526.106 Safari/537.36
//Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryuM55vqcAjmXSlVHa
//Accept: */*
//Referer: https://wx.qq.com/?&lang=zh_CN
//Accept-Encoding: gzip deflate
//Accept-Language: zh-CNzh;q=0.8“;

//        string upload_body = @“------WebKitFormBoundaryuM55vqcAjmXSlVHa
//Content-Disposition: form-data; name=““id““
//
//WU_FILE_0
//------WebKitFormBoundaryuM55vqcAjmXSlVHa
//Content-Disposition: form-data; name=““name““
//
//{filename}
//------WebKitFormBoundaryuM55vqcAjmXSlVHa
//

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-01-13 00:30  weixinHttpApi2.0\
     文件        6703  2016-01-13 00:30  weixinHttpApi2.0\MainForm.Designer.cs
     文件        8321  2016-01-13 00:30  weixinHttpApi2.0\MainForm.cs
     文件        5817  2016-01-13 00:30  weixinHttpApi2.0\MainForm.resx
     文件        2423  2016-01-13 00:30  weixinHttpApi2.0\MainForm_10_WEBWXSENDMSG.cs
     文件        1617  2016-01-13 00:30  weixinHttpApi2.0\MainForm_11_SENDFILE.cs
     文件        2475  2016-01-13 00:30  weixinHttpApi2.0\MainForm_12_WEBWXGETMSGIMG.cs
     文件        2391  2016-01-13 00:30  weixinHttpApi2.0\MainForm_13_WEBWXGETVOICE.cs
     文件        2683  2016-01-13 00:30  weixinHttpApi2.0\MainForm_14_WEBWXGETMEDIA.cs
     文件        2753  2016-01-13 00:30  weixinHttpApi2.0\MainForm_15_webwxsendemoticon.cs
     文件        2716  2016-01-13 00:30  weixinHttpApi2.0\MainForm_16_WEBWXSENDAPPMSG.cs
     文件        2393  2016-01-13 00:30  weixinHttpApi2.0\MainForm_17_WEBWXUPLOADMEDIA.cs
     文件        1215  2016-01-13 00:30  weixinHttpApi2.0\MainForm_1_JSLOGIN.cs
     文件        1129  2016-01-13 00:30  weixinHttpApi2.0\MainForm_2_QRCODE.cs
     文件        2514  2016-01-13 00:30  weixinHttpApi2.0\MainForm_3_LOGIN.cs
     文件        1662  2016-01-13 00:30  weixinHttpApi2.0\MainForm_4_REDIRECT_URL.cs
     文件        2728  2016-01-13 00:30  weixinHttpApi2.0\MainForm_5_WEBWXINIT.cs
     文件        2106  2016-01-13 00:30  weixinHttpApi2.0\MainForm_6_WEBWXGETCONTACT.cs
     文件        2586  2016-01-13 00:30  weixinHttpApi2.0\MainForm_7_SYNCCHECK.cs
     文件        2852  2016-01-13 00:30  weixinHttpApi2.0\MainForm_8_WEBWXSYNC.cs
     文件        4264  2016-01-13 00:30  weixinHttpApi2.0\MainForm_9_DoMessage.cs
     文件         982  2016-01-13 00:30  weixinHttpApi2.0\MainForm_CONST.cs
     文件        2011  2016-01-13 00:30  weixinHttpApi2.0\MainForm_FUN.cs
     文件        3039  2016-01-13 00:30  weixinHttpApi2.0\MainForm_WeiXin.cs
     文件         569  2016-01-13 00:30  weixinHttpApi2.0\Program.cs
     目录           0  2016-01-13 00:30  weixinHttpApi2.0\Properties\
     文件        1346  2016-01-13 00:30  weixinHttpApi2.0\Properties\AssemblyInfo.cs
     文件        2878  2016-01-13 00:30  weixinHttpApi2.0\Properties\Resources.Designer.cs
     文件        5612  2016-01-13 00:30  weixinHttpApi2.0\Properties\Resources.resx
     文件        1119  2016-01-13 00:30  weixinHttpApi2.0\Properties\Settings.Designer.cs
     文件         249  2016-01-13 00:30  weixinHttpApi2.0\Properties\Settings.settings
............此处省略31个文件信息

评论

共有 条评论

相关资源