├── .vs
└── Wechat
│ └── v15
│ ├── .suo
│ └── Server
│ └── sqlite3
│ ├── db.lock
│ ├── storage.ide
│ ├── storage.ide-shm
│ └── storage.ide-wal
├── README.md
├── Wechat.sln
├── Wechat
├── .DS_Store
├── App.config
├── DeflateCompression.cs
├── ExpandoJSONConverter.cs
├── Form1.Designer.cs
├── Form1.cs
├── Form1.resx
├── GoogleProto.cs
├── HttpHelper.cs
├── MicroMsg.cs
├── Mmcommon.cs
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── RSAEncryptData.cs
├── Util.cs
├── Wechat.csproj
├── bin
│ ├── .DS_Store
│ └── Debug
│ │ └── .DS_Store
└── obj
│ ├── .DS_Store
│ └── Debug
│ └── .DS_Store
├── png1.png
└── png2.png
/.vs/Wechat/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/.vs/Wechat/v15/.suo
--------------------------------------------------------------------------------
/.vs/Wechat/v15/Server/sqlite3/db.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/.vs/Wechat/v15/Server/sqlite3/db.lock
--------------------------------------------------------------------------------
/.vs/Wechat/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
1 | SQLite format 3 @ .A
--------------------------------------------------------------------------------
/.vs/Wechat/v15/Server/sqlite3/storage.ide-shm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/.vs/Wechat/v15/Server/sqlite3/storage.ide-shm
--------------------------------------------------------------------------------
/.vs/Wechat/v15/Server/sqlite3/storage.ide-wal:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/.vs/Wechat/v15/Server/sqlite3/storage.ide-wal
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 微信ipad协议源码 请联系qq:929918989
2 | 
3 | 
4 |
5 | xcode.cs源码暂时不放github了。如需要研究源码学习,请联系qq:929918989。
6 | 协议源码使用c#进行开发,开发环境为VS2017 .net framework 4.6.1
7 | # 奖励计划
8 | 每多10个star,则随机赠送1人协议源码!
9 | # 声明
10 | 仅供自己学习研究使用,引起任何法律纠纷概不负责
11 |
--------------------------------------------------------------------------------
/Wechat.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28010.2003
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wechat", "Wechat\Wechat.csproj", "{C4B71771-883F-46B2-860B-63F6B1C70831}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {C4B71771-883F-46B2-860B-63F6B1C70831}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {C4B71771-883F-46B2-860B-63F6B1C70831}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {C4B71771-883F-46B2-860B-63F6B1C70831}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {C4B71771-883F-46B2-860B-63F6B1C70831}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {ECDF2E9D-E0A8-43EB-AA11-051BD842A519}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/Wechat/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/Wechat/.DS_Store
--------------------------------------------------------------------------------
/Wechat/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Wechat/DeflateCompression.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace aliyun
9 | {
10 | public class DeflateCompression
11 | {
12 | [DllImport("CodeDecrypt.dll")]
13 | private static extern int Zip(byte[] srcByte, int srcLen, byte[] dstByte, int dstLen);
14 |
15 | [DllImport("CodeDecrypt.dll")]
16 | private static extern int UnZip(byte[] srcByte, int srcLen, byte[] dstByte, int dstLen);
17 |
18 | public static byte[] DeflateZip(byte[] srcByte)
19 | {
20 | //压缩的时候数据长度 要处理
21 | byte[] dstByte = new byte[srcByte.Length + 100];
22 | int len = Zip(srcByte, srcByte.Length, dstByte, dstByte.Length);
23 | dstByte = dstByte.Take(len).ToArray();
24 |
25 | return dstByte;
26 | }
27 |
28 | public static byte[] DeflateUnZip(byte[] srcByte)
29 | {
30 | byte[] dstByte = new byte[204800];
31 | int len = UnZip(srcByte, srcByte.Length, dstByte, dstByte.Length);
32 | dstByte = dstByte.Take(len).ToArray();
33 |
34 | return dstByte;
35 | }
36 |
37 | public static byte[] DeflateLBSUnzip(byte[] srcByte)
38 | {
39 | byte[] dstByte = new byte[256000];
40 | int len = UnZip(srcByte, srcByte.Length, dstByte, dstByte.Length);
41 | dstByte = dstByte.Take(len).ToArray();
42 |
43 | return dstByte;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Wechat/ExpandoJSONConverter.cs:
--------------------------------------------------------------------------------
1 | using System.Web.Script.Serialization;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Web;
6 | using System.Collections.ObjectModel;
7 | using System.Dynamic;
8 | using System.Collections;
9 |
10 |
11 | namespace Wchat
12 | {
13 | public class ExpandoJSONConverter : JavaScriptConverter
14 | {
15 | public override object Deserialize(IDictionary dictionary, Type type, JavaScriptSerializer serializer)
16 | {
17 | throw new NotImplementedException();
18 | }
19 |
20 | public override IDictionary Serialize(object obj, JavaScriptSerializer serializer)
21 | {
22 | var result = new Dictionary();
23 | var dictionary = obj as IDictionary;
24 |
25 | foreach (var item in dictionary)
26 | result.Add(item.Key, item.Value);
27 |
28 | return result;
29 | }
30 |
31 | public override IEnumerable SupportedTypes
32 | {
33 | get
34 | {
35 | return new ReadOnlyCollection(new Type[] { typeof(System.Dynamic.ExpandoObject) });
36 | }
37 | }
38 | }
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/Wechat/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Wechat
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows 窗体设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要修改
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
32 | this.btn_GetQrcode = new System.Windows.Forms.Button();
33 | this.pB_Qrcode = new System.Windows.Forms.PictureBox();
34 | this.groupBox3 = new System.Windows.Forms.GroupBox();
35 | this.rtb_Msg = new System.Windows.Forms.RichTextBox();
36 | this.tb_Content = new System.Windows.Forms.TextBox();
37 | this.button1 = new System.Windows.Forms.Button();
38 | this.label3 = new System.Windows.Forms.Label();
39 | this.tb_ToUsername = new System.Windows.Forms.TextBox();
40 | this.tabControl1 = new System.Windows.Forms.TabControl();
41 | this.tabPage1 = new System.Windows.Forms.TabPage();
42 | this.groupBox7 = new System.Windows.Forms.GroupBox();
43 | this.btn_DelContactLabel = new System.Windows.Forms.Button();
44 | this.btn_ModifyLabelList = new System.Windows.Forms.Button();
45 | this.btn_AddLabel = new System.Windows.Forms.Button();
46 | this.btn_GetLabelList = new System.Windows.Forms.Button();
47 | this.groupBox6 = new System.Windows.Forms.GroupBox();
48 | this.btn_shakeGet = new System.Windows.Forms.Button();
49 | this.btn_lbsfind = new System.Windows.Forms.Button();
50 | this.groupBox4 = new System.Windows.Forms.GroupBox();
51 | this.button4 = new System.Windows.Forms.Button();
52 | this.btn_SendCDnimg = new System.Windows.Forms.Button();
53 | this.btn_downloadMsgimg = new System.Windows.Forms.Button();
54 | this.btn_SendAppMsg = new System.Windows.Forms.Button();
55 | this.btn_SendCardMsg = new System.Windows.Forms.Button();
56 | this.btn_SendMsg = new System.Windows.Forms.Button();
57 | this.btn_SendVoice = new System.Windows.Forms.Button();
58 | this.btn_SendMsgimg = new System.Windows.Forms.Button();
59 | this.groupBox5 = new System.Windows.Forms.GroupBox();
60 | this.btn_SnsUpload = new System.Windows.Forms.Button();
61 | this.btn_SnsSync = new System.Windows.Forms.Button();
62 | this.btn_SnsPost = new System.Windows.Forms.Button();
63 | this.btn_SnsObjectOp = new System.Windows.Forms.Button();
64 | this.btn_SnsTimeLine = new System.Windows.Forms.Button();
65 | this.btn_SnsUserPage = new System.Windows.Forms.Button();
66 | this.groupBox1 = new System.Windows.Forms.GroupBox();
67 | this.button5 = new System.Windows.Forms.Button();
68 | this.btn_BindEail = new System.Windows.Forms.Button();
69 | this.btn_GetContact = new System.Windows.Forms.Button();
70 | this.btn_SearchContact = new System.Windows.Forms.Button();
71 | this.btn_initcontact = new System.Windows.Forms.Button();
72 | this.btn_get = new System.Windows.Forms.Button();
73 | this.btn_GetA8Key = new System.Windows.Forms.Button();
74 | this.tabPage2 = new System.Windows.Forms.TabPage();
75 | this.groupBox12 = new System.Windows.Forms.GroupBox();
76 | this.btn_UpMobile = new System.Windows.Forms.Button();
77 | this.groupBox15 = new System.Windows.Forms.GroupBox();
78 | this.btn_AddFavItem = new System.Windows.Forms.Button();
79 | this.btn_DelFavItem = new System.Windows.Forms.Button();
80 | this.btn_GetFavItem = new System.Windows.Forms.Button();
81 | this.btn_FavSync = new System.Windows.Forms.Button();
82 | this.groupBox8 = new System.Windows.Forms.GroupBox();
83 | this.button7 = new System.Windows.Forms.Button();
84 | this.btn_Add_Gh = new System.Windows.Forms.Button();
85 | this.btn_SayHello = new System.Windows.Forms.Button();
86 | this.btn_AcceptUser = new System.Windows.Forms.Button();
87 | this.btn_AddUser = new System.Windows.Forms.Button();
88 | this.groupBox2 = new System.Windows.Forms.GroupBox();
89 | this.btn_SetChatRoomAnnouncement = new System.Windows.Forms.Button();
90 | this.btn_GetRoomDetail = new System.Windows.Forms.Button();
91 | this.btn_DelChatRoomUser = new System.Windows.Forms.Button();
92 | this.btn_AddChatRoomMember = new System.Windows.Forms.Button();
93 | this.btn_CreateChatRoom = new System.Windows.Forms.Button();
94 | this.tabPage3 = new System.Windows.Forms.TabPage();
95 | this.groupBox11 = new System.Windows.Forms.GroupBox();
96 | this.btn_TenPay_TransferConfirm = new System.Windows.Forms.Button();
97 | this.btn_TransferReq = new System.Windows.Forms.Button();
98 | this.btn_GenPreTransferReq = new System.Windows.Forms.Button();
99 | this.groupBox20 = new System.Windows.Forms.GroupBox();
100 | this.btn_Fetchauthen = new System.Windows.Forms.Button();
101 | this.btn_GetBalance = new System.Windows.Forms.Button();
102 | this.btn_Genprefetch = new System.Windows.Forms.Button();
103 | this.btn_GetBlankID = new System.Windows.Forms.Button();
104 | this.btn_F2ffee = new System.Windows.Forms.Button();
105 | this.tabPage4 = new System.Windows.Forms.TabPage();
106 | this.groupBox10 = new System.Windows.Forms.GroupBox();
107 | this.button8 = new System.Windows.Forms.Button();
108 | this.btn_Bindmolie_yzcode = new System.Windows.Forms.Button();
109 | this.btn_BindMobile_getcode = new System.Windows.Forms.Button();
110 | this.groupBox16 = new System.Windows.Forms.GroupBox();
111 | this.btn_setPwd = new System.Windows.Forms.Button();
112 | this.btn_verifyPwd = new System.Windows.Forms.Button();
113 | this.groupBox9 = new System.Windows.Forms.GroupBox();
114 | this.Btn_DataLogin = new System.Windows.Forms.Button();
115 | this.groupBox18 = new System.Windows.Forms.GroupBox();
116 | this.button6 = new System.Windows.Forms.Button();
117 | this.btn_ZC = new System.Windows.Forms.Button();
118 | this.btn_NewReg = new System.Windows.Forms.Button();
119 | this.btn_ChackSmsCode = new System.Windows.Forms.Button();
120 | this.btn_GetSms = new System.Windows.Forms.Button();
121 | this.groupBox13 = new System.Windows.Forms.GroupBox();
122 | this.btn_deviceLogins = new System.Windows.Forms.Button();
123 | this.btn_loginBySms = new System.Windows.Forms.Button();
124 | this.button3 = new System.Windows.Forms.Button();
125 | this.btn_logoutweb = new System.Windows.Forms.Button();
126 | this.btn_GetLoginSmsCodes = new System.Windows.Forms.Button();
127 | this.btn_PushUrlLogin = new System.Windows.Forms.Button();
128 | this.groupBox19 = new System.Windows.Forms.GroupBox();
129 | this.btn_logout = new System.Windows.Forms.Button();
130 | this.btn_SyncCheck = new System.Windows.Forms.Button();
131 | this.btn_AutoAuth = new System.Windows.Forms.Button();
132 | this.btn_Sync = new System.Windows.Forms.Button();
133 | this.btn_NewInit = new System.Windows.Forms.Button();
134 | this.button2 = new System.Windows.Forms.Button();
135 | this.label4 = new System.Windows.Forms.Label();
136 | this.tb_AtUserlist = new System.Windows.Forms.TextBox();
137 | this.textBox1 = new System.Windows.Forms.TextBox();
138 | ((System.ComponentModel.ISupportInitialize)(this.pB_Qrcode)).BeginInit();
139 | this.groupBox3.SuspendLayout();
140 | this.tabControl1.SuspendLayout();
141 | this.tabPage1.SuspendLayout();
142 | this.groupBox7.SuspendLayout();
143 | this.groupBox6.SuspendLayout();
144 | this.groupBox4.SuspendLayout();
145 | this.groupBox5.SuspendLayout();
146 | this.groupBox1.SuspendLayout();
147 | this.tabPage2.SuspendLayout();
148 | this.groupBox12.SuspendLayout();
149 | this.groupBox15.SuspendLayout();
150 | this.groupBox8.SuspendLayout();
151 | this.groupBox2.SuspendLayout();
152 | this.tabPage3.SuspendLayout();
153 | this.groupBox11.SuspendLayout();
154 | this.groupBox20.SuspendLayout();
155 | this.tabPage4.SuspendLayout();
156 | this.groupBox10.SuspendLayout();
157 | this.groupBox16.SuspendLayout();
158 | this.groupBox9.SuspendLayout();
159 | this.groupBox18.SuspendLayout();
160 | this.groupBox13.SuspendLayout();
161 | this.groupBox19.SuspendLayout();
162 | this.SuspendLayout();
163 | //
164 | // btn_GetQrcode
165 | //
166 | this.btn_GetQrcode.Location = new System.Drawing.Point(166, 17);
167 | this.btn_GetQrcode.Name = "btn_GetQrcode";
168 | this.btn_GetQrcode.Size = new System.Drawing.Size(112, 23);
169 | this.btn_GetQrcode.TabIndex = 32;
170 | this.btn_GetQrcode.Text = "获取二维码";
171 | this.btn_GetQrcode.UseVisualStyleBackColor = true;
172 | this.btn_GetQrcode.Click += new System.EventHandler(this.btn_GetQrcode_Click);
173 | //
174 | // pB_Qrcode
175 | //
176 | this.pB_Qrcode.Location = new System.Drawing.Point(12, 17);
177 | this.pB_Qrcode.Name = "pB_Qrcode";
178 | this.pB_Qrcode.Size = new System.Drawing.Size(138, 135);
179 | this.pB_Qrcode.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
180 | this.pB_Qrcode.TabIndex = 31;
181 | this.pB_Qrcode.TabStop = false;
182 | //
183 | // groupBox3
184 | //
185 | this.groupBox3.Controls.Add(this.rtb_Msg);
186 | this.groupBox3.Location = new System.Drawing.Point(665, 10);
187 | this.groupBox3.Name = "groupBox3";
188 | this.groupBox3.Size = new System.Drawing.Size(283, 556);
189 | this.groupBox3.TabIndex = 30;
190 | this.groupBox3.TabStop = false;
191 | this.groupBox3.Text = "MsgConsole";
192 | //
193 | // rtb_Msg
194 | //
195 | this.rtb_Msg.Location = new System.Drawing.Point(12, 20);
196 | this.rtb_Msg.Name = "rtb_Msg";
197 | this.rtb_Msg.Size = new System.Drawing.Size(265, 519);
198 | this.rtb_Msg.TabIndex = 5;
199 | this.rtb_Msg.Text = "";
200 | //
201 | // tb_Content
202 | //
203 | this.tb_Content.Location = new System.Drawing.Point(267, 55);
204 | this.tb_Content.Multiline = true;
205 | this.tb_Content.Name = "tb_Content";
206 | this.tb_Content.Size = new System.Drawing.Size(232, 36);
207 | this.tb_Content.TabIndex = 34;
208 | this.tb_Content.Text = resources.GetString("tb_Content.Text");
209 | //
210 | // button1
211 | //
212 | this.button1.Location = new System.Drawing.Point(541, 53);
213 | this.button1.Name = "button1";
214 | this.button1.Size = new System.Drawing.Size(75, 23);
215 | this.button1.TabIndex = 36;
216 | this.button1.Text = "test";
217 | this.button1.UseVisualStyleBackColor = true;
218 | this.button1.Click += new System.EventHandler(this.button1_Click);
219 | //
220 | // label3
221 | //
222 | this.label3.AutoSize = true;
223 | this.label3.Location = new System.Drawing.Point(190, 113);
224 | this.label3.Name = "label3";
225 | this.label3.Size = new System.Drawing.Size(71, 12);
226 | this.label3.TabIndex = 38;
227 | this.label3.Text = "ToUsername:";
228 | //
229 | // tb_ToUsername
230 | //
231 | this.tb_ToUsername.Location = new System.Drawing.Point(267, 110);
232 | this.tb_ToUsername.Name = "tb_ToUsername";
233 | this.tb_ToUsername.Size = new System.Drawing.Size(232, 21);
234 | this.tb_ToUsername.TabIndex = 37;
235 | this.tb_ToUsername.Text = "0094729345849";
236 | //
237 | // tabControl1
238 | //
239 | this.tabControl1.Controls.Add(this.tabPage1);
240 | this.tabControl1.Controls.Add(this.tabPage2);
241 | this.tabControl1.Controls.Add(this.tabPage3);
242 | this.tabControl1.Controls.Add(this.tabPage4);
243 | this.tabControl1.Location = new System.Drawing.Point(12, 166);
244 | this.tabControl1.Name = "tabControl1";
245 | this.tabControl1.SelectedIndex = 0;
246 | this.tabControl1.Size = new System.Drawing.Size(647, 411);
247 | this.tabControl1.TabIndex = 40;
248 | //
249 | // tabPage1
250 | //
251 | this.tabPage1.Controls.Add(this.groupBox7);
252 | this.tabPage1.Controls.Add(this.groupBox6);
253 | this.tabPage1.Controls.Add(this.groupBox4);
254 | this.tabPage1.Controls.Add(this.groupBox5);
255 | this.tabPage1.Controls.Add(this.groupBox1);
256 | this.tabPage1.Location = new System.Drawing.Point(4, 22);
257 | this.tabPage1.Name = "tabPage1";
258 | this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
259 | this.tabPage1.Size = new System.Drawing.Size(639, 385);
260 | this.tabPage1.TabIndex = 0;
261 | this.tabPage1.Text = "信息操作";
262 | this.tabPage1.UseVisualStyleBackColor = true;
263 | //
264 | // groupBox7
265 | //
266 | this.groupBox7.Controls.Add(this.btn_DelContactLabel);
267 | this.groupBox7.Controls.Add(this.btn_ModifyLabelList);
268 | this.groupBox7.Controls.Add(this.btn_AddLabel);
269 | this.groupBox7.Controls.Add(this.btn_GetLabelList);
270 | this.groupBox7.Location = new System.Drawing.Point(313, 121);
271 | this.groupBox7.Name = "groupBox7";
272 | this.groupBox7.Size = new System.Drawing.Size(134, 142);
273 | this.groupBox7.TabIndex = 38;
274 | this.groupBox7.TabStop = false;
275 | this.groupBox7.Text = "通讯录标签操作";
276 | //
277 | // btn_DelContactLabel
278 | //
279 | this.btn_DelContactLabel.Location = new System.Drawing.Point(15, 111);
280 | this.btn_DelContactLabel.Name = "btn_DelContactLabel";
281 | this.btn_DelContactLabel.Size = new System.Drawing.Size(110, 25);
282 | this.btn_DelContactLabel.TabIndex = 31;
283 | this.btn_DelContactLabel.Text = "删除标签列表";
284 | this.btn_DelContactLabel.UseVisualStyleBackColor = true;
285 | this.btn_DelContactLabel.Click += new System.EventHandler(this.btn_DelContactLabel_Click);
286 | //
287 | // btn_ModifyLabelList
288 | //
289 | this.btn_ModifyLabelList.Location = new System.Drawing.Point(15, 82);
290 | this.btn_ModifyLabelList.Name = "btn_ModifyLabelList";
291 | this.btn_ModifyLabelList.Size = new System.Drawing.Size(110, 25);
292 | this.btn_ModifyLabelList.TabIndex = 8;
293 | this.btn_ModifyLabelList.Text = "修改标签列表";
294 | this.btn_ModifyLabelList.UseVisualStyleBackColor = true;
295 | this.btn_ModifyLabelList.Click += new System.EventHandler(this.btn_ModifyLabelList_Click);
296 | //
297 | // btn_AddLabel
298 | //
299 | this.btn_AddLabel.Location = new System.Drawing.Point(13, 51);
300 | this.btn_AddLabel.Name = "btn_AddLabel";
301 | this.btn_AddLabel.Size = new System.Drawing.Size(112, 25);
302 | this.btn_AddLabel.TabIndex = 7;
303 | this.btn_AddLabel.Text = "新增标签";
304 | this.btn_AddLabel.UseVisualStyleBackColor = true;
305 | this.btn_AddLabel.Click += new System.EventHandler(this.btn_AddLabel_Click);
306 | //
307 | // btn_GetLabelList
308 | //
309 | this.btn_GetLabelList.Location = new System.Drawing.Point(13, 22);
310 | this.btn_GetLabelList.Name = "btn_GetLabelList";
311 | this.btn_GetLabelList.Size = new System.Drawing.Size(112, 23);
312 | this.btn_GetLabelList.TabIndex = 30;
313 | this.btn_GetLabelList.Text = "取标签列表";
314 | this.btn_GetLabelList.UseVisualStyleBackColor = true;
315 | this.btn_GetLabelList.Click += new System.EventHandler(this.btn_GetLabelList_Click);
316 | //
317 | // groupBox6
318 | //
319 | this.groupBox6.Controls.Add(this.btn_shakeGet);
320 | this.groupBox6.Controls.Add(this.btn_lbsfind);
321 | this.groupBox6.Location = new System.Drawing.Point(313, 7);
322 | this.groupBox6.Name = "groupBox6";
323 | this.groupBox6.Size = new System.Drawing.Size(134, 101);
324 | this.groupBox6.TabIndex = 37;
325 | this.groupBox6.TabStop = false;
326 | this.groupBox6.Text = "附近操作";
327 | //
328 | // btn_shakeGet
329 | //
330 | this.btn_shakeGet.Location = new System.Drawing.Point(9, 49);
331 | this.btn_shakeGet.Name = "btn_shakeGet";
332 | this.btn_shakeGet.Size = new System.Drawing.Size(109, 25);
333 | this.btn_shakeGet.TabIndex = 33;
334 | this.btn_shakeGet.Text = "摇一摇";
335 | this.btn_shakeGet.UseVisualStyleBackColor = true;
336 | this.btn_shakeGet.Click += new System.EventHandler(this.btn_shakeGet_Click);
337 | //
338 | // btn_lbsfind
339 | //
340 | this.btn_lbsfind.Location = new System.Drawing.Point(9, 20);
341 | this.btn_lbsfind.Name = "btn_lbsfind";
342 | this.btn_lbsfind.Size = new System.Drawing.Size(109, 23);
343 | this.btn_lbsfind.TabIndex = 27;
344 | this.btn_lbsfind.Text = "附近的人";
345 | this.btn_lbsfind.UseVisualStyleBackColor = true;
346 | this.btn_lbsfind.Click += new System.EventHandler(this.btn_lbsfind_Click);
347 | //
348 | // groupBox4
349 | //
350 | this.groupBox4.Controls.Add(this.button4);
351 | this.groupBox4.Controls.Add(this.btn_SendCDnimg);
352 | this.groupBox4.Controls.Add(this.btn_downloadMsgimg);
353 | this.groupBox4.Controls.Add(this.btn_SendAppMsg);
354 | this.groupBox4.Controls.Add(this.btn_SendCardMsg);
355 | this.groupBox4.Controls.Add(this.btn_SendMsg);
356 | this.groupBox4.Controls.Add(this.btn_SendVoice);
357 | this.groupBox4.Controls.Add(this.btn_SendMsgimg);
358 | this.groupBox4.Location = new System.Drawing.Point(159, 7);
359 | this.groupBox4.Name = "groupBox4";
360 | this.groupBox4.Size = new System.Drawing.Size(140, 326);
361 | this.groupBox4.TabIndex = 36;
362 | this.groupBox4.TabStop = false;
363 | this.groupBox4.Text = "信息操作";
364 | //
365 | // button4
366 | //
367 | this.button4.Location = new System.Drawing.Point(10, 229);
368 | this.button4.Name = "button4";
369 | this.button4.RightToLeft = System.Windows.Forms.RightToLeft.No;
370 | this.button4.Size = new System.Drawing.Size(113, 25);
371 | this.button4.TabIndex = 53;
372 | this.button4.Text = "发送视频";
373 | this.button4.UseVisualStyleBackColor = true;
374 | this.button4.Click += new System.EventHandler(this.button4_Click);
375 | //
376 | // btn_SendCDnimg
377 | //
378 | this.btn_SendCDnimg.Location = new System.Drawing.Point(10, 198);
379 | this.btn_SendCDnimg.Name = "btn_SendCDnimg";
380 | this.btn_SendCDnimg.RightToLeft = System.Windows.Forms.RightToLeft.No;
381 | this.btn_SendCDnimg.Size = new System.Drawing.Size(113, 25);
382 | this.btn_SendCDnimg.TabIndex = 52;
383 | this.btn_SendCDnimg.Text = "CDN发图";
384 | this.btn_SendCDnimg.UseVisualStyleBackColor = true;
385 | this.btn_SendCDnimg.Click += new System.EventHandler(this.btn_SendCDnimg_Click);
386 | //
387 | // btn_downloadMsgimg
388 | //
389 | this.btn_downloadMsgimg.Location = new System.Drawing.Point(11, 167);
390 | this.btn_downloadMsgimg.Name = "btn_downloadMsgimg";
391 | this.btn_downloadMsgimg.RightToLeft = System.Windows.Forms.RightToLeft.No;
392 | this.btn_downloadMsgimg.Size = new System.Drawing.Size(112, 25);
393 | this.btn_downloadMsgimg.TabIndex = 51;
394 | this.btn_downloadMsgimg.Text = "接收高清大图";
395 | this.btn_downloadMsgimg.UseVisualStyleBackColor = true;
396 | this.btn_downloadMsgimg.Click += new System.EventHandler(this.btn_downloadMsgimg_Click);
397 | //
398 | // btn_SendAppMsg
399 | //
400 | this.btn_SendAppMsg.Location = new System.Drawing.Point(11, 136);
401 | this.btn_SendAppMsg.Name = "btn_SendAppMsg";
402 | this.btn_SendAppMsg.RightToLeft = System.Windows.Forms.RightToLeft.No;
403 | this.btn_SendAppMsg.Size = new System.Drawing.Size(113, 25);
404 | this.btn_SendAppMsg.TabIndex = 50;
405 | this.btn_SendAppMsg.Text = "发送APP消息";
406 | this.btn_SendAppMsg.UseVisualStyleBackColor = false;
407 | this.btn_SendAppMsg.Click += new System.EventHandler(this.btn_SendAppMsg_Click);
408 | //
409 | // btn_SendCardMsg
410 | //
411 | this.btn_SendCardMsg.Location = new System.Drawing.Point(11, 105);
412 | this.btn_SendCardMsg.Name = "btn_SendCardMsg";
413 | this.btn_SendCardMsg.RightToLeft = System.Windows.Forms.RightToLeft.No;
414 | this.btn_SendCardMsg.Size = new System.Drawing.Size(112, 25);
415 | this.btn_SendCardMsg.TabIndex = 49;
416 | this.btn_SendCardMsg.Text = "发送名片消息";
417 | this.btn_SendCardMsg.UseVisualStyleBackColor = true;
418 | this.btn_SendCardMsg.Click += new System.EventHandler(this.btn_SendCardMsg_Click);
419 | //
420 | // btn_SendMsg
421 | //
422 | this.btn_SendMsg.Location = new System.Drawing.Point(12, 76);
423 | this.btn_SendMsg.Name = "btn_SendMsg";
424 | this.btn_SendMsg.RightToLeft = System.Windows.Forms.RightToLeft.No;
425 | this.btn_SendMsg.Size = new System.Drawing.Size(112, 25);
426 | this.btn_SendMsg.TabIndex = 48;
427 | this.btn_SendMsg.Text = "发送文本消息";
428 | this.btn_SendMsg.UseVisualStyleBackColor = true;
429 | this.btn_SendMsg.Click += new System.EventHandler(this.btn_SendMsg_Click);
430 | //
431 | // btn_SendVoice
432 | //
433 | this.btn_SendVoice.Location = new System.Drawing.Point(11, 48);
434 | this.btn_SendVoice.Name = "btn_SendVoice";
435 | this.btn_SendVoice.RightToLeft = System.Windows.Forms.RightToLeft.No;
436 | this.btn_SendVoice.Size = new System.Drawing.Size(112, 23);
437 | this.btn_SendVoice.TabIndex = 46;
438 | this.btn_SendVoice.Text = "发送语音";
439 | this.btn_SendVoice.UseVisualStyleBackColor = true;
440 | this.btn_SendVoice.Click += new System.EventHandler(this.btn_SendVoice_Click);
441 | //
442 | // btn_SendMsgimg
443 | //
444 | this.btn_SendMsgimg.Location = new System.Drawing.Point(12, 18);
445 | this.btn_SendMsgimg.Name = "btn_SendMsgimg";
446 | this.btn_SendMsgimg.RightToLeft = System.Windows.Forms.RightToLeft.No;
447 | this.btn_SendMsgimg.Size = new System.Drawing.Size(112, 23);
448 | this.btn_SendMsgimg.TabIndex = 47;
449 | this.btn_SendMsgimg.Text = "发送图片";
450 | this.btn_SendMsgimg.UseVisualStyleBackColor = true;
451 | this.btn_SendMsgimg.Click += new System.EventHandler(this.btn_SendMsgimg_Click);
452 | //
453 | // groupBox5
454 | //
455 | this.groupBox5.Controls.Add(this.btn_SnsUpload);
456 | this.groupBox5.Controls.Add(this.btn_SnsSync);
457 | this.groupBox5.Controls.Add(this.btn_SnsPost);
458 | this.groupBox5.Controls.Add(this.btn_SnsObjectOp);
459 | this.groupBox5.Controls.Add(this.btn_SnsTimeLine);
460 | this.groupBox5.Controls.Add(this.btn_SnsUserPage);
461 | this.groupBox5.Location = new System.Drawing.Point(6, 6);
462 | this.groupBox5.Name = "groupBox5";
463 | this.groupBox5.Size = new System.Drawing.Size(140, 229);
464 | this.groupBox5.TabIndex = 35;
465 | this.groupBox5.TabStop = false;
466 | this.groupBox5.Text = "朋友圈操作";
467 | //
468 | // btn_SnsUpload
469 | //
470 | this.btn_SnsUpload.Location = new System.Drawing.Point(14, 165);
471 | this.btn_SnsUpload.Name = "btn_SnsUpload";
472 | this.btn_SnsUpload.RightToLeft = System.Windows.Forms.RightToLeft.No;
473 | this.btn_SnsUpload.Size = new System.Drawing.Size(106, 25);
474 | this.btn_SnsUpload.TabIndex = 37;
475 | this.btn_SnsUpload.Text = "朋友圈上传图片";
476 | this.btn_SnsUpload.UseVisualStyleBackColor = true;
477 | this.btn_SnsUpload.Click += new System.EventHandler(this.btn_SnsUpload_Click);
478 | //
479 | // btn_SnsSync
480 | //
481 | this.btn_SnsSync.Location = new System.Drawing.Point(14, 136);
482 | this.btn_SnsSync.Name = "btn_SnsSync";
483 | this.btn_SnsSync.RightToLeft = System.Windows.Forms.RightToLeft.No;
484 | this.btn_SnsSync.Size = new System.Drawing.Size(106, 23);
485 | this.btn_SnsSync.TabIndex = 36;
486 | this.btn_SnsSync.Text = "同步朋友圈";
487 | this.btn_SnsSync.UseVisualStyleBackColor = true;
488 | this.btn_SnsSync.Click += new System.EventHandler(this.btn_SnsSync_Click);
489 | //
490 | // btn_SnsPost
491 | //
492 | this.btn_SnsPost.Location = new System.Drawing.Point(14, 107);
493 | this.btn_SnsPost.Name = "btn_SnsPost";
494 | this.btn_SnsPost.RightToLeft = System.Windows.Forms.RightToLeft.No;
495 | this.btn_SnsPost.Size = new System.Drawing.Size(106, 23);
496 | this.btn_SnsPost.TabIndex = 35;
497 | this.btn_SnsPost.Text = "发送朋友圈";
498 | this.btn_SnsPost.UseVisualStyleBackColor = true;
499 | this.btn_SnsPost.Click += new System.EventHandler(this.btn_SnsPost_Click);
500 | //
501 | // btn_SnsObjectOp
502 | //
503 | this.btn_SnsObjectOp.Location = new System.Drawing.Point(14, 78);
504 | this.btn_SnsObjectOp.Name = "btn_SnsObjectOp";
505 | this.btn_SnsObjectOp.RightToLeft = System.Windows.Forms.RightToLeft.No;
506 | this.btn_SnsObjectOp.Size = new System.Drawing.Size(106, 23);
507 | this.btn_SnsObjectOp.TabIndex = 34;
508 | this.btn_SnsObjectOp.Text = "朋友圈操作";
509 | this.btn_SnsObjectOp.UseVisualStyleBackColor = true;
510 | this.btn_SnsObjectOp.Click += new System.EventHandler(this.btn_SnsObjectOp_Click);
511 | //
512 | // btn_SnsTimeLine
513 | //
514 | this.btn_SnsTimeLine.Location = new System.Drawing.Point(14, 49);
515 | this.btn_SnsTimeLine.Name = "btn_SnsTimeLine";
516 | this.btn_SnsTimeLine.RightToLeft = System.Windows.Forms.RightToLeft.No;
517 | this.btn_SnsTimeLine.Size = new System.Drawing.Size(106, 23);
518 | this.btn_SnsTimeLine.TabIndex = 33;
519 | this.btn_SnsTimeLine.Text = "取朋友圈首页";
520 | this.btn_SnsTimeLine.UseVisualStyleBackColor = true;
521 | this.btn_SnsTimeLine.Click += new System.EventHandler(this.btn_SnsTimeLine_Click);
522 | //
523 | // btn_SnsUserPage
524 | //
525 | this.btn_SnsUserPage.Location = new System.Drawing.Point(14, 20);
526 | this.btn_SnsUserPage.Name = "btn_SnsUserPage";
527 | this.btn_SnsUserPage.RightToLeft = System.Windows.Forms.RightToLeft.No;
528 | this.btn_SnsUserPage.Size = new System.Drawing.Size(106, 23);
529 | this.btn_SnsUserPage.TabIndex = 32;
530 | this.btn_SnsUserPage.Text = "取指定人盆友圈";
531 | this.btn_SnsUserPage.UseVisualStyleBackColor = true;
532 | this.btn_SnsUserPage.Click += new System.EventHandler(this.btn_SnsUserPage_Click);
533 | //
534 | // groupBox1
535 | //
536 | this.groupBox1.Controls.Add(this.button5);
537 | this.groupBox1.Controls.Add(this.btn_BindEail);
538 | this.groupBox1.Controls.Add(this.btn_GetContact);
539 | this.groupBox1.Controls.Add(this.btn_SearchContact);
540 | this.groupBox1.Controls.Add(this.btn_initcontact);
541 | this.groupBox1.Controls.Add(this.btn_get);
542 | this.groupBox1.Controls.Add(this.btn_GetA8Key);
543 | this.groupBox1.Location = new System.Drawing.Point(471, 6);
544 | this.groupBox1.Name = "groupBox1";
545 | this.groupBox1.Size = new System.Drawing.Size(150, 302);
546 | this.groupBox1.TabIndex = 34;
547 | this.groupBox1.TabStop = false;
548 | this.groupBox1.Text = "opt";
549 | //
550 | // button5
551 | //
552 | this.button5.Location = new System.Drawing.Point(16, 235);
553 | this.button5.Name = "button5";
554 | this.button5.Size = new System.Drawing.Size(110, 23);
555 | this.button5.TabIndex = 48;
556 | this.button5.Text = "扫码进群";
557 | this.button5.UseVisualStyleBackColor = true;
558 | this.button5.Click += new System.EventHandler(this.button5_Click);
559 | //
560 | // btn_BindEail
561 | //
562 | this.btn_BindEail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
563 | this.btn_BindEail.Location = new System.Drawing.Point(15, 204);
564 | this.btn_BindEail.Name = "btn_BindEail";
565 | this.btn_BindEail.Size = new System.Drawing.Size(112, 25);
566 | this.btn_BindEail.TabIndex = 47;
567 | this.btn_BindEail.Text = "绑定解绑邮箱";
568 | this.btn_BindEail.UseVisualStyleBackColor = true;
569 | this.btn_BindEail.Click += new System.EventHandler(this.btn_BindEail_Click);
570 | //
571 | // btn_GetContact
572 | //
573 | this.btn_GetContact.Location = new System.Drawing.Point(16, 173);
574 | this.btn_GetContact.Name = "btn_GetContact";
575 | this.btn_GetContact.Size = new System.Drawing.Size(112, 25);
576 | this.btn_GetContact.TabIndex = 45;
577 | this.btn_GetContact.Text = "搜索wxid";
578 | this.btn_GetContact.UseVisualStyleBackColor = true;
579 | this.btn_GetContact.Click += new System.EventHandler(this.btn_GetContact_Click);
580 | //
581 | // btn_SearchContact
582 | //
583 | this.btn_SearchContact.Location = new System.Drawing.Point(16, 144);
584 | this.btn_SearchContact.Name = "btn_SearchContact";
585 | this.btn_SearchContact.Size = new System.Drawing.Size(112, 23);
586 | this.btn_SearchContact.TabIndex = 44;
587 | this.btn_SearchContact.Text = "搜索QQ手机";
588 | this.btn_SearchContact.UseVisualStyleBackColor = true;
589 | this.btn_SearchContact.Click += new System.EventHandler(this.btn_SearchContact_Click);
590 | //
591 | // btn_initcontact
592 | //
593 | this.btn_initcontact.Location = new System.Drawing.Point(18, 107);
594 | this.btn_initcontact.Name = "btn_initcontact";
595 | this.btn_initcontact.Size = new System.Drawing.Size(110, 23);
596 | this.btn_initcontact.TabIndex = 43;
597 | this.btn_initcontact.Text = "拉取通讯录(精准)";
598 | this.btn_initcontact.UseVisualStyleBackColor = true;
599 | this.btn_initcontact.Click += new System.EventHandler(this.btn_initcontact_Click);
600 | //
601 | // btn_get
602 | //
603 | this.btn_get.Location = new System.Drawing.Point(19, 78);
604 | this.btn_get.Name = "btn_get";
605 | this.btn_get.Size = new System.Drawing.Size(109, 23);
606 | this.btn_get.TabIndex = 36;
607 | this.btn_get.Text = "取wxid二维码";
608 | this.btn_get.UseVisualStyleBackColor = true;
609 | this.btn_get.Click += new System.EventHandler(this.btn_get_Click);
610 | //
611 | // btn_GetA8Key
612 | //
613 | this.btn_GetA8Key.Location = new System.Drawing.Point(18, 49);
614 | this.btn_GetA8Key.Name = "btn_GetA8Key";
615 | this.btn_GetA8Key.Size = new System.Drawing.Size(110, 23);
616 | this.btn_GetA8Key.TabIndex = 35;
617 | this.btn_GetA8Key.Text = "授权阅读连接";
618 | this.btn_GetA8Key.UseVisualStyleBackColor = true;
619 | this.btn_GetA8Key.Click += new System.EventHandler(this.btn_GetA8Key_Click);
620 | //
621 | // tabPage2
622 | //
623 | this.tabPage2.Controls.Add(this.groupBox12);
624 | this.tabPage2.Controls.Add(this.groupBox15);
625 | this.tabPage2.Controls.Add(this.groupBox8);
626 | this.tabPage2.Controls.Add(this.groupBox2);
627 | this.tabPage2.Location = new System.Drawing.Point(4, 22);
628 | this.tabPage2.Name = "tabPage2";
629 | this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
630 | this.tabPage2.Size = new System.Drawing.Size(639, 385);
631 | this.tabPage2.TabIndex = 1;
632 | this.tabPage2.Text = "好友操作";
633 | this.tabPage2.UseVisualStyleBackColor = true;
634 | //
635 | // groupBox12
636 | //
637 | this.groupBox12.Controls.Add(this.btn_UpMobile);
638 | this.groupBox12.Location = new System.Drawing.Point(489, 9);
639 | this.groupBox12.Name = "groupBox12";
640 | this.groupBox12.Size = new System.Drawing.Size(146, 359);
641 | this.groupBox12.TabIndex = 39;
642 | this.groupBox12.TabStop = false;
643 | this.groupBox12.Text = "上传通讯录";
644 | //
645 | // btn_UpMobile
646 | //
647 | this.btn_UpMobile.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
648 | this.btn_UpMobile.Location = new System.Drawing.Point(6, 17);
649 | this.btn_UpMobile.Name = "btn_UpMobile";
650 | this.btn_UpMobile.Size = new System.Drawing.Size(130, 25);
651 | this.btn_UpMobile.TabIndex = 8;
652 | this.btn_UpMobile.Text = "上传通讯录";
653 | this.btn_UpMobile.UseVisualStyleBackColor = true;
654 | this.btn_UpMobile.Click += new System.EventHandler(this.btn_UpMobile_Click);
655 | //
656 | // groupBox15
657 | //
658 | this.groupBox15.Controls.Add(this.btn_AddFavItem);
659 | this.groupBox15.Controls.Add(this.btn_DelFavItem);
660 | this.groupBox15.Controls.Add(this.btn_GetFavItem);
661 | this.groupBox15.Controls.Add(this.btn_FavSync);
662 | this.groupBox15.Location = new System.Drawing.Point(338, 6);
663 | this.groupBox15.Name = "groupBox15";
664 | this.groupBox15.Size = new System.Drawing.Size(145, 362);
665 | this.groupBox15.TabIndex = 38;
666 | this.groupBox15.TabStop = false;
667 | this.groupBox15.Text = "个人收藏操作";
668 | //
669 | // btn_AddFavItem
670 | //
671 | this.btn_AddFavItem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
672 | this.btn_AddFavItem.Location = new System.Drawing.Point(6, 116);
673 | this.btn_AddFavItem.Name = "btn_AddFavItem";
674 | this.btn_AddFavItem.Size = new System.Drawing.Size(130, 25);
675 | this.btn_AddFavItem.TabIndex = 10;
676 | this.btn_AddFavItem.Text = "④添加单条收藏";
677 | this.btn_AddFavItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
678 | this.btn_AddFavItem.UseVisualStyleBackColor = true;
679 | this.btn_AddFavItem.Click += new System.EventHandler(this.btn_AddFavItem_Click);
680 | //
681 | // btn_DelFavItem
682 | //
683 | this.btn_DelFavItem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
684 | this.btn_DelFavItem.Location = new System.Drawing.Point(6, 85);
685 | this.btn_DelFavItem.Name = "btn_DelFavItem";
686 | this.btn_DelFavItem.Size = new System.Drawing.Size(130, 25);
687 | this.btn_DelFavItem.TabIndex = 9;
688 | this.btn_DelFavItem.Text = "③删除单条收藏";
689 | this.btn_DelFavItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
690 | this.btn_DelFavItem.UseVisualStyleBackColor = true;
691 | this.btn_DelFavItem.Click += new System.EventHandler(this.btn_DelFavItem_Click);
692 | //
693 | // btn_GetFavItem
694 | //
695 | this.btn_GetFavItem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
696 | this.btn_GetFavItem.Location = new System.Drawing.Point(6, 54);
697 | this.btn_GetFavItem.Name = "btn_GetFavItem";
698 | this.btn_GetFavItem.Size = new System.Drawing.Size(130, 25);
699 | this.btn_GetFavItem.TabIndex = 8;
700 | this.btn_GetFavItem.Text = "②获取单条收藏详细";
701 | this.btn_GetFavItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
702 | this.btn_GetFavItem.UseVisualStyleBackColor = true;
703 | this.btn_GetFavItem.Click += new System.EventHandler(this.btn_GetFavItem_Click);
704 | //
705 | // btn_FavSync
706 | //
707 | this.btn_FavSync.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
708 | this.btn_FavSync.Location = new System.Drawing.Point(6, 20);
709 | this.btn_FavSync.Name = "btn_FavSync";
710 | this.btn_FavSync.Size = new System.Drawing.Size(130, 25);
711 | this.btn_FavSync.TabIndex = 7;
712 | this.btn_FavSync.Text = "①同步个人收藏";
713 | this.btn_FavSync.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
714 | this.btn_FavSync.UseVisualStyleBackColor = true;
715 | this.btn_FavSync.Click += new System.EventHandler(this.btn_FavSync_Click);
716 | //
717 | // groupBox8
718 | //
719 | this.groupBox8.Controls.Add(this.button7);
720 | this.groupBox8.Controls.Add(this.btn_Add_Gh);
721 | this.groupBox8.Controls.Add(this.btn_SayHello);
722 | this.groupBox8.Controls.Add(this.btn_AcceptUser);
723 | this.groupBox8.Controls.Add(this.btn_AddUser);
724 | this.groupBox8.Location = new System.Drawing.Point(176, 6);
725 | this.groupBox8.Name = "groupBox8";
726 | this.groupBox8.Size = new System.Drawing.Size(145, 362);
727 | this.groupBox8.TabIndex = 37;
728 | this.groupBox8.TabStop = false;
729 | this.groupBox8.Text = "好友/公众号操作";
730 | //
731 | // button7
732 | //
733 | this.button7.Location = new System.Drawing.Point(6, 144);
734 | this.button7.Name = "button7";
735 | this.button7.Size = new System.Drawing.Size(130, 25);
736 | this.button7.TabIndex = 10;
737 | this.button7.Text = "获取好友详细";
738 | this.button7.UseVisualStyleBackColor = true;
739 | this.button7.Click += new System.EventHandler(this.button7_Click);
740 | //
741 | // btn_Add_Gh
742 | //
743 | this.btn_Add_Gh.Location = new System.Drawing.Point(6, 113);
744 | this.btn_Add_Gh.Name = "btn_Add_Gh";
745 | this.btn_Add_Gh.Size = new System.Drawing.Size(130, 25);
746 | this.btn_Add_Gh.TabIndex = 9;
747 | this.btn_Add_Gh.Text = "关注公众号";
748 | this.btn_Add_Gh.UseVisualStyleBackColor = true;
749 | this.btn_Add_Gh.Click += new System.EventHandler(this.btn_Add_Gh_Click);
750 | //
751 | // btn_SayHello
752 | //
753 | this.btn_SayHello.Location = new System.Drawing.Point(6, 82);
754 | this.btn_SayHello.Name = "btn_SayHello";
755 | this.btn_SayHello.Size = new System.Drawing.Size(130, 25);
756 | this.btn_SayHello.TabIndex = 8;
757 | this.btn_SayHello.Text = "发起打招呼";
758 | this.btn_SayHello.UseVisualStyleBackColor = true;
759 | this.btn_SayHello.Click += new System.EventHandler(this.btn_SayHello_Click);
760 | //
761 | // btn_AcceptUser
762 | //
763 | this.btn_AcceptUser.Location = new System.Drawing.Point(6, 51);
764 | this.btn_AcceptUser.Name = "btn_AcceptUser";
765 | this.btn_AcceptUser.Size = new System.Drawing.Size(130, 25);
766 | this.btn_AcceptUser.TabIndex = 7;
767 | this.btn_AcceptUser.Text = "接受好友请求";
768 | this.btn_AcceptUser.UseVisualStyleBackColor = true;
769 | this.btn_AcceptUser.Click += new System.EventHandler(this.btn_AcceptUser_Click);
770 | //
771 | // btn_AddUser
772 | //
773 | this.btn_AddUser.Location = new System.Drawing.Point(6, 20);
774 | this.btn_AddUser.Name = "btn_AddUser";
775 | this.btn_AddUser.Size = new System.Drawing.Size(130, 25);
776 | this.btn_AddUser.TabIndex = 6;
777 | this.btn_AddUser.Text = "添加用户";
778 | this.btn_AddUser.UseVisualStyleBackColor = true;
779 | this.btn_AddUser.Click += new System.EventHandler(this.btn_AddUser_Click);
780 | //
781 | // groupBox2
782 | //
783 | this.groupBox2.Controls.Add(this.btn_SetChatRoomAnnouncement);
784 | this.groupBox2.Controls.Add(this.btn_GetRoomDetail);
785 | this.groupBox2.Controls.Add(this.btn_DelChatRoomUser);
786 | this.groupBox2.Controls.Add(this.btn_AddChatRoomMember);
787 | this.groupBox2.Controls.Add(this.btn_CreateChatRoom);
788 | this.groupBox2.Location = new System.Drawing.Point(15, 6);
789 | this.groupBox2.Name = "groupBox2";
790 | this.groupBox2.Size = new System.Drawing.Size(146, 362);
791 | this.groupBox2.TabIndex = 36;
792 | this.groupBox2.TabStop = false;
793 | this.groupBox2.Text = "group";
794 | //
795 | // btn_SetChatRoomAnnouncement
796 | //
797 | this.btn_SetChatRoomAnnouncement.Location = new System.Drawing.Point(6, 135);
798 | this.btn_SetChatRoomAnnouncement.Name = "btn_SetChatRoomAnnouncement";
799 | this.btn_SetChatRoomAnnouncement.Size = new System.Drawing.Size(134, 25);
800 | this.btn_SetChatRoomAnnouncement.TabIndex = 33;
801 | this.btn_SetChatRoomAnnouncement.Text = "修改群公告";
802 | this.btn_SetChatRoomAnnouncement.UseVisualStyleBackColor = true;
803 | this.btn_SetChatRoomAnnouncement.Click += new System.EventHandler(this.btn_SetChatRoomAnnouncement_Click);
804 | //
805 | // btn_GetRoomDetail
806 | //
807 | this.btn_GetRoomDetail.Location = new System.Drawing.Point(7, 106);
808 | this.btn_GetRoomDetail.Name = "btn_GetRoomDetail";
809 | this.btn_GetRoomDetail.Size = new System.Drawing.Size(133, 23);
810 | this.btn_GetRoomDetail.TabIndex = 32;
811 | this.btn_GetRoomDetail.Text = "取群成员详细";
812 | this.btn_GetRoomDetail.UseVisualStyleBackColor = true;
813 | this.btn_GetRoomDetail.Click += new System.EventHandler(this.btn_GetRoomDetail_Click);
814 | //
815 | // btn_DelChatRoomUser
816 | //
817 | this.btn_DelChatRoomUser.Location = new System.Drawing.Point(7, 77);
818 | this.btn_DelChatRoomUser.Name = "btn_DelChatRoomUser";
819 | this.btn_DelChatRoomUser.Size = new System.Drawing.Size(133, 23);
820 | this.btn_DelChatRoomUser.TabIndex = 31;
821 | this.btn_DelChatRoomUser.Text = "删除群成员";
822 | this.btn_DelChatRoomUser.UseVisualStyleBackColor = true;
823 | this.btn_DelChatRoomUser.Click += new System.EventHandler(this.btn_DelChatRoomUser_Click);
824 | //
825 | // btn_AddChatRoomMember
826 | //
827 | this.btn_AddChatRoomMember.Location = new System.Drawing.Point(7, 49);
828 | this.btn_AddChatRoomMember.Name = "btn_AddChatRoomMember";
829 | this.btn_AddChatRoomMember.Size = new System.Drawing.Size(133, 23);
830 | this.btn_AddChatRoomMember.TabIndex = 30;
831 | this.btn_AddChatRoomMember.Text = "邀请好友";
832 | this.btn_AddChatRoomMember.UseVisualStyleBackColor = true;
833 | this.btn_AddChatRoomMember.Click += new System.EventHandler(this.btn_AddChatRoomMember_Click);
834 | //
835 | // btn_CreateChatRoom
836 | //
837 | this.btn_CreateChatRoom.Location = new System.Drawing.Point(7, 20);
838 | this.btn_CreateChatRoom.Name = "btn_CreateChatRoom";
839 | this.btn_CreateChatRoom.Size = new System.Drawing.Size(133, 23);
840 | this.btn_CreateChatRoom.TabIndex = 29;
841 | this.btn_CreateChatRoom.Text = "创建群";
842 | this.btn_CreateChatRoom.UseVisualStyleBackColor = true;
843 | this.btn_CreateChatRoom.Click += new System.EventHandler(this.btn_CreateChatRoom_Click);
844 | //
845 | // tabPage3
846 | //
847 | this.tabPage3.Controls.Add(this.groupBox11);
848 | this.tabPage3.Controls.Add(this.groupBox20);
849 | this.tabPage3.Location = new System.Drawing.Point(4, 22);
850 | this.tabPage3.Name = "tabPage3";
851 | this.tabPage3.Size = new System.Drawing.Size(639, 385);
852 | this.tabPage3.TabIndex = 2;
853 | this.tabPage3.Text = "支付类";
854 | this.tabPage3.UseVisualStyleBackColor = true;
855 | //
856 | // groupBox11
857 | //
858 | this.groupBox11.Controls.Add(this.btn_TenPay_TransferConfirm);
859 | this.groupBox11.Controls.Add(this.btn_TransferReq);
860 | this.groupBox11.Controls.Add(this.btn_GenPreTransferReq);
861 | this.groupBox11.Location = new System.Drawing.Point(159, 6);
862 | this.groupBox11.Name = "groupBox11";
863 | this.groupBox11.Size = new System.Drawing.Size(145, 115);
864 | this.groupBox11.TabIndex = 23;
865 | this.groupBox11.TabStop = false;
866 | this.groupBox11.Text = "转账";
867 | //
868 | // btn_TenPay_TransferConfirm
869 | //
870 | this.btn_TenPay_TransferConfirm.Location = new System.Drawing.Point(6, 82);
871 | this.btn_TenPay_TransferConfirm.Name = "btn_TenPay_TransferConfirm";
872 | this.btn_TenPay_TransferConfirm.Size = new System.Drawing.Size(130, 25);
873 | this.btn_TenPay_TransferConfirm.TabIndex = 8;
874 | this.btn_TenPay_TransferConfirm.Text = "确认收款";
875 | this.btn_TenPay_TransferConfirm.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
876 | this.btn_TenPay_TransferConfirm.UseVisualStyleBackColor = true;
877 | this.btn_TenPay_TransferConfirm.Click += new System.EventHandler(this.btn_TenPay_TransferConfirm_Click);
878 | //
879 | // btn_TransferReq
880 | //
881 | this.btn_TransferReq.Location = new System.Drawing.Point(6, 51);
882 | this.btn_TransferReq.Name = "btn_TransferReq";
883 | this.btn_TransferReq.Size = new System.Drawing.Size(130, 25);
884 | this.btn_TransferReq.TabIndex = 7;
885 | this.btn_TransferReq.Text = "②支付转账";
886 | this.btn_TransferReq.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
887 | this.btn_TransferReq.UseVisualStyleBackColor = true;
888 | this.btn_TransferReq.Click += new System.EventHandler(this.btn_TransferReq_Click);
889 | //
890 | // btn_GenPreTransferReq
891 | //
892 | this.btn_GenPreTransferReq.Location = new System.Drawing.Point(6, 20);
893 | this.btn_GenPreTransferReq.Name = "btn_GenPreTransferReq";
894 | this.btn_GenPreTransferReq.Size = new System.Drawing.Size(130, 25);
895 | this.btn_GenPreTransferReq.TabIndex = 6;
896 | this.btn_GenPreTransferReq.Text = "①创建转账";
897 | this.btn_GenPreTransferReq.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
898 | this.btn_GenPreTransferReq.UseVisualStyleBackColor = true;
899 | this.btn_GenPreTransferReq.Click += new System.EventHandler(this.btn_GenPreTransferReq_Click);
900 | //
901 | // groupBox20
902 | //
903 | this.groupBox20.Controls.Add(this.btn_Fetchauthen);
904 | this.groupBox20.Controls.Add(this.btn_GetBalance);
905 | this.groupBox20.Controls.Add(this.btn_Genprefetch);
906 | this.groupBox20.Controls.Add(this.btn_GetBlankID);
907 | this.groupBox20.Controls.Add(this.btn_F2ffee);
908 | this.groupBox20.Location = new System.Drawing.Point(8, 6);
909 | this.groupBox20.Name = "groupBox20";
910 | this.groupBox20.Size = new System.Drawing.Size(145, 180);
911 | this.groupBox20.TabIndex = 22;
912 | this.groupBox20.TabStop = false;
913 | this.groupBox20.Text = "钱包";
914 | this.groupBox20.Enter += new System.EventHandler(this.groupBox20_Enter);
915 | //
916 | // btn_Fetchauthen
917 | //
918 | this.btn_Fetchauthen.Enabled = false;
919 | this.btn_Fetchauthen.Location = new System.Drawing.Point(6, 144);
920 | this.btn_Fetchauthen.Name = "btn_Fetchauthen";
921 | this.btn_Fetchauthen.Size = new System.Drawing.Size(130, 25);
922 | this.btn_Fetchauthen.TabIndex = 18;
923 | this.btn_Fetchauthen.Text = "②确认提现";
924 | this.btn_Fetchauthen.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
925 | this.btn_Fetchauthen.UseVisualStyleBackColor = true;
926 | //
927 | // btn_GetBalance
928 | //
929 | this.btn_GetBalance.Location = new System.Drawing.Point(6, 20);
930 | this.btn_GetBalance.Name = "btn_GetBalance";
931 | this.btn_GetBalance.Size = new System.Drawing.Size(130, 25);
932 | this.btn_GetBalance.TabIndex = 16;
933 | this.btn_GetBalance.Text = "获取余额及绑卡信息";
934 | this.btn_GetBalance.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
935 | this.btn_GetBalance.UseVisualStyleBackColor = true;
936 | this.btn_GetBalance.Click += new System.EventHandler(this.btn_GetBalance_Click_1);
937 | //
938 | // btn_Genprefetch
939 | //
940 | this.btn_Genprefetch.Enabled = false;
941 | this.btn_Genprefetch.Location = new System.Drawing.Point(6, 113);
942 | this.btn_Genprefetch.Name = "btn_Genprefetch";
943 | this.btn_Genprefetch.Size = new System.Drawing.Size(130, 25);
944 | this.btn_Genprefetch.TabIndex = 17;
945 | this.btn_Genprefetch.Text = "①创建提现订单";
946 | this.btn_Genprefetch.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
947 | this.btn_Genprefetch.UseVisualStyleBackColor = true;
948 | //
949 | // btn_GetBlankID
950 | //
951 | this.btn_GetBlankID.Location = new System.Drawing.Point(6, 82);
952 | this.btn_GetBlankID.Name = "btn_GetBlankID";
953 | this.btn_GetBlankID.Size = new System.Drawing.Size(130, 25);
954 | this.btn_GetBlankID.TabIndex = 12;
955 | this.btn_GetBlankID.Text = "获取银行卡ID";
956 | this.btn_GetBlankID.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
957 | this.btn_GetBlankID.UseVisualStyleBackColor = true;
958 | //
959 | // btn_F2ffee
960 | //
961 | this.btn_F2ffee.Location = new System.Drawing.Point(6, 51);
962 | this.btn_F2ffee.Name = "btn_F2ffee";
963 | this.btn_F2ffee.Size = new System.Drawing.Size(130, 25);
964 | this.btn_F2ffee.TabIndex = 17;
965 | this.btn_F2ffee.Text = "自定义生成金额二维码";
966 | this.btn_F2ffee.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
967 | this.btn_F2ffee.UseVisualStyleBackColor = true;
968 | this.btn_F2ffee.Click += new System.EventHandler(this.btn_F2ffee_Click);
969 | //
970 | // tabPage4
971 | //
972 | this.tabPage4.Controls.Add(this.groupBox10);
973 | this.tabPage4.Controls.Add(this.groupBox16);
974 | this.tabPage4.Controls.Add(this.groupBox9);
975 | this.tabPage4.Controls.Add(this.groupBox18);
976 | this.tabPage4.Controls.Add(this.groupBox13);
977 | this.tabPage4.Controls.Add(this.groupBox19);
978 | this.tabPage4.Location = new System.Drawing.Point(4, 22);
979 | this.tabPage4.Name = "tabPage4";
980 | this.tabPage4.Size = new System.Drawing.Size(639, 385);
981 | this.tabPage4.TabIndex = 3;
982 | this.tabPage4.Text = "功能操作";
983 | this.tabPage4.UseVisualStyleBackColor = true;
984 | this.tabPage4.Click += new System.EventHandler(this.tabPage4_Click);
985 | //
986 | // groupBox10
987 | //
988 | this.groupBox10.Controls.Add(this.button8);
989 | this.groupBox10.Controls.Add(this.btn_Bindmolie_yzcode);
990 | this.groupBox10.Controls.Add(this.btn_BindMobile_getcode);
991 | this.groupBox10.Location = new System.Drawing.Point(186, 234);
992 | this.groupBox10.Name = "groupBox10";
993 | this.groupBox10.Size = new System.Drawing.Size(145, 134);
994 | this.groupBox10.TabIndex = 61;
995 | this.groupBox10.TabStop = false;
996 | this.groupBox10.Text = "绑定号码";
997 | //
998 | // button8
999 | //
1000 | this.button8.Location = new System.Drawing.Point(9, 81);
1001 | this.button8.Name = "button8";
1002 | this.button8.Size = new System.Drawing.Size(130, 25);
1003 | this.button8.TabIndex = 57;
1004 | this.button8.Text = "解绑手机号";
1005 | this.button8.UseVisualStyleBackColor = true;
1006 | this.button8.Click += new System.EventHandler(this.button8_Click);
1007 | //
1008 | // btn_Bindmolie_yzcode
1009 | //
1010 | this.btn_Bindmolie_yzcode.Location = new System.Drawing.Point(9, 50);
1011 | this.btn_Bindmolie_yzcode.Name = "btn_Bindmolie_yzcode";
1012 | this.btn_Bindmolie_yzcode.Size = new System.Drawing.Size(130, 25);
1013 | this.btn_Bindmolie_yzcode.TabIndex = 56;
1014 | this.btn_Bindmolie_yzcode.Text = "绑定手机号";
1015 | this.btn_Bindmolie_yzcode.UseVisualStyleBackColor = true;
1016 | this.btn_Bindmolie_yzcode.Click += new System.EventHandler(this.btn_Bindmolie_yzcode_Click);
1017 | //
1018 | // btn_BindMobile_getcode
1019 | //
1020 | this.btn_BindMobile_getcode.Location = new System.Drawing.Point(9, 20);
1021 | this.btn_BindMobile_getcode.Name = "btn_BindMobile_getcode";
1022 | this.btn_BindMobile_getcode.Size = new System.Drawing.Size(130, 25);
1023 | this.btn_BindMobile_getcode.TabIndex = 55;
1024 | this.btn_BindMobile_getcode.Text = "获取验证码";
1025 | this.btn_BindMobile_getcode.UseVisualStyleBackColor = true;
1026 | this.btn_BindMobile_getcode.Click += new System.EventHandler(this.btn_BindMobile_getcode_Click);
1027 | //
1028 | // groupBox16
1029 | //
1030 | this.groupBox16.Controls.Add(this.btn_setPwd);
1031 | this.groupBox16.Controls.Add(this.btn_verifyPwd);
1032 | this.groupBox16.Location = new System.Drawing.Point(15, 234);
1033 | this.groupBox16.Name = "groupBox16";
1034 | this.groupBox16.Size = new System.Drawing.Size(145, 85);
1035 | this.groupBox16.TabIndex = 60;
1036 | this.groupBox16.TabStop = false;
1037 | this.groupBox16.Text = "修改密码";
1038 | //
1039 | // btn_setPwd
1040 | //
1041 | this.btn_setPwd.Location = new System.Drawing.Point(6, 51);
1042 | this.btn_setPwd.Name = "btn_setPwd";
1043 | this.btn_setPwd.Size = new System.Drawing.Size(130, 25);
1044 | this.btn_setPwd.TabIndex = 7;
1045 | this.btn_setPwd.Text = "修改密码";
1046 | this.btn_setPwd.UseVisualStyleBackColor = true;
1047 | this.btn_setPwd.Click += new System.EventHandler(this.btn_setPwd_Click);
1048 | //
1049 | // btn_verifyPwd
1050 | //
1051 | this.btn_verifyPwd.Location = new System.Drawing.Point(6, 20);
1052 | this.btn_verifyPwd.Name = "btn_verifyPwd";
1053 | this.btn_verifyPwd.Size = new System.Drawing.Size(130, 25);
1054 | this.btn_verifyPwd.TabIndex = 6;
1055 | this.btn_verifyPwd.Text = "验证密码";
1056 | this.btn_verifyPwd.UseVisualStyleBackColor = true;
1057 | this.btn_verifyPwd.Click += new System.EventHandler(this.btn_verifyPwd_Click);
1058 | //
1059 | // groupBox9
1060 | //
1061 | this.groupBox9.Controls.Add(this.Btn_DataLogin);
1062 | this.groupBox9.Location = new System.Drawing.Point(498, 11);
1063 | this.groupBox9.Name = "groupBox9";
1064 | this.groupBox9.Size = new System.Drawing.Size(130, 183);
1065 | this.groupBox9.TabIndex = 59;
1066 | this.groupBox9.TabStop = false;
1067 | this.groupBox9.Text = "登录";
1068 | //
1069 | // Btn_DataLogin
1070 | //
1071 | this.Btn_DataLogin.Location = new System.Drawing.Point(6, 23);
1072 | this.Btn_DataLogin.Name = "Btn_DataLogin";
1073 | this.Btn_DataLogin.Size = new System.Drawing.Size(120, 25);
1074 | this.Btn_DataLogin.TabIndex = 55;
1075 | this.Btn_DataLogin.Text = "62数据登录";
1076 | this.Btn_DataLogin.UseVisualStyleBackColor = true;
1077 | this.Btn_DataLogin.Click += new System.EventHandler(this.Btn_DataLogin_Click);
1078 | //
1079 | // groupBox18
1080 | //
1081 | this.groupBox18.Controls.Add(this.button6);
1082 | this.groupBox18.Controls.Add(this.btn_ZC);
1083 | this.groupBox18.Controls.Add(this.btn_NewReg);
1084 | this.groupBox18.Controls.Add(this.btn_ChackSmsCode);
1085 | this.groupBox18.Controls.Add(this.btn_GetSms);
1086 | this.groupBox18.Location = new System.Drawing.Point(347, 12);
1087 | this.groupBox18.Name = "groupBox18";
1088 | this.groupBox18.Size = new System.Drawing.Size(145, 182);
1089 | this.groupBox18.TabIndex = 58;
1090 | this.groupBox18.TabStop = false;
1091 | this.groupBox18.Text = "注册/验证";
1092 | //
1093 | // button6
1094 | //
1095 | this.button6.Location = new System.Drawing.Point(9, 114);
1096 | this.button6.Name = "button6";
1097 | this.button6.Size = new System.Drawing.Size(130, 25);
1098 | this.button6.TabIndex = 58;
1099 | this.button6.Text = "验证短信验证码";
1100 | this.button6.UseVisualStyleBackColor = true;
1101 | this.button6.Click += new System.EventHandler(this.button6_Click);
1102 | //
1103 | // btn_ZC
1104 | //
1105 | this.btn_ZC.Location = new System.Drawing.Point(9, 53);
1106 | this.btn_ZC.Name = "btn_ZC";
1107 | this.btn_ZC.Size = new System.Drawing.Size(130, 25);
1108 | this.btn_ZC.TabIndex = 57;
1109 | this.btn_ZC.Text = "获取zc码";
1110 | this.btn_ZC.UseVisualStyleBackColor = true;
1111 | this.btn_ZC.Click += new System.EventHandler(this.btn_ZC_Click);
1112 | //
1113 | // btn_NewReg
1114 | //
1115 | this.btn_NewReg.Location = new System.Drawing.Point(9, 144);
1116 | this.btn_NewReg.Name = "btn_NewReg";
1117 | this.btn_NewReg.Size = new System.Drawing.Size(130, 25);
1118 | this.btn_NewReg.TabIndex = 56;
1119 | this.btn_NewReg.Text = "注册";
1120 | this.btn_NewReg.UseVisualStyleBackColor = true;
1121 | this.btn_NewReg.Click += new System.EventHandler(this.btn_NewReg_Click);
1122 | //
1123 | // btn_ChackSmsCode
1124 | //
1125 | this.btn_ChackSmsCode.Location = new System.Drawing.Point(9, 83);
1126 | this.btn_ChackSmsCode.Name = "btn_ChackSmsCode";
1127 | this.btn_ChackSmsCode.Size = new System.Drawing.Size(130, 25);
1128 | this.btn_ChackSmsCode.TabIndex = 55;
1129 | this.btn_ChackSmsCode.Text = "已发送短信";
1130 | this.btn_ChackSmsCode.UseVisualStyleBackColor = true;
1131 | this.btn_ChackSmsCode.Click += new System.EventHandler(this.btn_ChackSmsCode_Click);
1132 | //
1133 | // btn_GetSms
1134 | //
1135 | this.btn_GetSms.Location = new System.Drawing.Point(9, 22);
1136 | this.btn_GetSms.Name = "btn_GetSms";
1137 | this.btn_GetSms.Size = new System.Drawing.Size(130, 25);
1138 | this.btn_GetSms.TabIndex = 54;
1139 | this.btn_GetSms.Text = "获取滑块";
1140 | this.btn_GetSms.UseVisualStyleBackColor = true;
1141 | this.btn_GetSms.Click += new System.EventHandler(this.btn_GetSms_Click);
1142 | //
1143 | // groupBox13
1144 | //
1145 | this.groupBox13.Controls.Add(this.btn_deviceLogins);
1146 | this.groupBox13.Controls.Add(this.btn_loginBySms);
1147 | this.groupBox13.Controls.Add(this.button3);
1148 | this.groupBox13.Controls.Add(this.btn_logoutweb);
1149 | this.groupBox13.Controls.Add(this.btn_GetLoginSmsCodes);
1150 | this.groupBox13.Controls.Add(this.btn_PushUrlLogin);
1151 | this.groupBox13.Location = new System.Drawing.Point(186, 12);
1152 | this.groupBox13.Name = "groupBox13";
1153 | this.groupBox13.Size = new System.Drawing.Size(145, 210);
1154 | this.groupBox13.TabIndex = 57;
1155 | this.groupBox13.TabStop = false;
1156 | this.groupBox13.Text = "其他方式登录";
1157 | this.groupBox13.Enter += new System.EventHandler(this.groupBox13_Enter);
1158 | //
1159 | // btn_deviceLogins
1160 | //
1161 | this.btn_deviceLogins.Location = new System.Drawing.Point(6, 174);
1162 | this.btn_deviceLogins.Name = "btn_deviceLogins";
1163 | this.btn_deviceLogins.Size = new System.Drawing.Size(130, 25);
1164 | this.btn_deviceLogins.TabIndex = 52;
1165 | this.btn_deviceLogins.Text = "多终端登陆";
1166 | this.btn_deviceLogins.UseVisualStyleBackColor = true;
1167 | this.btn_deviceLogins.Click += new System.EventHandler(this.btn_deviceLogins_Click);
1168 | //
1169 | // btn_loginBySms
1170 | //
1171 | this.btn_loginBySms.Location = new System.Drawing.Point(6, 82);
1172 | this.btn_loginBySms.Name = "btn_loginBySms";
1173 | this.btn_loginBySms.Size = new System.Drawing.Size(130, 25);
1174 | this.btn_loginBySms.TabIndex = 42;
1175 | this.btn_loginBySms.Text = "确认登陆";
1176 | this.btn_loginBySms.UseVisualStyleBackColor = true;
1177 | this.btn_loginBySms.Click += new System.EventHandler(this.btn_loginBySms_Click);
1178 | //
1179 | // button3
1180 | //
1181 | this.button3.Location = new System.Drawing.Point(6, 51);
1182 | this.button3.Name = "button3";
1183 | this.button3.Size = new System.Drawing.Size(130, 25);
1184 | this.button3.TabIndex = 41;
1185 | this.button3.Text = "验证登陆短信";
1186 | this.button3.UseVisualStyleBackColor = true;
1187 | this.button3.Click += new System.EventHandler(this.button3_Click);
1188 | //
1189 | // btn_logoutweb
1190 | //
1191 | this.btn_logoutweb.Location = new System.Drawing.Point(6, 144);
1192 | this.btn_logoutweb.Name = "btn_logoutweb";
1193 | this.btn_logoutweb.Size = new System.Drawing.Size(130, 25);
1194 | this.btn_logoutweb.TabIndex = 50;
1195 | this.btn_logoutweb.Text = "退出IPad端/PC端网页端微信";
1196 | this.btn_logoutweb.UseVisualStyleBackColor = true;
1197 | this.btn_logoutweb.Click += new System.EventHandler(this.btn_logoutweb_Click);
1198 | //
1199 | // btn_GetLoginSmsCodes
1200 | //
1201 | this.btn_GetLoginSmsCodes.Location = new System.Drawing.Point(6, 20);
1202 | this.btn_GetLoginSmsCodes.Name = "btn_GetLoginSmsCodes";
1203 | this.btn_GetLoginSmsCodes.Size = new System.Drawing.Size(130, 25);
1204 | this.btn_GetLoginSmsCodes.TabIndex = 40;
1205 | this.btn_GetLoginSmsCodes.Text = "获取登陆短信";
1206 | this.btn_GetLoginSmsCodes.UseVisualStyleBackColor = true;
1207 | this.btn_GetLoginSmsCodes.Click += new System.EventHandler(this.btn_GetLoginSmsCodes_Click);
1208 | //
1209 | // btn_PushUrlLogin
1210 | //
1211 | this.btn_PushUrlLogin.Location = new System.Drawing.Point(6, 113);
1212 | this.btn_PushUrlLogin.Name = "btn_PushUrlLogin";
1213 | this.btn_PushUrlLogin.Size = new System.Drawing.Size(130, 25);
1214 | this.btn_PushUrlLogin.TabIndex = 46;
1215 | this.btn_PushUrlLogin.Text = "手机登陆";
1216 | this.btn_PushUrlLogin.UseVisualStyleBackColor = true;
1217 | this.btn_PushUrlLogin.Click += new System.EventHandler(this.btn_PushUrlLogin_Click);
1218 | //
1219 | // groupBox19
1220 | //
1221 | this.groupBox19.Controls.Add(this.btn_logout);
1222 | this.groupBox19.Controls.Add(this.btn_SyncCheck);
1223 | this.groupBox19.Controls.Add(this.btn_AutoAuth);
1224 | this.groupBox19.Controls.Add(this.btn_Sync);
1225 | this.groupBox19.Controls.Add(this.btn_NewInit);
1226 | this.groupBox19.Controls.Add(this.button2);
1227 | this.groupBox19.Location = new System.Drawing.Point(15, 12);
1228 | this.groupBox19.Name = "groupBox19";
1229 | this.groupBox19.Size = new System.Drawing.Size(145, 205);
1230 | this.groupBox19.TabIndex = 56;
1231 | this.groupBox19.TabStop = false;
1232 | this.groupBox19.Text = "基本功能";
1233 | //
1234 | // btn_logout
1235 | //
1236 | this.btn_logout.Location = new System.Drawing.Point(6, 144);
1237 | this.btn_logout.Name = "btn_logout";
1238 | this.btn_logout.Size = new System.Drawing.Size(130, 25);
1239 | this.btn_logout.TabIndex = 51;
1240 | this.btn_logout.Text = "退出登录";
1241 | this.btn_logout.UseVisualStyleBackColor = true;
1242 | this.btn_logout.Click += new System.EventHandler(this.btn_logout_Click);
1243 | //
1244 | // btn_SyncCheck
1245 | //
1246 | this.btn_SyncCheck.Location = new System.Drawing.Point(6, 82);
1247 | this.btn_SyncCheck.Name = "btn_SyncCheck";
1248 | this.btn_SyncCheck.Size = new System.Drawing.Size(130, 25);
1249 | this.btn_SyncCheck.TabIndex = 49;
1250 | this.btn_SyncCheck.Text = "心跳包";
1251 | this.btn_SyncCheck.UseVisualStyleBackColor = true;
1252 | this.btn_SyncCheck.Click += new System.EventHandler(this.btn_SyncCheck_Click);
1253 | //
1254 | // btn_AutoAuth
1255 | //
1256 | this.btn_AutoAuth.Location = new System.Drawing.Point(6, 174);
1257 | this.btn_AutoAuth.Name = "btn_AutoAuth";
1258 | this.btn_AutoAuth.Size = new System.Drawing.Size(130, 25);
1259 | this.btn_AutoAuth.TabIndex = 48;
1260 | this.btn_AutoAuth.Text = "二次登陆";
1261 | this.btn_AutoAuth.UseVisualStyleBackColor = true;
1262 | this.btn_AutoAuth.Click += new System.EventHandler(this.btn_AutoAuth_Click);
1263 | //
1264 | // btn_Sync
1265 | //
1266 | this.btn_Sync.Location = new System.Drawing.Point(6, 51);
1267 | this.btn_Sync.Name = "btn_Sync";
1268 | this.btn_Sync.Size = new System.Drawing.Size(130, 25);
1269 | this.btn_Sync.TabIndex = 47;
1270 | this.btn_Sync.Text = "Sync同步消息";
1271 | this.btn_Sync.UseVisualStyleBackColor = true;
1272 | this.btn_Sync.Click += new System.EventHandler(this.btn_Sync_Click);
1273 | //
1274 | // btn_NewInit
1275 | //
1276 | this.btn_NewInit.Location = new System.Drawing.Point(6, 20);
1277 | this.btn_NewInit.Name = "btn_NewInit";
1278 | this.btn_NewInit.Size = new System.Drawing.Size(130, 25);
1279 | this.btn_NewInit.TabIndex = 46;
1280 | this.btn_NewInit.Text = "NewInit初始化";
1281 | this.btn_NewInit.UseVisualStyleBackColor = true;
1282 | this.btn_NewInit.Click += new System.EventHandler(this.btn_NewInit_Click);
1283 | //
1284 | // button2
1285 | //
1286 | this.button2.Location = new System.Drawing.Point(6, 113);
1287 | this.button2.Name = "button2";
1288 | this.button2.Size = new System.Drawing.Size(130, 25);
1289 | this.button2.TabIndex = 40;
1290 | this.button2.Text = "拉取通讯录(精准)";
1291 | this.button2.UseVisualStyleBackColor = true;
1292 | this.button2.Click += new System.EventHandler(this.button2_Click);
1293 | //
1294 | // label4
1295 | //
1296 | this.label4.AutoSize = true;
1297 | this.label4.Location = new System.Drawing.Point(184, 139);
1298 | this.label4.Name = "label4";
1299 | this.label4.Size = new System.Drawing.Size(77, 12);
1300 | this.label4.TabIndex = 42;
1301 | this.label4.Text = "AtUserLists:";
1302 | //
1303 | // tb_AtUserlist
1304 | //
1305 | this.tb_AtUserlist.Location = new System.Drawing.Point(267, 139);
1306 | this.tb_AtUserlist.Name = "tb_AtUserlist";
1307 | this.tb_AtUserlist.Size = new System.Drawing.Size(232, 21);
1308 | this.tb_AtUserlist.TabIndex = 41;
1309 | this.tb_AtUserlist.Text = "jp2799376";
1310 | //
1311 | // textBox1
1312 | //
1313 | this.textBox1.Location = new System.Drawing.Point(516, 82);
1314 | this.textBox1.Name = "textBox1";
1315 | this.textBox1.Size = new System.Drawing.Size(100, 21);
1316 | this.textBox1.TabIndex = 43;
1317 | //
1318 | // Form1
1319 | //
1320 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
1321 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
1322 | this.ClientSize = new System.Drawing.Size(960, 578);
1323 | this.Controls.Add(this.textBox1);
1324 | this.Controls.Add(this.label4);
1325 | this.Controls.Add(this.tb_AtUserlist);
1326 | this.Controls.Add(this.tabControl1);
1327 | this.Controls.Add(this.label3);
1328 | this.Controls.Add(this.tb_ToUsername);
1329 | this.Controls.Add(this.button1);
1330 | this.Controls.Add(this.tb_Content);
1331 | this.Controls.Add(this.btn_GetQrcode);
1332 | this.Controls.Add(this.pB_Qrcode);
1333 | this.Controls.Add(this.groupBox3);
1334 | this.Name = "Form1";
1335 | this.Text = "Form1";
1336 | this.Load += new System.EventHandler(this.Form1_Load);
1337 | ((System.ComponentModel.ISupportInitialize)(this.pB_Qrcode)).EndInit();
1338 | this.groupBox3.ResumeLayout(false);
1339 | this.tabControl1.ResumeLayout(false);
1340 | this.tabPage1.ResumeLayout(false);
1341 | this.groupBox7.ResumeLayout(false);
1342 | this.groupBox6.ResumeLayout(false);
1343 | this.groupBox4.ResumeLayout(false);
1344 | this.groupBox5.ResumeLayout(false);
1345 | this.groupBox1.ResumeLayout(false);
1346 | this.tabPage2.ResumeLayout(false);
1347 | this.groupBox12.ResumeLayout(false);
1348 | this.groupBox15.ResumeLayout(false);
1349 | this.groupBox8.ResumeLayout(false);
1350 | this.groupBox2.ResumeLayout(false);
1351 | this.tabPage3.ResumeLayout(false);
1352 | this.groupBox11.ResumeLayout(false);
1353 | this.groupBox20.ResumeLayout(false);
1354 | this.tabPage4.ResumeLayout(false);
1355 | this.groupBox10.ResumeLayout(false);
1356 | this.groupBox16.ResumeLayout(false);
1357 | this.groupBox9.ResumeLayout(false);
1358 | this.groupBox18.ResumeLayout(false);
1359 | this.groupBox13.ResumeLayout(false);
1360 | this.groupBox19.ResumeLayout(false);
1361 | this.ResumeLayout(false);
1362 | this.PerformLayout();
1363 |
1364 | }
1365 |
1366 | #endregion
1367 |
1368 | private System.Windows.Forms.Button btn_GetQrcode;
1369 | private System.Windows.Forms.PictureBox pB_Qrcode;
1370 | private System.Windows.Forms.GroupBox groupBox3;
1371 | private System.Windows.Forms.RichTextBox rtb_Msg;
1372 | private System.Windows.Forms.TextBox tb_Content;
1373 | private System.Windows.Forms.Button button1;
1374 | private System.Windows.Forms.Label label3;
1375 | private System.Windows.Forms.TextBox tb_ToUsername;
1376 | private System.Windows.Forms.TabControl tabControl1;
1377 | private System.Windows.Forms.TabPage tabPage1;
1378 | private System.Windows.Forms.GroupBox groupBox6;
1379 | private System.Windows.Forms.Button btn_lbsfind;
1380 | private System.Windows.Forms.GroupBox groupBox4;
1381 | private System.Windows.Forms.Button btn_SendVoice;
1382 | private System.Windows.Forms.Button btn_SendMsgimg;
1383 | private System.Windows.Forms.GroupBox groupBox5;
1384 | private System.Windows.Forms.Button btn_SnsPost;
1385 | private System.Windows.Forms.Button btn_SnsObjectOp;
1386 | private System.Windows.Forms.Button btn_SnsTimeLine;
1387 | private System.Windows.Forms.Button btn_SnsUserPage;
1388 | private System.Windows.Forms.GroupBox groupBox1;
1389 | private System.Windows.Forms.Button btn_SearchContact;
1390 | private System.Windows.Forms.Button btn_initcontact;
1391 | private System.Windows.Forms.Button btn_get;
1392 | private System.Windows.Forms.Button btn_GetA8Key;
1393 | private System.Windows.Forms.Button btn_GetLabelList;
1394 | private System.Windows.Forms.TabPage tabPage2;
1395 | private System.Windows.Forms.GroupBox groupBox2;
1396 | private System.Windows.Forms.Button btn_GetRoomDetail;
1397 | private System.Windows.Forms.Button btn_DelChatRoomUser;
1398 | private System.Windows.Forms.Button btn_AddChatRoomMember;
1399 | private System.Windows.Forms.Button btn_CreateChatRoom;
1400 | private System.Windows.Forms.TabPage tabPage4;
1401 | private System.Windows.Forms.TabPage tabPage3;
1402 | private System.Windows.Forms.GroupBox groupBox20;
1403 | private System.Windows.Forms.Button btn_Fetchauthen;
1404 | private System.Windows.Forms.Button btn_GetBalance;
1405 | private System.Windows.Forms.Button btn_Genprefetch;
1406 | private System.Windows.Forms.Button btn_GetBlankID;
1407 | private System.Windows.Forms.Button btn_F2ffee;
1408 | private System.Windows.Forms.GroupBox groupBox11;
1409 | private System.Windows.Forms.Button btn_TenPay_TransferConfirm;
1410 | private System.Windows.Forms.Button btn_TransferReq;
1411 | private System.Windows.Forms.Button btn_GenPreTransferReq;
1412 | private System.Windows.Forms.Label label4;
1413 | private System.Windows.Forms.TextBox tb_AtUserlist;
1414 | private System.Windows.Forms.Button btn_shakeGet;
1415 | private System.Windows.Forms.GroupBox groupBox19;
1416 | private System.Windows.Forms.Button btn_logout;
1417 | private System.Windows.Forms.Button btn_SyncCheck;
1418 | private System.Windows.Forms.Button btn_AutoAuth;
1419 | private System.Windows.Forms.Button btn_Sync;
1420 | private System.Windows.Forms.Button btn_NewInit;
1421 | private System.Windows.Forms.Button button2;
1422 | private System.Windows.Forms.Button btn_SnsSync;
1423 | private System.Windows.Forms.Button btn_GetContact;
1424 | private System.Windows.Forms.GroupBox groupBox15;
1425 | private System.Windows.Forms.Button btn_AddFavItem;
1426 | private System.Windows.Forms.Button btn_DelFavItem;
1427 | private System.Windows.Forms.Button btn_GetFavItem;
1428 | private System.Windows.Forms.Button btn_FavSync;
1429 | private System.Windows.Forms.Button btn_SendMsg;
1430 | private System.Windows.Forms.GroupBox groupBox7;
1431 | private System.Windows.Forms.Button btn_ModifyLabelList;
1432 | private System.Windows.Forms.Button btn_AddLabel;
1433 | private System.Windows.Forms.Button btn_DelContactLabel;
1434 | private System.Windows.Forms.Button btn_SnsUpload;
1435 | private System.Windows.Forms.Button btn_SendCardMsg;
1436 | private System.Windows.Forms.Button btn_SendAppMsg;
1437 | private System.Windows.Forms.Button btn_SetChatRoomAnnouncement;
1438 | private System.Windows.Forms.Button btn_downloadMsgimg;
1439 | private System.Windows.Forms.TextBox textBox1;
1440 | private System.Windows.Forms.Button btn_BindEail;
1441 | private System.Windows.Forms.GroupBox groupBox13;
1442 | private System.Windows.Forms.Button btn_deviceLogins;
1443 | private System.Windows.Forms.Button btn_loginBySms;
1444 | private System.Windows.Forms.Button button3;
1445 | private System.Windows.Forms.Button btn_logoutweb;
1446 | private System.Windows.Forms.Button btn_GetLoginSmsCodes;
1447 | private System.Windows.Forms.Button btn_PushUrlLogin;
1448 | private System.Windows.Forms.GroupBox groupBox18;
1449 | private System.Windows.Forms.Button btn_ZC;
1450 | private System.Windows.Forms.Button btn_NewReg;
1451 | private System.Windows.Forms.Button btn_ChackSmsCode;
1452 | private System.Windows.Forms.Button btn_SendCDnimg;
1453 | private System.Windows.Forms.Button button4;
1454 | private System.Windows.Forms.Button button5;
1455 | private System.Windows.Forms.GroupBox groupBox9;
1456 | private System.Windows.Forms.Button Btn_DataLogin;
1457 | private System.Windows.Forms.GroupBox groupBox16;
1458 | private System.Windows.Forms.Button btn_setPwd;
1459 | private System.Windows.Forms.Button btn_verifyPwd;
1460 | private System.Windows.Forms.Button button6;
1461 | private System.Windows.Forms.GroupBox groupBox8;
1462 | private System.Windows.Forms.Button button7;
1463 | private System.Windows.Forms.Button btn_Add_Gh;
1464 | private System.Windows.Forms.Button btn_SayHello;
1465 | private System.Windows.Forms.Button btn_AcceptUser;
1466 | private System.Windows.Forms.Button btn_AddUser;
1467 | private System.Windows.Forms.GroupBox groupBox10;
1468 | private System.Windows.Forms.Button btn_BindMobile_getcode;
1469 | private System.Windows.Forms.Button btn_GetSms;
1470 | private System.Windows.Forms.Button btn_Bindmolie_yzcode;
1471 | private System.Windows.Forms.Button button8;
1472 | private System.Windows.Forms.GroupBox groupBox12;
1473 | private System.Windows.Forms.Button btn_UpMobile;
1474 | }
1475 | }
1476 |
1477 |
--------------------------------------------------------------------------------
/Wechat/Form1.cs:
--------------------------------------------------------------------------------
1 | using CRYPT;
2 | using MMPro;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.ComponentModel;
6 | using System.Data;
7 | using System.Diagnostics;
8 | using System.Drawing;
9 | using System.IO;
10 | using System.Linq;
11 | using System.Text;
12 | using System.Threading.Tasks;
13 | using System.Windows.Forms;
14 | using Wchat;
15 | using Newtonsoft.Json;
16 | namespace Wechat
17 | {
18 | public partial class Form1 : Form
19 | {
20 |
21 | public Xcode wechat = new Xcode();
22 |
23 | public string uuid = "";
24 |
25 | public byte[] Key = new byte[0];
26 |
27 | public string MyWxid = "";
28 |
29 | public byte[] Sync = new byte[0];
30 |
31 | public int currentWxcontactSeq = 0;
32 |
33 | public byte[] authKey = new byte[0];
34 | public Form1()
35 | {
36 | InitializeComponent();
37 |
38 |
39 | }
40 |
41 | private void btn_GetQrcode_Click(object sender, EventArgs e)
42 | {
43 | Action action = () =>
44 | {
45 |
46 | var GetLoignQrcode = wechat.GetLoginQRcode();
47 |
48 | //put(JsonConvert.SerializeObject(GetLoignQrcode));
49 | if (GetLoignQrcode.baseResponse.ret == MMPro.MM.RetConst.MM_OK)
50 | {
51 | uuid = GetLoignQrcode.uuid;
52 |
53 | Key = GetLoignQrcode.AESKey.key;
54 | if (GetLoignQrcode.qRCode.len > 0)
55 | pB_Qrcode.Image = Image.FromStream(new MemoryStream(GetLoignQrcode.qRCode.src));
56 | checkLogin(uuid);
57 | Console.WriteLine(uuid);
58 | }
59 | else
60 | {
61 | rtb_Msg.AppendText("获取二维码失败!");
62 | }
63 |
64 |
65 |
66 | };
67 |
68 | action.BeginInvoke(new AsyncCallback((IAsyncResult result) =>
69 | {
70 |
71 | rtb_Msg.BeginInvoke(new Action(() => rtb_Msg.AppendText("已确认 等待登陆")));
72 |
73 | //
74 | }), null);
75 | }
76 |
77 | private void checkLogin(string uuid)
78 | {
79 | var CheckLogin = wechat.CheckLoginQRCode(uuid);
80 | // Console.WriteLine(CheckLogin.baseResponse.ret);
81 | if (CheckLogin == null) { return; }
82 | if (CheckLogin.baseResponse.ret == MMPro.MM.RetConst.MM_OK)
83 | {
84 | var asd = CheckLogin.data.notifyData.buffer.ToString(16, 2);
85 | var __ = Util.nouncompress_aes(CheckLogin.data.notifyData.buffer, Key);
86 | var r = Util.Deserialize(__);
87 |
88 | rtb_Msg.BeginInvoke(new Action(() => rtb_Msg.AppendText("剩下扫码时间:" + r.EffectiveTime.ToString() + " state : " + r.state + "\n")));
89 | if (r.headImgUrl != null)
90 | {
91 | //pB_Qrcode.Load(r.headImgUrl);
92 | }
93 |
94 | if (r.wxid != null && r.wxnewpass != "")
95 | {
96 | //发送登录包
97 | checkManualAuth(r.wxnewpass, r.wxid);
98 | }
99 | else
100 | {
101 | System.Threading.Thread.Sleep(500);
102 | checkLogin(uuid);
103 |
104 | }
105 |
106 | //System.Threading.Thread.Sleep(1000);
107 | }
108 | }
109 |
110 | private void checkManualAuth(string wxnewpass, string wxid)
111 | {
112 |
113 | var ManualAuth = wechat.ManualAuth(wxnewpass, wxid);
114 | //-301重定向
115 | Console.WriteLine(ManualAuth.baseResponse.ret);
116 | if (ManualAuth.baseResponse.ret == MMPro.MM.RetConst.MM_ERR_IDC_REDIRECT)
117 | {
118 | //Console.WriteLine(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist[0].ip);
119 | //byte[] s = Util.Serialize(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist.shortConnectIplist[1]);
120 | int len = (int)ManualAuth.dnsInfo.builtinIplist.shortconnectIpcount;
121 | Util.shortUrl = "http://" + ManualAuth.dnsInfo.newHostList.list[1].substitute;
122 | put(Util.shortUrl);
123 |
124 | //继续检查状态
125 | //chek.Start();
126 | checkLogin(uuid);
127 | }
128 | else if (ManualAuth.baseResponse.ret == MMPro.MM.RetConst.MM_OK)
129 | {
130 | MyWxid = ManualAuth.accountInfo.wxid;
131 |
132 | put(ManualAuth.accountInfo.wxid);
133 | put(ObjToJson2(ManualAuth.accountInfo));
134 | put(ObjToJson2(ManualAuth.baseResponse));
135 | put(JsonConvert.SerializeObject(ManualAuth.authParam));
136 |
137 | byte[] strECServrPubKey = ManualAuth.authParam.ecdh.ecdhkey.key;
138 | byte[] aesKey = new byte[16];
139 | Xcode.ComputerECCKeyMD5(strECServrPubKey, 57, wechat.pri_key_buf, 328, aesKey);
140 | //var aesKey = OpenSSLNativeClass.ECDH.DoEcdh(ManualAuth.authParam.ecdh.nid, strECServrPubKey, wechat.pri_key_buf);
141 | //wechat.CheckEcdh = aesKey.ToString(16, 2);
142 | wechat.AESKey = AES.AESDecrypt(ManualAuth.authParam.session.key, aesKey).ToString(16, 2);
143 |
144 | wechat.baseRequest = wechat.GetBaseRequest("49aa7db2f4a3ffe0e96218f6b92cde32", wechat.GetAESkey(), (uint)wechat.m_uid, "iPad iPhone OS9.3.3");
145 |
146 | authKey = ManualAuth.authParam.autoAuthKey.buffer;
147 |
148 | }
149 | else if ((int)ManualAuth.baseResponse.ret == 2)
150 | {
151 | MyWxid = ManualAuth.accountInfo.wxid;
152 |
153 | put(ManualAuth.accountInfo.wxid);
154 | put(ObjToJson2(ManualAuth.accountInfo));
155 | put(ObjToJson2(ManualAuth.baseResponse));
156 |
157 |
158 | //byte[] strECServrPubKey = ManualAuth.authParam.ecdh.ecdhkey.key;
159 | //var aesKey = OpenSSLNativeClass.ECDH.DoEcdh(713, strECServrPubKey, wechat.pri_key_buf);
160 | //wechat.CheckEcdh = aesKey.ToString(16, 2);
161 | //wechat.AESKey = AES.AESDecrypt(ManualAuth.authParam.session.key, aesKey).ToString(16, 2);
162 |
163 | //wechat.baseRequest = wechat.GetBaseRequest("49aa7db2f4a3ffe0e96218f6b92cde32", wechat.GetAESkey(), (uint)wechat.m_uid, "iPad iPhone OS9.3.3");
164 |
165 | }
166 | else
167 | {
168 | put(JsonConvert.SerializeObject(ManualAuth));
169 | }
170 | }
171 |
172 | public void put(string s)
173 | {
174 | rtb_Msg.BeginInvoke(new Action(() => rtb_Msg.AppendText(s + "\n")));
175 |
176 | }
177 |
178 | public string ObjToJson2(T obj)
179 | {
180 | try
181 | {
182 | System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(obj.GetType());
183 | using (MemoryStream ms = new MemoryStream())
184 | {
185 | serializer.WriteObject(ms, obj);
186 | byte[] byteArr = ms.ToArray();
187 | return Encoding.UTF8.GetString(byteArr);
188 | }
189 | }
190 | catch (Exception ex)
191 | {
192 | return null;
193 | }
194 | }
195 |
196 | private void Form1_Load(object sender, EventArgs e)
197 | {
198 | wechat.GetAESkey();
199 | //put(MMPro.MM.CGI_TYPE.cgi_type_v)
200 | Int32 ver = 369493792;
201 | Console.WriteLine(Util.Get62Key("62706c6973743030d4010203040506090a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a2070855246e756c6c5f102066366664336361353933353631393664663964313935313032393661333332315f100f4e534b657965644172636869766572d10b0c54726f6f74800108111a232d32373a406375787d0000000000000101000000000000000d0000000000000000000000000000007f"));
202 |
203 | //Debug.Print(MM.SyncCmdID.)
204 | }
205 |
206 | private void btn_lbsfind_Click(object sender, EventArgs e)
207 | {
208 | //获取附近人
209 | var lbs = wechat.LbsLBSFind(23.1351666766f, 113.2708136740f);
210 |
211 | put(ObjToJson2(lbs));
212 | }
213 |
214 | private void btn_SnsUserPage_Click(object sender, EventArgs e)
215 | {
216 | var SnsUserPage = wechat.SnsUserPage("", "wxid_20nv6h3jc37522");
217 |
218 | put(JsonConvert.SerializeObject(SnsUserPage));
219 | }
220 |
221 | private void btn_SnsTimeLine_Click(object sender, EventArgs e)
222 | {
223 | var SnsTimeLine = wechat.SnsTimeLine();
224 | put(ObjToJson2(SnsTimeLine));
225 | put(JsonConvert.SerializeObject(SnsTimeLine));
226 | }
227 |
228 | private void btn_SnsObjectOp_Click(object sender, EventArgs e)
229 | {
230 | var SnsObjectOp = wechat.GetSnsObjectOp(12876091418808422504, MM.SnsObjectOpType.MMSNS_OBJECTOP_CANCEL_LIKE);
231 |
232 | put(JsonConvert.SerializeObject(SnsObjectOp));
233 | }
234 |
235 | private void btn_GetLabelList_Click(object sender, EventArgs e)
236 | {
237 | var getcontactlabel = wechat.GetContactLabelList();
238 |
239 | put(JsonConvert.SerializeObject(getcontactlabel));
240 | }
241 |
242 | private void btn_SnsPost_Click(object sender, EventArgs e)
243 | {
244 | var sendsns = wechat.SnsPost(tb_Content.Text, int.Parse(tb_AtUserlist.Text));
245 | //put(ObjToJson2(sendsns));
246 | put(JsonConvert.SerializeObject(sendsns));
247 | }
248 |
249 | private void btn_CreateChatRoom_Click(object sender, EventArgs e)
250 | {
251 | // 第一个必须是群主的wxid也就是本号的wxid
252 | MM.MemberReq[] reqs = new MM.MemberReq[3];
253 | reqs[0] = new MM.MemberReq();
254 | reqs[0].member = new MM.SKBuiltinString();
255 | reqs[0].member.@string = "wxid_20nv6h3jc37522";
256 |
257 | reqs[1] = new MM.MemberReq();
258 | reqs[1].member = new MM.SKBuiltinString();
259 | reqs[1].member.@string = "wxid_8egcw2xj1vkq22";
260 |
261 | reqs[2] = new MM.MemberReq();
262 | reqs[2].member = new MM.SKBuiltinString();
263 | reqs[2].member.@string = "wxid_l63xil1re74722";
264 |
265 | var CeratchatRoom = wechat.CreateChatRoom(reqs, "xxxx");
266 | put(ObjToJson2(CeratchatRoom));
267 | if (CeratchatRoom.baseResponse.ret == MM.RetConst.MM_OK)
268 | {
269 | wechat.SendNewMsg(CeratchatRoom.chatRoomName.@string, "测试哦");
270 | }
271 | }
272 |
273 | private void btn_AddChatRoomMember_Click(object sender, EventArgs e)
274 | {
275 | string list = "[\"xxxxxxssss\",\"xxxsssxxssss\",\"xxxsssxxssss\"]";
276 | var AddChatRoom = wechat.AddChatRoomMember(tb_ToUsername.Text, list);
277 |
278 | put(ObjToJson2(AddChatRoom));
279 |
280 | }
281 |
282 | private void button1_Click(object sender, EventArgs e)
283 | {
284 |
285 | Xcode wc = new Xcode();
286 |
287 | wc.devicelId = "49aa7db2f4a3ffe0e96216f6b92cde22";
288 |
289 | wc.GetAESkey();
290 |
291 | put(JsonConvert.SerializeObject(wc.GetLoginQRcode()));
292 |
293 | //var BindOpMobile = wechat.BindMobile("+8617607567005", "", 1);
294 |
295 | //put(JsonConvert.SerializeObject(BindOpMobile));
296 | //wechat.UploadMsgImg();
297 | //string list = "[\"xxxxxxssss\",\"xxxsssxxssss\",\"xxxsssxxssss\"]";
298 | //var json = Util.JsonToObject(list);
299 | //object[] vs = json;
300 | //Console.WriteLine(vs.Length);
301 |
302 | // var s = wechat.NewReg(tb_ToUsername.Text,tb_Content.Text);
303 | //var s = wechat.PushLoginURL(authKey, MyWxid);
304 | //var s = wechat.UserLogin("0094726042133", "jp5531836", "");
305 | //put(JsonConvert.SerializeObject(s));
306 |
307 | //if (s.baseResponse.ret == MMPro.MM.RetConst.MM_ERR_IDC_REDIRECT)
308 | //{
309 | // //Console.WriteLine(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist[0].ip);
310 | // //byte[] s = Util.Serialize(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist.shortConnectIplist[1]);
311 | // int len = (int)s.dnsInfo.builtinIplist.shortconnectIpcount;
312 | // Util.shortUrl = "http://" + s.dnsInfo.newHostList.list[1].substitute;
313 | //}
314 |
315 |
316 | }
317 | private void btn_DelChatRoomUser_Click(object sender, EventArgs e)
318 | {
319 | var DelChatRoom = wechat.DelChatRoomMember(tb_ToUsername.Text, "[\"wxid_xhdqvshqkor822\"]");
320 |
321 | put(JsonConvert.SerializeObject(DelChatRoom));
322 | }
323 |
324 | private void btn_GetRoomDetail_Click(object sender, EventArgs e)
325 | {
326 | var GetChatroomMenberDettail = wechat.GetChatroomMemberDetail(tb_ToUsername.Text);
327 | put(ObjToJson2(GetChatroomMenberDettail));
328 | }
329 |
330 | private void btn_GetA8Key_Click(object sender, EventArgs e)
331 | {
332 | var GetA8Key = wechat.GetA8Key("weixin", "http://mp.weixin.qq.com/s?__biz=MzA5MDAwOTExMw==&mid=200126214&idx=1&sn=a1e7410ec56de5b6c4810dd7f7db8a47&chksm=1e0b3470297cbd666198666278421aed0a131d775561c08f52db0c82ce0e6a9546aac072a20e&mpshare=1&scene=1&srcid=0408bN3ACxqAH6jyq4vCBP9e#rd");
333 | //JsonFormat.printToString(GetA8Key)
334 | put(JsonConvert.SerializeObject(GetA8Key));
335 |
336 | put(GetA8Key.FullURL);
337 | }
338 |
339 | private void btn_get_Click(object sender, EventArgs e)
340 | {
341 | var GetQRCode = wechat.GetQRCode(tb_ToUsername.Text);
342 |
343 | put(JsonConvert.SerializeObject(GetQRCode));
344 | if (GetQRCode.QRCode.iLen > 0)
345 | {
346 |
347 | pB_Qrcode.Image = Image.FromStream(new MemoryStream(GetQRCode.QRCode.Buffer));
348 |
349 | }
350 | else
351 | {
352 | MessageBox.Show("获取二维码失败!");
353 | }
354 |
355 | }
356 |
357 | private void btn_initcontact_Click(object sender, EventArgs e)
358 | {
359 | var InitContact = wechat.InitContact(tb_ToUsername.Text, currentWxcontactSeq);
360 |
361 | currentWxcontactSeq = InitContact.currentWxcontactSeq;
362 | put(JsonConvert.SerializeObject(InitContact));
363 | }
364 |
365 | private void btn_SearchContact_Click(object sender, EventArgs e)
366 | {
367 | var SearchContact = wechat.SearchContact(tb_ToUsername.Text);
368 |
369 | put(JsonConvert.SerializeObject(SearchContact));
370 |
371 |
372 | }
373 |
374 | private void btn_SendMsgimg_Click(object sender, EventArgs e)
375 | {
376 | var SendMsgImgRet = wechat.UploadMsgImg(tb_ToUsername.Text, MyWxid, System.Environment.CurrentDirectory + "\\1.jpg");
377 | put(JsonConvert.SerializeObject(SendMsgImgRet));
378 | }
379 |
380 | private void btn_SendVoice_Click(object sender, EventArgs e)
381 | {
382 | var UploadVoice = wechat.UploadVoice(tb_ToUsername.Text, MyWxid, System.Environment.CurrentDirectory + "\\19.amr");
383 | put(JsonConvert.SerializeObject(UploadVoice));
384 | }
385 |
386 | private void btn_Fetchauthen_Click(object sender, EventArgs e)
387 | {
388 |
389 | }
390 |
391 | private void btn_GetBalance_Click(object sender, EventArgs e)
392 | {
393 |
394 | }
395 |
396 | private void btn_Genprefetch_Click(object sender, EventArgs e)
397 | {
398 |
399 | }
400 |
401 | private void btn_GetBlankID_Click(object sender, EventArgs e)
402 | {
403 |
404 | }
405 |
406 | private void btn_F2ffee_Click(object sender, EventArgs e)
407 | {
408 | //string payloadJson = "{\"CgiCmd\":0,\"ReqKey\":\"" + ReqKey + "\",\"PassWord\":\"123456\"}";
409 | string tenpayUrl = "delay_confirm_flag=0&desc=转账测试&fee=10&fee_type=1&pay_scene=31&receiver_name=" + tb_ToUsername.Text + "&scene=31&transfer_scene=2&WCPaySign=29E00C5AD811B14B177311A2A6B7B8C8062FF1179FD9A83AB6A6223F6F3479DE";
410 | var Tenpay = wechat.TenPay(MM.enMMTenPayCgiCmd.MMTENPAY_CGICMD_GET_FIXED_AMOUNT_QRCODE, tenpayUrl);
411 | put(JsonConvert.SerializeObject(Tenpay));
412 | }
413 |
414 | private void btn_GetBalance_Click_1(object sender, EventArgs e)
415 | {
416 | var Tenpay = wechat.TenPay(MM.enMMTenPayCgiCmd.MMTENPAY_CGICMD_BIND_QUERY_NEW);
417 | put(JsonConvert.SerializeObject(Tenpay));
418 | }
419 |
420 | private void btn_GenPreTransferReq_Click(object sender, EventArgs e)
421 | {
422 | string tenpayUrl = "delay_confirm_flag=0&desc=转账测试&fee=10&fee_type=1&pay_scene=31&receiver_name=" + tb_ToUsername.Text + "&scene=31&transfer_scene=2&WCPaySign=29E00C5AD811B14B177311A2A6B7B8C8062FF1179FD9A83AB6A6223F6F3479DE";
423 | var Tenpay = wechat.TenPay(MM.enMMTenPayCgiCmd.MMTENPAY_CGICMD_GEN_PRE_TRANSFER, tenpayUrl);
424 | put(JsonConvert.SerializeObject(Tenpay));
425 | }
426 |
427 | private void btn_TransferReq_Click(object sender, EventArgs e)
428 | {
429 | string tenpayUrl = "auto_deduct_flag=0&bank_type=CFT&bind_serial=CFT&busi_sms_flag=0&flag=3&passwd=81AED920CBF05F4E2CE88836B72A37349F53A1610EB3C608E7947EA100DBDD7851ED97096C62EC0B32893A5583AFE09F25873A267A66ECA503E2985823798E8B0DF62CF8201D8415E361297B355F27EB07DBE846920E26B76251F856BEB68C912116E6F7B504F9C685346449C458A4B13685C3161687F6BDFE9C03E7B270D88D&pay_scene=37&req_key" + tb_Content.Text + "&use_touch=0&WCPaySign=CA9D8CD3446D25EC097CDF1B07017C6A76F465A489299E67FBC29F0B06CC08CA";
430 | var Tenpay = wechat.TenPay(0, tenpayUrl);
431 | put(JsonConvert.SerializeObject(Tenpay));
432 | }
433 |
434 | private void btn_TenPay_TransferConfirm_Click(object sender, EventArgs e)
435 | {
436 |
437 | }
438 |
439 | private void btn_SayHello_Click(object sender, EventArgs e)
440 | {
441 | //打招呼的opcode是2
442 | var VerifyUser = wechat.VerifyUser(MM.VerifyUserOpCode.MM_VERIFYUSER_SENDREQUEST, tb_Content.Text, tb_ToUsername.Text, tb_AtUserlist.Text);
443 | put(JsonConvert.SerializeObject(VerifyUser));
444 | }
445 |
446 | private void btn_AddUser_Click(object sender, EventArgs e)
447 | {
448 | //最后一个参数是来源啊
449 | //1来源QQ2来源邮箱3来源微信号14群聊15手机号18附近的人25漂流瓶29摇一摇30二维码13来源通讯录
450 | var VerifyUser = wechat.VerifyUser(MM.VerifyUserOpCode.MM_VERIFYUSER_SENDREQUEST, tb_Content.Text, tb_ToUsername.Text, tb_AtUserlist.Text, 0x0e);
451 | put(JsonConvert.SerializeObject(VerifyUser));
452 | }
453 |
454 | private void btn_AcceptUser_Click(object sender, EventArgs e)
455 | {
456 | //最后一个参数是来源啊
457 | //1来源QQ2来源邮箱3来源微信号14群聊15手机号18附近的人25漂流瓶29摇一摇30二维码13来源通讯录
458 | var VerifyUser = wechat.VerifyUser(MM.VerifyUserOpCode.MM_VERIFYUSER_VERIFYOK, tb_Content.Text, tb_ToUsername.Text, tb_AtUserlist.Text);
459 | put(JsonConvert.SerializeObject(VerifyUser));
460 | }
461 |
462 | private void btn_Add_Gh_Click(object sender, EventArgs e)
463 | {
464 | //最后一个参数是来源啊
465 | //1来源QQ2来源邮箱3来源微信号14群聊15手机号18附近的人25漂流瓶29摇一摇30二维码13来源通讯录
466 | //非原始id 或扫码后的id 识别二维码后得到http://weixin.qq.com/r/RjndxWXExji5rSGm92xU 账号为RjndxWXExji5rSGm92xU@qr 直接关注即可
467 | var VerifyUser = wechat.VerifyUser(MM.VerifyUserOpCode.MM_VERIFYUSER_ADDCONTACT, tb_Content.Text, tb_ToUsername.Text, tb_AtUserlist.Text, 0x03);
468 | put(JsonConvert.SerializeObject(VerifyUser));
469 | }
470 |
471 | private void btn_ClickCommand_Click(object sender, EventArgs e)
472 | {
473 | var ClicCommand = wechat.ClickCommand("gh_d1113d3eaf68", "447061836rselfmenu_2_0menu_click");
474 | put(JsonConvert.SerializeObject(ClicCommand));
475 | }
476 |
477 | private void btn_delUser_Click(object sender, EventArgs e)
478 | {
479 | var DelUser = wechat.OpLogDelUser(tb_ToUsername.Text);
480 | put(JsonConvert.SerializeObject(DelUser));
481 | }
482 |
483 | private void btn_webSearch_Click(object sender, EventArgs e)
484 | {
485 |
486 | }
487 |
488 | private void btn_shakeGet_Click(object sender, EventArgs e)
489 | {
490 | var ShakeReport = wechat.ShakeReport(22.54733f, 110.94f);
491 |
492 | put(JsonConvert.SerializeObject(ShakeReport));
493 | }
494 |
495 | private void btn_NewInit_Click(object sender, EventArgs e)
496 | {
497 | Action action = () =>
498 | {
499 | int ret = 1;
500 | //var NewInit = new mm.command.NewInitResponse();
501 | var NewInit = wechat.NewInit(MyWxid); ;
502 |
503 | //put(JsonConvert.SerializeObject(NewInit));
504 |
505 | while (ret == 1)
506 | {
507 | NewInit = wechat.NewInit(MyWxid);
508 | ret = NewInit.ContinueFlag;
509 |
510 | Console.WriteLine(NewInit.Base.Ret);
511 | foreach (var r in NewInit.CmdListList)
512 | {
513 | Console.WriteLine("CmdId : {0}", r.CmdId);
514 | put("CmdId : " + r.CmdId);
515 | if (r.CmdId == 2)
516 | {
517 | MM.ModContact accountInfo = Util.Deserialize(r.CmdBuf.Buffer.ToByteArray());
518 | //mm.command.Msg ss = mm.command.Msg.ParseFrom(r.CmdBuf.Buffer.ToByteArray());
519 | //put(JsonConvert.SerializeObject(accountInfo));
520 | put(accountInfo.userName.@string);
521 | put(accountInfo.alias);
522 | put("----------------------------");
523 |
524 |
525 | }
526 |
527 | //Console.WriteLine();
528 | }
529 | //
530 |
531 | }
532 |
533 | Sync = NewInit.CurrentSynckey.ToByteArray();
534 |
535 | };
536 |
537 | action.BeginInvoke(new AsyncCallback((IAsyncResult result) =>
538 | {
539 |
540 | rtb_Msg.BeginInvoke(new Action(() => rtb_Msg.AppendText("初始化结束")));
541 |
542 | //
543 | }), null);
544 |
545 |
546 |
547 |
548 | }
549 |
550 | private void btn_SnsSync_Click(object sender, EventArgs e)
551 | {
552 | var snssyncp = wechat.SnsSync("49aa7db2f4a3ffe0e96218f6b92cde32", "iPad iPhone OS9.3.3");
553 |
554 | foreach (var s in snssyncp.cmdList.list)
555 | {
556 |
557 | MM.SnsObject chat = Util.Deserialize(s.cmdBuf.data);
558 | put(JsonConvert.SerializeObject(chat));
559 | }
560 | }
561 |
562 | private void btn_GetContact_Click(object sender, EventArgs e)
563 | {
564 | var getcotact = wechat.GetContact_b(tb_ToUsername.Text, tb_AtUserlist.Text);
565 | put(JsonConvert.SerializeObject(getcotact));
566 | }
567 |
568 | private void btn_BindMobile_Click(object sender, EventArgs e)
569 | {
570 |
571 | }
572 |
573 | private void btn_FavSync_Click(object sender, EventArgs e)
574 | {
575 | var FavSyns = wechat.FavSync();
576 | foreach (var s in FavSyns.CmdList.List)
577 | {
578 | Debug.Print(s.CmdBuf.Buffer.ToString(16, 2));
579 | micromsg.AddFavItem shareFav = Util.Deserialize(s.CmdBuf.Buffer);
580 | put(JsonConvert.SerializeObject(shareFav));
581 | }
582 |
583 |
584 | //FavSyns = wechat.FavSync(FavSyns.KeyBuf.Buffer);
585 | }
586 |
587 | private void btn_GetFavItem_Click(object sender, EventArgs e)
588 | {
589 | var GetFav = wechat.GetFavItem(Convert.ToInt32(tb_Content.Text));
590 | foreach (var obj in GetFav.ObjectList)
591 | {
592 | put(JsonConvert.SerializeObject(obj));
593 | }
594 | }
595 |
596 | private void btn_DelFavItem_Click(object sender, EventArgs e)
597 | {
598 | uint[] id = new uint[] { 1, 2, 3 };//欲删除id
599 | var DelFav = wechat.DelFavItem(id);
600 |
601 | put(JsonConvert.SerializeObject(DelFav));
602 | }
603 |
604 | private void btn_AddFavItem_Click(object sender, EventArgs e)
605 | {
606 | var addFavItem = wechat.addFavItem(tb_Content.Text);
607 | put(JsonConvert.SerializeObject(addFavItem));
608 | }
609 |
610 | private void btn_Sync_Click(object sender, EventArgs e)
611 | {
612 | btn_Sync.Enabled = false;
613 |
614 | Action action = () =>
615 | {
616 |
617 | int ret = 1;
618 | //var NewInit = new mm.command.NewInitResponse();
619 | while (ret == 1)
620 | {
621 | var NewSync = wechat.NewSyncEcode(4, Sync);
622 | if (NewSync.cmdList == null) { continue; }
623 | if (NewSync.cmdList.count <= 0) { continue; }
624 | foreach (var r in NewSync.cmdList.list)
625 | {
626 | //put("cmdId:"+r.cmdid.ToString());
627 | if (r.cmdid == MM.SyncCmdID.CmdIdAddMsg)
628 | {
629 | micromsg.AddMsg msg = Util.Deserialize(r.cmdBuf.data);
630 | put(JsonConvert.SerializeObject(msg));
631 | }
632 | else if (r.cmdid == MM.SyncCmdID.CmdIdModContact)
633 | {
634 | micromsg.ModContact contact = Util.Deserialize(r.cmdBuf.data);
635 | //put(JsonConvert.SerializeObject(contact));
636 | }
637 |
638 |
639 | }
640 |
641 | Sync = NewSync.sync_key;
642 | }
643 |
644 |
645 | };
646 |
647 | action.BeginInvoke(new AsyncCallback((IAsyncResult result) =>
648 | {
649 |
650 | rtb_Msg.BeginInvoke(new Action(() => rtb_Msg.AppendText("同步信息结束")));
651 |
652 | //
653 | }), null);
654 |
655 | }
656 |
657 | private void btn_SendMsg_Click(object sender, EventArgs e)
658 | {
659 | var sendmsg = wechat.SendNewMsg(tb_ToUsername.Text, tb_Content.Text);
660 | put(JsonConvert.SerializeObject(sendmsg));
661 | }
662 |
663 | private void btn_AutoAuth_Click(object sender, EventArgs e)
664 | {
665 | var AutoAuthRequest = wechat.AutoAuthRequest(authKey);
666 | //put(JsonConvert.SerializeObject(AutoAuthRequest));
667 | if (AutoAuthRequest.baseResponse.ret == MMPro.MM.RetConst.MM_ERR_IDC_REDIRECT)
668 | {
669 | //Console.WriteLine(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist[0].ip);
670 | //byte[] s = Util.Serialize(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist.shortConnectIplist[1]);
671 | int len = (int)AutoAuthRequest.dnsInfo.builtinIplist.shortconnectIpcount;
672 | Util.shortUrl = "http://" + AutoAuthRequest.dnsInfo.newHostList.list[1].substitute;
673 | Btn_DataLogin_Click(Btn_DataLogin, new EventArgs());
674 | }
675 | else if (AutoAuthRequest.baseResponse.ret == MMPro.MM.RetConst.MM_OK)
676 | {
677 | MyWxid = AutoAuthRequest.accountInfo.wxid;
678 |
679 | put(AutoAuthRequest.accountInfo.wxid);
680 | put(ObjToJson2(AutoAuthRequest.accountInfo));
681 | put(ObjToJson2(AutoAuthRequest.baseResponse));
682 |
683 |
684 | byte[] strECServrPubKey = AutoAuthRequest.authParam.ecdh.ecdhkey.key;
685 | byte[] aesKey = new byte[16];
686 | Xcode.ComputerECCKeyMD5(strECServrPubKey, 57, wechat.pri_key_buf, 328, aesKey);
687 | //var aesKey = OpenSSLNativeClass.ECDH.DoEcdh(ManualAuth.authParam.ecdh.nid, strECServrPubKey, wechat.pri_key_buf);
688 | //wechat.CheckEcdh = aesKey.ToString(16, 2);
689 | wechat.AESKey = AES.AESDecrypt(AutoAuthRequest.authParam.session.key, aesKey).ToString(16, 2);
690 |
691 | wechat.baseRequest = wechat.GetBaseRequest(wechat.devicelId, wechat.AESKey.ToByteArray(16, 2), (uint)wechat.m_uid, "iPad iPhone OS9.3.3");
692 |
693 | //authKey = AutoAuthRequest.authParam.autoAuthKey.buffer;
694 | put(JsonConvert.SerializeObject(AutoAuthRequest.authParam));
695 | }
696 | else {
697 | put(JsonConvert.SerializeObject(AutoAuthRequest));
698 | }
699 | }
700 |
701 | private void btn_logout_Click(object sender, EventArgs e)
702 | {
703 | var logout = wechat.logOut();
704 | put(JsonConvert.SerializeObject(logout));
705 | }
706 |
707 | private void button2_Click(object sender, EventArgs e)
708 | {
709 |
710 | }
711 |
712 | private void btn_AddLabel_Click(object sender, EventArgs e)
713 | {
714 | var AddLabel = wechat.AddContactLabel(tb_Content.Text);
715 | put(JsonConvert.SerializeObject(AddLabel));
716 | }
717 |
718 | private void btn_ModifyLabelList_Click(object sender, EventArgs e)
719 | {
720 | micromsg.UserLabelInfo[] userLabels = new micromsg.UserLabelInfo[1];
721 | userLabels[0] = new micromsg.UserLabelInfo();
722 | userLabels[0].LabelIDList = tb_Content.Text;
723 | userLabels[0].UserName = "wxid_xhdqvshqkor822";
724 |
725 | var Modify = wechat.ModifyContactLabelList(userLabels);
726 |
727 | put(JsonConvert.SerializeObject(Modify));
728 | }
729 |
730 | private void btn_DelContactLabel_Click(object sender, EventArgs e)
731 | {
732 | var DelLabel = wechat.DelContactLabel(tb_Content.Text);
733 | put(JsonConvert.SerializeObject(DelLabel));
734 | }
735 |
736 | private void btn_SnsUpload_Click(object sender, EventArgs e)
737 | {
738 | var SnsUpload = wechat.SnsUpload(System.Environment.CurrentDirectory + "\\1.jpg");
739 | put(JsonConvert.SerializeObject(SnsUpload));
740 | }
741 |
742 | private void btn_SendCardMsg_Click(object sender, EventArgs e)
743 | {
744 | // 这里可以发送名片
745 | var sendmsg = wechat.SendNewMsg(tb_ToUsername.Text, tb_Content.Text, 42);
746 | put(JsonConvert.SerializeObject(sendmsg));
747 | }
748 |
749 | private void btn_SendAppMsg_Click(object sender, EventArgs e)
750 | {
751 | //歌曲名字歌手名字3000http://i.y.qq.com/v8/playsong.html?songid=歌曲IDhttp://i.y.qq.com/v8/playsong.html?songid=歌曲ID音乐地址音乐地址 歌曲图片
752 |
753 | var sendappmsg = wechat.SendAppMsg(tb_Content.Text, tb_ToUsername.Text, MyWxid);
754 | put(JsonConvert.SerializeObject(sendappmsg));
755 | }
756 |
757 | private void btn_SetChatRoomAnnouncement_Click(object sender, EventArgs e)
758 | {
759 | var setChatRoomAnnouncement = wechat.setChatRoomAnnouncement(tb_ToUsername.Text, tb_Content.Text);
760 | put(JsonConvert.SerializeObject(setChatRoomAnnouncement));
761 | }
762 |
763 | private void btn_downloadMsgimg_Click(object sender, EventArgs e)
764 | {
765 | byte[] pic = wechat.GetMsgImg("", 149058, 1684679638, "wxid_20nv6h3jc37522", "wxid_20nv6h3jc37522", 0);
766 | pB_Qrcode.Image = Image.FromStream(new MemoryStream(pic));
767 | //保存图片
768 | using (FileStream fs = new FileStream(System.IO.Directory.GetCurrentDirectory() + "\\1684679638" + ".jpg", FileMode.Create))
769 | {
770 | fs.Write(pic, 0, pic.Length);
771 | fs.Close();
772 |
773 | }
774 | }
775 |
776 | private void btn_BindEail_Click(object sender, EventArgs e)
777 | {
778 | var bindemail = wechat.BindEmail("1798168048@qq.com");
779 | put(JsonConvert.SerializeObject(bindemail));
780 | }
781 |
782 |
783 | private void button3_Click(object sender, EventArgs e)
784 | {
785 | var BinOpMobile = wechat.MobileLogin("+8617607567005", tb_Content.Text, 17);
786 | put(JsonConvert.SerializeObject(BinOpMobile));
787 | }
788 |
789 | private void btn_loginBySms_Click(object sender, EventArgs e)
790 | {
791 | checkManualAuth(tb_ToUsername.Text, tb_AtUserlist.Text);
792 | }
793 |
794 | private void btn_GetLoginSmsCodes_Click(object sender, EventArgs e)
795 | {
796 | var BindOpMibile = wechat.MobileLogin("+"+tb_Content.Text, tb_ToUsername.Text);
797 | put(JsonConvert.SerializeObject(BindOpMibile));
798 | }
799 |
800 | private void btn_GetSms_Click(object sender, EventArgs e)
801 | {
802 | var BindOpMibile = wechat.BindOpMobileRegFor("+"+tb_Content.Text, tb_ToUsername.Text, 12);
803 | put(JsonConvert.SerializeObject(BindOpMibile));
804 |
805 | }
806 |
807 | private void btn_ZC_Click(object sender, EventArgs e)
808 | {
809 | var BindOpMibile = wechat.BindOpMobileRegFor("+" + tb_Content.Text, tb_ToUsername.Text, 14, tb_Content.Text);
810 | put(JsonConvert.SerializeObject(BindOpMibile));
811 | }
812 |
813 | private void btn_ChackSmsCode_Click(object sender, EventArgs e)
814 | {
815 | var BindOpMibile = wechat.BindOpMobileRegFor("+" + tb_Content.Text, tb_ToUsername.Text, 15, "",tb_AtUserlist.Text);
816 | put(JsonConvert.SerializeObject(BindOpMibile));
817 | }
818 |
819 | private void btn_PushUrlLogin_Click(object sender, EventArgs e)
820 | {
821 |
822 | }
823 |
824 | private void groupBox13_Enter(object sender, EventArgs e)
825 | {
826 |
827 | }
828 |
829 | private void btn_logoutweb_Click(object sender, EventArgs e)
830 | {
831 |
832 | }
833 |
834 | private void btn_NewReg_Click(object sender, EventArgs e)
835 | {
836 | var newreg2 = wechat.NewReg(tb_ToUsername.Text, tb_AtUserlist.Text,"+"+ tb_Content.Text);
837 | put(JsonConvert.SerializeObject(newreg2));
838 | }
839 |
840 | private void tabPage4_Click(object sender, EventArgs e)
841 | {
842 |
843 | }
844 |
845 | private void btn_SendCDnimg_Click(object sender, EventArgs e)
846 | {
847 |
848 | var UploadMsgImgCDN = wechat.UploadMsgImgCDN("9e5899241a1d4267ae6a7bb8bcd2deb1", 52005, 4359, "304e020100044730450201000204fc0b7e1802032f59190204929a697102045b5b9576042036363362626332303436353534643733393233663934623831383231353631640204010800010201000400", tb_ToUsername.Text, MyWxid);
849 | put(JsonConvert.SerializeObject(UploadMsgImgCDN));
850 | }
851 |
852 | private void button4_Click(object sender, EventArgs e)
853 | {
854 | var UploadVoice = wechat.UploadVideo(System.Environment.CurrentDirectory + "\\19.amr", MyWxid, tb_ToUsername.Text, 0);
855 | put(JsonConvert.SerializeObject(UploadVoice));
856 | }
857 |
858 | private void button5_Click(object sender, EventArgs e)
859 | {
860 | var GetA8Key = wechat.GetA8Key("", "https://weixin.qq.com/g/A-pc6muNJDi4KiPK");
861 | //JsonFormat.printToString(GetA8Key)
862 | put(JsonConvert.SerializeObject(GetA8Key));
863 | }
864 |
865 | private void Btn_DataLogin_Click(object sender, EventArgs e)
866 | {
867 | var UserLoign = wechat.UserLogin(tb_ToUsername.Text, tb_AtUserlist.Text, tb_Content.Text);
868 |
869 |
870 | if (UserLoign.baseResponse.ret == MMPro.MM.RetConst.MM_ERR_IDC_REDIRECT)
871 | {
872 | //Console.WriteLine(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist[0].ip);
873 | //byte[] s = Util.Serialize(ManualAuth.dnsInfo.builtinIplist.shortConnectIplist.shortConnectIplist[1]);
874 | int len = (int)UserLoign.dnsInfo.builtinIplist.shortconnectIpcount;
875 | Util.shortUrl = "http://" + UserLoign.dnsInfo.newHostList.list[1].substitute;
876 | Btn_DataLogin_Click(Btn_DataLogin, new EventArgs());
877 | }
878 | else if (UserLoign.baseResponse.ret == MMPro.MM.RetConst.MM_OK)
879 | {
880 | MyWxid = UserLoign.accountInfo.wxid;
881 |
882 | put(UserLoign.accountInfo.wxid);
883 | put(ObjToJson2(UserLoign.accountInfo));
884 | put(ObjToJson2(UserLoign.baseResponse));
885 |
886 |
887 | byte[] strECServrPubKey = UserLoign.authParam.ecdh.ecdhkey.key;
888 | byte[] aesKey = new byte[16];
889 | Xcode.ComputerECCKeyMD5(strECServrPubKey, 57, wechat.pri_key_buf, 328, aesKey);
890 | //var aesKey = OpenSSLNativeClass.ECDH.DoEcdh(ManualAuth.authParam.ecdh.nid, strECServrPubKey, wechat.pri_key_buf);
891 | //wechat.CheckEcdh = aesKey.ToString(16, 2);
892 | wechat.AESKey = AES.AESDecrypt(UserLoign.authParam.session.key, aesKey).ToString(16, 2);
893 |
894 | //wechat.baseRequest = wechat.GetBaseRequest(wechat.devicelId, wechat.AESKey.ToByteArray(16, 2), (uint)wechat.m_uid, "iMac iPhone OS9.3.3");
895 |
896 | authKey = UserLoign.authParam.autoAuthKey.buffer;
897 | put(JsonConvert.SerializeObject(UserLoign.authParam));
898 | }
899 | else {
900 | put(JsonConvert.SerializeObject(UserLoign.baseResponse));
901 | }
902 | }
903 |
904 | private void btn_verifyPwd_Click(object sender, EventArgs e)
905 | {
906 | var VerifyPasswd = wechat.NewVerifyPasswd(tb_AtUserlist.Text);
907 | put(JsonConvert.SerializeObject(VerifyPasswd));
908 | }
909 |
910 | private void btn_setPwd_Click(object sender, EventArgs e)
911 | {
912 | var newsetpasswd = wechat.NewSetPasswd(tb_AtUserlist.Text, tb_ToUsername.Text, authKey);
913 | put(JsonConvert.SerializeObject(newsetpasswd));
914 | }
915 |
916 | private void button6_Click(object sender, EventArgs e)
917 | {
918 | var BindOpMibile = wechat.BindOpMobileRegFor("+97693643876", tb_ToUsername.Text, 17, tb_Content.Text);
919 | put(JsonConvert.SerializeObject(BindOpMibile));
920 | }
921 |
922 | private void button7_Click(object sender, EventArgs e)
923 | {
924 | var GetContact = wechat.GetContact(tb_ToUsername.Text, 1);
925 |
926 | put(JsonConvert.SerializeObject(GetContact));
927 | }
928 |
929 | private void btn_deviceLogins_Click(object sender, EventArgs e)
930 | {
931 |
932 | }
933 |
934 | private void btn_BindMobile_getcode_Click(object sender, EventArgs e)
935 | {
936 | var BindOpMobile = wechat.BindMobile("+8617607567005", "", 1);
937 |
938 | put(JsonConvert.SerializeObject(BindOpMobile));
939 | }
940 |
941 | private void btn_Bindmolie_yzcode_Click(object sender, EventArgs e)
942 | {
943 | var BindOpMobile = wechat.BindMobile("+8617607567005", tb_Content.Text, 2);
944 |
945 | put(JsonConvert.SerializeObject(BindOpMobile));
946 |
947 | }
948 |
949 | private void button8_Click(object sender, EventArgs e)
950 | {
951 | var BindOpMobile = wechat.BindMobile("+8617607567005", tb_Content.Text, 3);
952 |
953 | put(JsonConvert.SerializeObject(BindOpMobile));
954 | }
955 |
956 | private void btn_UpMobile_Click(object sender, EventArgs e)
957 | {
958 | micromsg.Mobile[] mobiles = new micromsg.Mobile[2];
959 |
960 | mobiles[0] = new micromsg.Mobile() { v = "15816648281" };
961 | mobiles[1] = new micromsg.Mobile() { v = "13692062050" };
962 | var UpMobile = wechat.UploadMContact("0094729345849", mobiles, MyWxid);
963 | put(JsonConvert.SerializeObject(UpMobile));
964 | }
965 |
966 | private void groupBox20_Enter(object sender, EventArgs e)
967 | {
968 |
969 | }
970 |
971 | private void btn_SyncCheck_Click(object sender, EventArgs e)
972 | {
973 |
974 | }
975 | }
976 | }
977 |
--------------------------------------------------------------------------------
/Wechat/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 62706c6973743030d4010203040506090a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a2070855246e756c6c5f102064306530386536353434306130636666306366373339636466663365646664325f100f4e534b657965644172636869766572d10b0c54726f6f74800108111a232d32373a406375787d0000000000000101000000000000000d0000000000000000000000000000007f
122 |
123 |
--------------------------------------------------------------------------------
/Wechat/GoogleProto.cs:
--------------------------------------------------------------------------------
1 | using Google.ProtocolBuffers;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using mm.command;
8 |
9 | namespace aliyun
10 | {
11 | public class GoogleProto
12 | {
13 | private const int VERSION = 0x29998c32;
14 | private const Int32 ver = 369593792;
15 |
16 | private static DateTime Jan1st1970 = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
17 | private static long GetCurTime()
18 | {
19 | return (long)((DateTime.UtcNow - Jan1st1970).TotalMilliseconds);
20 | }
21 |
22 | public static BaseRequest CreateBaseRequestEntity(string deviceID, string osType)
23 | {
24 | return CreateBaseRequestEntity(deviceID, osType, 1);
25 | }
26 |
27 | public static BaseRequest CreateBaseRequestEntity(string deviceID, string osType, int scene)
28 | {
29 | BaseRequest.Builder brb = new BaseRequest.Builder();
30 | byte[] byt = new byte[0];
31 | brb.SetSessionKey(ByteString.CopyFrom(byt));
32 | brb.SetUin(0);
33 | byte[] bytSD = new byte[16];
34 | bytSD = Encoding.Default.GetBytes(deviceID + "\x00");
35 | brb.SetDeviceID(ByteString.CopyFrom(bytSD));
36 | brb.SetClientVersion(VERSION);
37 | //osType = "iPad iPhone OS7.0.3";
38 | brb.SetDeviceType(ByteString.CopyFrom(osType, Encoding.Default));
39 | brb.SetScene(scene);
40 | BaseRequest br = brb.Build();
41 |
42 | return br;
43 | }
44 |
45 | public static BaseRequest CreateBaseRequestEntity(string deviceID, string sessionKey, uint uIn, string osType)
46 | {
47 | return CreateBaseRequestEntity(deviceID, sessionKey, uIn, osType, 0);
48 | }
49 |
50 | public static BaseRequest CreateBaseRequestEntity(string deviceID, string sessionKey, uint uIn, string osType, int scene)
51 | {
52 | BaseRequest.Builder brb = new BaseRequest.Builder();
53 | byte[] byt = new byte[36];
54 | brb.SetSessionKey(ByteString.CopyFrom(sessionKey, Encoding.Default));
55 | brb.SetUin(uIn);
56 | byte[] bytSD = new byte[16];
57 | bytSD = Encoding.Default.GetBytes(deviceID);
58 | brb.SetDeviceID(ByteString.CopyFrom(bytSD));
59 | brb.SetClientVersion(ver);
60 | brb.SetDeviceType(ByteString.CopyFrom(osType, Encoding.Default));
61 | brb.SetScene(scene);
62 | BaseRequest br = brb.Build();
63 |
64 | return br;
65 | }
66 |
67 | public static AuthRequest CreateAuthRequestEntity(BaseRequest br, string wxAccount, string wxPwd, string imei, string MANUFACTURER, string MODEL, string RELEASE, string INCREMENTAL, string DISPLAY, string OSType, byte[] randomEncryKey)
68 | {
69 | AuthRequest.Builder aqb = new AuthRequest.Builder();
70 | aqb.SetBase(br);
71 | aqb.SetUserName(new SKBuiltinString_t.Builder().SetString(wxAccount).Build());
72 | string strWxPwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(wxPwd, "MD5");
73 | aqb.SetPwd(new SKBuiltinString_t.Builder().SetString(strWxPwd).Build());
74 | aqb.SetImgSid(new SKBuiltinString_t.Builder().SetString("").Build());
75 | aqb.SetImgCode(new SKBuiltinString_t.Builder().SetString("").Build());
76 | aqb.SetPwd2(strWxPwd);
77 | aqb.SetBuiltinIPSeq(0);
78 | aqb.SetExtPwd(strWxPwd);
79 | aqb.SetExtPwd2(strWxPwd);
80 | aqb.SetTimeZone("8.00");
81 | aqb.SetLanguage("zh_CN");
82 | aqb.SetIMEI(imei);
83 | aqb.SetChannel(0);
84 | aqb.SetImgEncryptKey(new SKBuiltinString_t.Builder().SetString("").Build());
85 | aqb.SetKSid(new SKBuiltinBuffer_t.Builder().SetILen(0).SetBuffer(ByteString.CopyFrom("", Encoding.Default)));
86 | aqb.SetDeviceBrand(MANUFACTURER);
87 | aqb.SetDeviceModel(MODEL);
88 | aqb.SetOSType(OSType);
89 | aqb.SetDeviceType("");
92 | aqb.SetAuthTicket("");
93 |
94 | aqb.SetSignature("18c867f0717aa67b2ab7347505ba07ed");
95 | SKBuiltinBuffer_t.Builder skbb = new SKBuiltinBuffer_t.Builder();
96 | skbb.SetILen(16);
97 |
98 | skbb.SetBuffer(ByteString.CopyFrom(randomEncryKey));
99 | SKBuiltinBuffer_t sbk = skbb.Build();
100 | aqb.SetRandomEncryKey(sbk);
101 |
102 | AuthRequest ar = aqb.Build();
103 |
104 | return ar;
105 | }
106 | public static InitKey CreateInitKeyEntity(byte[] randomEncryKey, ECDHKey cliPubECDHKey, string WXAccount, string wxPwd)
107 | {
108 | InitKey.Builder key = new InitKey.Builder();
109 | SKBuiltinBuffer_t.Builder skbb = new SKBuiltinBuffer_t.Builder();
110 | skbb.SetILen(16);
111 | skbb.SetBuffer(ByteString.CopyFrom(randomEncryKey));
112 | key.SetRandomEncryKey(skbb);
113 | key.SetCliPubECDHKey(cliPubECDHKey);
114 | key.SetAccount(WXAccount);
115 | string strWxPwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(wxPwd, "MD5");
116 | key.SetPwd(strWxPwd);
117 | key.SetPwd2(strWxPwd);
118 |
119 | return key.Build();
120 | }
121 |
122 | public static AutoAuthRsaReqData CreateAutoAuthKeyEntity(byte[] randomEncryKey, ECDHKey cliPubECDHKey)
123 | {
124 | AutoAuthRsaReqData.Builder key = new AutoAuthRsaReqData.Builder();
125 | SKBuiltinBuffer_t.Builder skbb = new SKBuiltinBuffer_t.Builder();
126 | skbb.SetILen(16);
127 | skbb.SetBuffer(ByteString.CopyFrom(randomEncryKey));
128 | key.SetAesEncryptKey(skbb);
129 | key.SetCliPubECDHKey(cliPubECDHKey);
130 |
131 | return key.Build();
132 | }
133 |
134 | public static ManualAuthRequest CreateManualAuthRequestEntity(BaseRequest br, string imei, string MANUFACTURER, string MODEL, string OSType,
135 | string fingerprint, string clientID, string abi, string deviceType)
136 | {
137 | ManualAuthRequest.Builder aqb = new ManualAuthRequest.Builder();
138 | aqb.SetBase(br);
139 | aqb.SetIMEI(imei);
140 | aqb.SetSoftType(fingerprint);
141 | aqb.SetBuiltinIpseq(0);
142 | aqb.SetClientSeqId(clientID);
143 | aqb.SetSignature("18c867f0717aa67b2ab7347505ba07ed");
144 | aqb.SetDeviceName(MANUFACTURER + "-" + MODEL);
145 | aqb.SetDeviceType(deviceType);
146 | aqb.SetLanguage("zh_CN");
147 | aqb.SetTimeZone("8.00");
148 | aqb.SetChannel(0);
149 | aqb.SetTimeStamp(0);
150 | aqb.SetDeviceBrand(MANUFACTURER);
151 | aqb.SetDeviceModel(MODEL + abi);
152 | aqb.SetOSType(OSType);
153 | aqb.SetCountryCode("cn");
154 | aqb.SetInputType(1);
155 |
156 | ManualAuthRequest ar = aqb.Build();
157 |
158 | return ar;
159 | }
160 |
161 | public static AutoAuthRequest CreateAutoAuthRequestEntity(BaseRequest br, string imei, string MANUFACTURER, string MODEL, string RELEASE,
162 | string INCREMENTAL, string DISPLAY, string OSType, SKBuiltinBuffer_t autoauthkey)
163 | {
164 | AutoAuthRequest.Builder aqb = new AutoAuthRequest.Builder();
165 | aqb.SetBase(br);
166 | aqb.SetAutoAuthKey(autoauthkey);
167 | aqb.SetIMEI(imei);
168 | aqb.SetSoftType("");
169 | aqb.SetBuiltinIpseq(0);
170 | aqb.SetClientSeqId("");
171 | aqb.SetSignature("18c867f0717aa67b2ab7347505ba07ed");
172 | aqb.SetDeviceName("Xiaomi-MI 2S");
173 | aqb.SetDeviceType("");
176 | aqb.SetLanguage("zh_CN");
177 | aqb.SetTimeZone("8.00");
178 |
179 | AutoAuthRequest ar = aqb.Build();
180 |
181 | return ar;
182 | }
183 |
184 |
185 |
186 | public static AuthRequest CreateAuthRequestEntity(BaseRequest br, string wxAccount, string wxPwd, string imei, string deviceBrand, string deviceModel, byte[] randomEncryKey, string imgSID, string code, string imgKey)
187 | {
188 | AuthRequest ar = null;
189 |
190 | return ar;
191 | }
192 |
193 | public static NewInitRequest CreateNewInitRequestEntity(uint uin, string sessionKey, string userName, string deviceID, string OSType, byte[] init, byte[] max)
194 | {
195 | BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType, 3);
196 |
197 | NewInitRequest.Builder nirb = new NewInitRequest.Builder();
198 | nirb.SetBase(br);
199 | nirb.SetUserName(userName);
200 | nirb.SetLanguage("zh_CN");
201 |
202 | SKBuiltinBuffer_t.Builder csb = new SKBuiltinBuffer_t.Builder();
203 |
204 | if (init == null)
205 | {
206 | csb.SetILen(0);
207 | csb.SetBuffer(ByteString.CopyFrom(new byte[0] { }));
208 | }
209 | else
210 | {
211 | csb.SetILen(init.Length);
212 | csb.SetBuffer(ByteString.CopyFrom(init));
213 | }
214 | SKBuiltinBuffer_t cs = csb.Build();
215 | nirb.SetCurrentSynckey(cs);
216 |
217 | SKBuiltinBuffer_t.Builder msb = new SKBuiltinBuffer_t.Builder();
218 | if (max == null)
219 | {
220 | msb.SetILen(0);
221 | msb.SetBuffer(ByteString.CopyFrom(new byte[0] { }));
222 | }
223 | else
224 | {
225 | msb.SetILen(max.Length);
226 | msb.SetBuffer(ByteString.CopyFrom(max));
227 | }
228 | SKBuiltinBuffer_t ms = msb.Build();
229 | nirb.SetMaxSynckey(ms);
230 |
231 | NewInitRequest nir = nirb.Build();
232 |
233 | return nir;
234 | }
235 |
236 | public static NewSyncRequest CreateNewSyncRequestEntity(byte[] keyBuffer, string deviceID)
237 | {
238 | NewSyncRequest.Builder nsrb = new NewSyncRequest.Builder();
239 | CmdList.Builder clb = new CmdList.Builder();
240 | clb.SetCount(0);
241 | nsrb.SetOplog(clb.Build());
242 | nsrb.SetSelector(3);
243 | nsrb.SetScene(7);
244 | SKBuiltinBuffer_t.Builder skb = new SKBuiltinBuffer_t.Builder();
245 | skb.SetBuffer(ByteString.CopyFrom(keyBuffer));
246 | skb.SetILen(keyBuffer.Length);
247 | nsrb.SetKeyBuf(skb.Build());
248 | nsrb.SetDeviceType(deviceID);
249 | nsrb.SetSyncMsgDigest(1);
250 |
251 | NewSyncRequest nsr = nsrb.Build();
252 |
253 | return nsr;
254 | }
255 |
256 | public static NewRegRequest CreateNewRegReqest() {
257 | NewRegRequest.Builder reg = new NewRegRequest.Builder();
258 | //reg.set
259 |
260 | return reg.Build();
261 | }
262 |
263 | public static MMSnsSyncRequest CreateMMSnsSyncRequest(string deviceID,string sessionKey,uint uin,string OSType, byte[] keyBuffer) {
264 | BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType, 3);
265 | MMSnsSyncRequest.Builder SnsSync = new MMSnsSyncRequest.Builder();
266 | SnsSync.SetSelector(509);
267 | SnsSync.SetBase(br);
268 | SKBuiltinBuffer_t.Builder skb = new SKBuiltinBuffer_t.Builder();
269 | skb.SetBuffer(ByteString.CopyFrom(keyBuffer));
270 | skb.SetILen(keyBuffer.Length);
271 |
272 | SnsSync.SetKeyBuf(skb);
273 |
274 | MMSnsSyncRequest MMsnsyn = SnsSync.Build();
275 | return MMsnsyn;
276 | }
277 |
278 | //public static MMSnsPostResponse CreateMMSnsPostResponse(string deviceID, string sessionKey, uint uin, string OSType, byte[] keyBuffer) {
279 | // BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType, 3);
280 | // MMSnsPostRequest.Builder builder = new MMSnsPostRequest.Builder();
281 |
282 |
283 | // mm.command.NewInitResponse niReceive = mm.command.NewInitResponse.ParseFrom("0A570A105D64797E40587E3653492B3770767C6D10E5DA8D81031A20353332363435314632303045304431333043453441453237323632423631363920A28498B0012A1369506164206950686F6E65204F53392E332E33300012810808FB0712FB073C54696D656C696E654F626A6563743E3C69643E31323534323132393139333538343234323934373C2F69643E3C757365726E616D653E777869645F6B727862626D68316A75646533313C2F757365726E616D653E3C63726561746554696D653E313439353133383331303C2F63726561746554696D653E3C636F6E74656E74446573633EE2809CE7BEA1E68595E982A3E4BA9BE4B880E6B2BEE79D80E69E95E5A4B4E5B0B1E883BDE5AE89E79DA1E79A84E4BABAE5928CE982A3E4BA9BE586B3E5BF83E694BEE6898BE4B98BE5908EE5B0B1E4B88DE5868DE59B9EE5A4B4E79A84E4BABAE2809D3C2F636F6E74656E74446573633E3C636F6E74656E744465736353686F77547970653E303C2F636F6E74656E744465736353686F77547970653E3C636F6E74656E74446573635363656E653E333C2F636F6E74656E74446573635363656E653E3C707269766174653E303C2F707269766174653E3C7369676874466F6C6465643E303C2F7369676874466F6C6465643E3C617070496E666F3E3C69643E3C2F69643E3C76657273696F6E3E3C2F76657273696F6E3E3C6170704E616D653E3C2F6170704E616D653E3C696E7374616C6C55726C3E3C2F696E7374616C6C55726C3E3C66726F6D55726C3E3C2F66726F6D55726C3E3C6973466F7263655570646174653E303C2F6973466F7263655570646174653E3C2F617070496E666F3E3C736F75726365557365724E616D653E3C2F736F75726365557365724E616D653E3C736F757263654E69636B4E616D653E3C2F736F757263654E69636B4E616D653E3C73746174697374696373446174613E3C2F73746174697374696373446174613E3C737461744578745374723E3C2F737461744578745374723E3C436F6E74656E744F626A6563743E3C636F6E74656E745374796C653E323C2F636F6E74656E745374796C653E3C7469746C653E3C2F7469746C653E3C6465736372697074696F6E3E3C2F6465736372697074696F6E3E3C6D656469614C6973743E3C2F6D656469614C6973743E3C636F6E74656E7455726C3E3C2F636F6E74656E7455726C3E3C2F436F6E74656E744F626A6563743E3C616374696F6E496E666F3E3C6170704D73673E3C6D657373616765416374696F6E3E3C2F6D657373616765416374696F6E3E3C2F6170704D73673E3C2F616374696F6E496E666F3E3C6C6F636174696F6E20636974793D5C225C2220706F69436C61737369667949643D5C225C2220706F694E616D653D5C225C2220706F69416464726573733D5C225C2220706F69436C617373696679547970653D5C22305C223E3C2F6C6F636174696F6E3E3C7075626C6963557365724E616D653E3C2F7075626C6963557365724E616D653E3C2F54696D656C696E654F626A6563743E0D0A1800280030003A13736E735F706F73745F313533343933333731384001580068008001009A010A0A0012001A0020002800AA010408001200C00100".ToByteArray(16,2));
284 |
285 | // niReceive.
286 | //}
287 |
288 | public static ShakereportRequest shakereport(float Latitude, float Longitude,string deviceID, string sessionKey, uint uin, string OSType) {
289 |
290 | BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType, 0);
291 |
292 | ShakereportRequest.Builder shakereport = new ShakereportRequest.Builder();
293 | shakereport.SetBase(br);
294 | shakereport.SetOpCode(0);
295 | shakereport.SetLongitude(Longitude);
296 | shakereport.SetLatitude(Latitude);
297 | shakereport.SetImgId(0);
298 | shakereport.SetTimes(1);
299 | shakereport.SetPrecision(0);
300 | ShakereportRequest request = shakereport.Build();
301 |
302 | return request;
303 | }
304 | }
305 | }
306 |
307 |
--------------------------------------------------------------------------------
/Wechat/HttpHelper.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// 类说明:HttpHelper类,用来实现Http访问,Post或者Get方式的,直接访问,带Cookie的,带证书的等方式,可以设置代理
3 | /// 重要提示:请不要自行修改本类,如果因为你自己修改后将无法升级到新版本。如果确实有什么问题请到官方网站提建议,
4 | /// 我们一定会及时修改
5 | /// 编码日期:2011-09-20
6 | /// 编 码 人:苏飞
7 | /// 联系方式:361983679
8 | /// 官方网址:http://www.sufeinet.com/thread-3-1-1.html
9 | /// 修改日期:2015-09-08
10 | /// 版 本 号:1.5
11 | ///
12 | using System;
13 | using System.Collections.Generic;
14 | using System.Text;
15 | using System.Net;
16 | using System.IO;
17 | using System.Text.RegularExpressions;
18 | using System.IO.Compression;
19 | using System.Security.Cryptography.X509Certificates;
20 | using System.Net.Security;
21 | using System.Linq;
22 | using System.Net.Cache;
23 |
24 | namespace DotNet4.Utilities
25 | {
26 | ///
27 | /// Http连接操作帮助类
28 | ///
29 | public class HttpHelper
30 | {
31 | #region 预定义方变量
32 | //默认的编码
33 | private Encoding encoding = Encoding.Default;
34 | //Post数据编码
35 | private Encoding postencoding = Encoding.Default;
36 | //HttpWebRequest对象用来发起请求
37 | private HttpWebRequest request = null;
38 | //获取影响流的数据对象
39 | private HttpWebResponse response = null;
40 | //设置本地的出口ip和端口
41 | private IPEndPoint _IPEndPoint = null;
42 | #endregion
43 |
44 | #region Public
45 |
46 | ///
47 | /// 根据相传入的数据,得到相应页面数据
48 | ///
49 | /// 参数类对象
50 | /// 返回HttpResult类型
51 | public HttpResult GetHtml(HttpItem item)
52 | {
53 | //返回参数
54 | HttpResult result = new HttpResult();
55 | try
56 | {
57 | //准备参数
58 | SetRequest(item);
59 | }
60 | catch (Exception ex)
61 | {
62 | //配置参数时出错
63 | return new HttpResult() { Cookie = string.Empty, Header = null, Html = ex.Message, StatusDescription = "配置参数时出错:" + ex.Message };
64 | }
65 | try
66 | {
67 | //请求数据
68 | using (response = (HttpWebResponse)request.GetResponse())
69 | {
70 | GetData(item, result);
71 | }
72 | }
73 | catch (WebException ex)
74 | {
75 | if (ex.Response != null)
76 | {
77 | using (response = (HttpWebResponse)ex.Response)
78 | {
79 | GetData(item, result);
80 | }
81 | }
82 | else
83 | {
84 | result.Html = ex.Message;
85 | }
86 | }
87 | catch (Exception ex)
88 | {
89 | result.Html = ex.Message;
90 | }
91 | if (item.IsToLower) result.Html = result.Html.ToLower();
92 | return result;
93 | }
94 | #endregion
95 |
96 | #region GetData
97 |
98 | ///
99 | /// 获取数据的并解析的方法
100 | ///
101 | ///
102 | ///
103 | private void GetData(HttpItem item, HttpResult result)
104 | {
105 | if (response == null)
106 | {
107 | return;
108 | }
109 | #region base
110 | //获取StatusCode
111 | result.StatusCode = response.StatusCode;
112 | //获取StatusDescription
113 | result.StatusDescription = response.StatusDescription;
114 | //获取Headers
115 | result.Header = response.Headers;
116 | //获取最后访问的URl
117 | result.ResponseUri = response.ResponseUri.ToString();
118 | //获取CookieCollection
119 | if (response.Cookies != null) result.CookieCollection = response.Cookies;
120 | //获取set-cookie
121 | if (response.Headers["set-cookie"] != null) result.Cookie = response.Headers["set-cookie"];
122 | #endregion
123 |
124 | #region byte
125 | //处理网页Byte
126 | byte[] ResponseByte = GetByte();
127 | #endregion
128 |
129 | #region Html
130 | if (ResponseByte != null & ResponseByte.Length > 0)
131 | {
132 | //设置编码
133 | SetEncoding(item, result, ResponseByte);
134 | //得到返回的HTML
135 | result.Html = encoding.GetString(ResponseByte);
136 | }
137 | else
138 | {
139 | //没有返回任何Html代码
140 | result.Html = string.Empty;
141 | }
142 | #endregion
143 | }
144 | ///
145 | /// 设置编码
146 | ///
147 | /// HttpItem
148 | /// HttpResult
149 | /// byte[]
150 | private void SetEncoding(HttpItem item, HttpResult result, byte[] ResponseByte)
151 | {
152 | //是否返回Byte类型数据
153 | if (item.ResultType == ResultType.Byte) result.ResultByte = ResponseByte;
154 | //从这里开始我们要无视编码了
155 | if (encoding == null)
156 | {
157 | Match meta = Regex.Match(Encoding.Default.GetString(ResponseByte), " 0)
160 | {
161 | c = meta.Groups[1].Value.ToLower().Trim();
162 | }
163 | if (c.Length > 2)
164 | {
165 | try
166 | {
167 | encoding = Encoding.GetEncoding(c.Replace("\"", string.Empty).Replace("'", "").Replace(";", "").Replace("iso-8859-1", "gbk").Trim());
168 | }
169 | catch
170 | {
171 | if (string.IsNullOrEmpty(response.CharacterSet))
172 | {
173 | encoding = Encoding.UTF8;
174 | }
175 | else
176 | {
177 | encoding = Encoding.GetEncoding(response.CharacterSet);
178 | }
179 | }
180 | }
181 | else
182 | {
183 | if (string.IsNullOrEmpty(response.CharacterSet))
184 | {
185 | encoding = Encoding.UTF8;
186 | }
187 | else
188 | {
189 | encoding = Encoding.GetEncoding(response.CharacterSet);
190 | }
191 | }
192 | }
193 | }
194 | ///
195 | /// 提取网页Byte
196 | ///
197 | ///
198 | private byte[] GetByte()
199 | {
200 | byte[] ResponseByte = null;
201 | using (MemoryStream _stream = new MemoryStream())
202 | {
203 | //GZIIP处理
204 | if (response.ContentEncoding != null && response.ContentEncoding.Equals("gzip", StringComparison.InvariantCultureIgnoreCase))
205 | {
206 | //开始读取流并设置编码方式
207 | new GZipStream(response.GetResponseStream(), CompressionMode.Decompress).CopyTo(_stream, 10240);
208 | }
209 | else
210 | {
211 | //开始读取流并设置编码方式
212 | response.GetResponseStream().CopyTo(_stream, 10240);
213 | }
214 | //获取Byte
215 | ResponseByte = _stream.ToArray();
216 | }
217 | return ResponseByte;
218 | }
219 |
220 |
221 | #endregion
222 |
223 | #region SetRequest
224 |
225 | ///
226 | /// 为请求准备参数
227 | ///
228 | ///参数列表
229 | private void SetRequest(HttpItem item)
230 | {
231 |
232 | // 验证证书
233 | SetCer(item);
234 | if (item.IPEndPoint != null)
235 | {
236 | _IPEndPoint = item.IPEndPoint;
237 | //设置本地的出口ip和端口
238 | request.ServicePoint.BindIPEndPointDelegate = new BindIPEndPoint(BindIPEndPointCallback);
239 | }
240 | //设置Header参数
241 | if (item.Header != null && item.Header.Count > 0) foreach (string key in item.Header.AllKeys)
242 | {
243 | request.Headers.Add(key, item.Header[key]);
244 | }
245 | // 设置代理
246 | SetProxy(item);
247 | if (item.ProtocolVersion != null) request.ProtocolVersion = item.ProtocolVersion;
248 | request.ServicePoint.Expect100Continue = item.Expect100Continue;
249 | //请求方式Get或者Post
250 | request.Method = item.Method;
251 | request.Timeout = item.Timeout;
252 | request.KeepAlive = item.KeepAlive;
253 | request.ReadWriteTimeout = item.ReadWriteTimeout;
254 | if (!string.IsNullOrWhiteSpace(item.Host))
255 | {
256 | request.Host = item.Host;
257 | }
258 | if (item.IfModifiedSince != null) request.IfModifiedSince = Convert.ToDateTime(item.IfModifiedSince);
259 | //Accept
260 | request.Accept = item.Accept;
261 | //ContentType返回类型
262 | request.ContentType = item.ContentType;
263 | //UserAgent客户端的访问类型,包括浏览器版本和操作系统信息
264 | request.UserAgent = item.UserAgent;
265 | // 编码
266 | encoding = item.Encoding;
267 | //设置安全凭证
268 | request.Credentials = item.ICredentials;
269 | //设置Cookie
270 | SetCookie(item);
271 | //来源地址
272 | request.Referer = item.Referer;
273 | //是否执行跳转功能
274 | request.AllowAutoRedirect = item.Allowautoredirect;
275 | if (item.MaximumAutomaticRedirections > 0)
276 | {
277 | request.MaximumAutomaticRedirections = item.MaximumAutomaticRedirections;
278 | }
279 | //设置Post数据
280 | SetPostData(item);
281 | //设置最大连接
282 | if (item.Connectionlimit > 0) request.ServicePoint.ConnectionLimit = item.Connectionlimit;
283 | }
284 | ///
285 | /// 设置证书
286 | ///
287 | ///
288 | private void SetCer(HttpItem item)
289 | {
290 | if (!string.IsNullOrWhiteSpace(item.CerPath))
291 | {
292 | //这一句一定要写在创建连接的前面。使用回调的方法进行证书验证。
293 | ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);
294 | //初始化对像,并设置请求的URL地址
295 | request = (HttpWebRequest)WebRequest.Create(item.URL);
296 | SetCerList(item);
297 | //将证书添加到请求里
298 | request.ClientCertificates.Add(new X509Certificate(item.CerPath));
299 | }
300 | else
301 | {
302 | //初始化对像,并设置请求的URL地址
303 | request = (HttpWebRequest)WebRequest.Create(item.URL);
304 | SetCerList(item);
305 | }
306 | }
307 | ///
308 | /// 设置多个证书
309 | ///
310 | ///
311 | private void SetCerList(HttpItem item)
312 | {
313 | if (item.ClentCertificates != null && item.ClentCertificates.Count > 0)
314 | {
315 | foreach (X509Certificate c in item.ClentCertificates)
316 | {
317 | request.ClientCertificates.Add(c);
318 | }
319 | }
320 | }
321 | ///
322 | /// 设置Cookie
323 | ///
324 | /// Http参数
325 | private void SetCookie(HttpItem item)
326 | {
327 | if (!string.IsNullOrEmpty(item.Cookie)) request.Headers[HttpRequestHeader.Cookie] = item.Cookie;
328 | //设置CookieCollection
329 | if (item.ResultCookieType == ResultCookieType.CookieCollection)
330 | {
331 | request.CookieContainer = new CookieContainer();
332 | if (item.CookieCollection != null && item.CookieCollection.Count > 0)
333 | request.CookieContainer.Add(item.CookieCollection);
334 | }
335 | }
336 | ///
337 | /// 设置Post数据
338 | ///
339 | /// Http参数
340 | private void SetPostData(HttpItem item)
341 | {
342 | //验证在得到结果时是否有传入数据
343 | if (!request.Method.Trim().ToLower().Contains("get"))
344 | {
345 | if (item.PostEncoding != null)
346 | {
347 | postencoding = item.PostEncoding;
348 | }
349 | byte[] buffer = null;
350 | //写入Byte类型
351 | if (item.PostDataType == PostDataType.Byte && item.PostdataByte != null && item.PostdataByte.Length > 0)
352 | {
353 | //验证在得到结果时是否有传入数据
354 | buffer = item.PostdataByte;
355 | }//写入文件
356 | else if (item.PostDataType == PostDataType.FilePath && !string.IsNullOrWhiteSpace(item.Postdata))
357 | {
358 | StreamReader r = new StreamReader(item.Postdata, postencoding);
359 | buffer = postencoding.GetBytes(r.ReadToEnd());
360 | r.Close();
361 | } //写入字符串
362 | else if (!string.IsNullOrWhiteSpace(item.Postdata))
363 | {
364 | buffer = postencoding.GetBytes(item.Postdata);
365 | }
366 | if (buffer != null)
367 | {
368 | request.ContentLength = buffer.Length;
369 | request.GetRequestStream().Write(buffer, 0, buffer.Length);
370 | }
371 | }
372 | }
373 | ///
374 | /// 设置代理
375 | ///
376 | /// 参数对象
377 | private void SetProxy(HttpItem item)
378 | {
379 | bool isIeProxy = false;
380 | if (!string.IsNullOrWhiteSpace(item.ProxyIp))
381 | {
382 | isIeProxy = item.ProxyIp.ToLower().Contains("ieproxy");
383 | }
384 | if (!string.IsNullOrWhiteSpace(item.ProxyIp) && !isIeProxy)
385 | {
386 | //设置代理服务器
387 | if (item.ProxyIp.Contains(":"))
388 | {
389 | string[] plist = item.ProxyIp.Split(':');
390 | WebProxy myProxy = new WebProxy(plist[0].Trim(), Convert.ToInt32(plist[1].Trim()));
391 | //建议连接
392 | myProxy.Credentials = new NetworkCredential(item.ProxyUserName, item.ProxyPwd);
393 | //给当前请求对象
394 | request.Proxy = myProxy;
395 | }
396 | else
397 | {
398 | WebProxy myProxy = new WebProxy(item.ProxyIp, false);
399 | //建议连接
400 | myProxy.Credentials = new NetworkCredential(item.ProxyUserName, item.ProxyPwd);
401 | //给当前请求对象
402 | request.Proxy = myProxy;
403 | }
404 | }
405 | else if (isIeProxy)
406 | {
407 | //设置为IE代理
408 | }
409 | else
410 | {
411 | request.Proxy = item.WebProxy;
412 | }
413 | }
414 |
415 |
416 | #endregion
417 |
418 | #region private main
419 | ///
420 | /// 回调验证证书问题
421 | ///
422 | /// 流对象
423 | /// 证书
424 | /// X509Chain
425 | /// SslPolicyErrors
426 | /// bool
427 | private bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors) { return true; }
428 |
429 | ///
430 | /// 通过设置这个属性,可以在发出连接的时候绑定客户端发出连接所使用的IP地址。
431 | ///
432 | ///
433 | ///
434 | ///
435 | ///
436 | private IPEndPoint BindIPEndPointCallback(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount)
437 | {
438 | return _IPEndPoint;//端口号
439 | }
440 | #endregion
441 | }
442 |
443 | #region public calss
444 | ///
445 | /// Http请求参考类
446 | ///
447 | public class HttpItem
448 | {
449 | ///
450 | /// 请求URL必须填写
451 | ///
452 | public string URL { get; set; }
453 | string _Method = "GET";
454 | ///
455 | /// 请求方式默认为GET方式,当为POST方式时必须设置Postdata的值
456 | ///
457 | public string Method
458 | {
459 | get { return _Method; }
460 | set { _Method = value; }
461 | }
462 | int _Timeout = 100000;
463 | ///
464 | /// 默认请求超时时间
465 | ///
466 | public int Timeout
467 | {
468 | get { return _Timeout; }
469 | set { _Timeout = value; }
470 | }
471 | int _ReadWriteTimeout = 30000;
472 | ///
473 | /// 默认写入Post数据超时间
474 | ///
475 | public int ReadWriteTimeout
476 | {
477 | get { return _ReadWriteTimeout; }
478 | set { _ReadWriteTimeout = value; }
479 | }
480 | ///
481 | /// 设置Host的标头信息
482 | ///
483 | public string Host { get; set; }
484 | Boolean _KeepAlive = true;
485 | ///
486 | /// 获取或设置一个值,该值指示是否与 Internet 资源建立持久性连接默认为true。
487 | ///
488 | public Boolean KeepAlive
489 | {
490 | get { return _KeepAlive; }
491 | set { _KeepAlive = value; }
492 | }
493 | string _Accept = "text/html, application/xhtml+xml, */*";
494 | ///
495 | /// 请求标头值 默认为text/html, application/xhtml+xml, */*
496 | ///
497 | public string Accept
498 | {
499 | get { return _Accept; }
500 | set { _Accept = value; }
501 | }
502 | string _ContentType = "text/html";
503 | ///
504 | /// 请求返回类型默认 text/html
505 | ///
506 | public string ContentType
507 | {
508 | get { return _ContentType; }
509 | set { _ContentType = value; }
510 | }
511 | string _UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";
512 | ///
513 | /// 客户端访问信息默认Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
514 | ///
515 | public string UserAgent
516 | {
517 | get { return _UserAgent; }
518 | set { _UserAgent = value; }
519 | }
520 | ///
521 | /// 返回数据编码默认为NUll,可以自动识别,一般为utf-8,gbk,gb2312
522 | ///
523 | public Encoding Encoding { get; set; }
524 | private PostDataType _PostDataType = PostDataType.String;
525 | ///
526 | /// Post的数据类型
527 | ///
528 | public PostDataType PostDataType
529 | {
530 | get { return _PostDataType; }
531 | set { _PostDataType = value; }
532 | }
533 | ///
534 | /// Post请求时要发送的字符串Post数据
535 | ///
536 | public string Postdata { get; set; }
537 | ///
538 | /// Post请求时要发送的Byte类型的Post数据
539 | ///
540 | public byte[] PostdataByte { get; set; }
541 | ///
542 | /// Cookie对象集合
543 | ///
544 | public CookieCollection CookieCollection { get; set; }
545 | ///
546 | /// 请求时的Cookie
547 | ///
548 | public string Cookie { get; set; }
549 | ///
550 | /// 来源地址,上次访问地址
551 | ///
552 | public string Referer { get; set; }
553 | ///
554 | /// 证书绝对路径
555 | ///
556 | public string CerPath { get; set; }
557 | ///
558 | /// 设置代理对象,不想使用IE默认配置就设置为Null,而且不要设置ProxyIp
559 | ///
560 | public WebProxy WebProxy { get; set; }
561 | private Boolean isToLower = false;
562 | ///
563 | /// 是否设置为全文小写,默认为不转化
564 | ///
565 | public Boolean IsToLower
566 | {
567 | get { return isToLower; }
568 | set { isToLower = value; }
569 | }
570 | private Boolean allowautoredirect = false;
571 | ///
572 | /// 支持跳转页面,查询结果将是跳转后的页面,默认是不跳转
573 | ///
574 | public Boolean Allowautoredirect
575 | {
576 | get { return allowautoredirect; }
577 | set { allowautoredirect = value; }
578 | }
579 | private int connectionlimit = 1024;
580 | ///
581 | /// 最大连接数
582 | ///
583 | public int Connectionlimit
584 | {
585 | get { return connectionlimit; }
586 | set { connectionlimit = value; }
587 | }
588 | ///
589 | /// 代理Proxy 服务器用户名
590 | ///
591 | public string ProxyUserName { get; set; }
592 | ///
593 | /// 代理 服务器密码
594 | ///
595 | public string ProxyPwd { get; set; }
596 | ///
597 | /// 代理 服务IP,如果要使用IE代理就设置为ieproxy
598 | ///
599 | public string ProxyIp { get; set; }
600 | private ResultType resulttype = ResultType.String;
601 | ///
602 | /// 设置返回类型String和Byte
603 | ///
604 | public ResultType ResultType
605 | {
606 | get { return resulttype; }
607 | set { resulttype = value; }
608 | }
609 | private WebHeaderCollection header = new WebHeaderCollection();
610 | ///
611 | /// header对象
612 | ///
613 | public WebHeaderCollection Header
614 | {
615 | get { return header; }
616 | set { header = value; }
617 | }
618 | ///
619 | // 获取或设置用于请求的 HTTP 版本。返回结果:用于请求的 HTTP 版本。默认为 System.Net.HttpVersion.Version11。
620 | ///
621 | public Version ProtocolVersion { get; set; }
622 | private Boolean _expect100continue = true;
623 | ///
624 | /// 获取或设置一个 System.Boolean 值,该值确定是否使用 100-Continue 行为。如果 POST 请求需要 100-Continue 响应,则为 true;否则为 false。默认值为 true。
625 | ///
626 | public Boolean Expect100Continue
627 | {
628 | get { return _expect100continue; }
629 | set { _expect100continue = value; }
630 | }
631 | ///
632 | /// 设置509证书集合
633 | ///
634 | public X509CertificateCollection ClentCertificates { get; set; }
635 | ///
636 | /// 设置或获取Post参数编码,默认的为Default编码
637 | ///
638 | public Encoding PostEncoding { get; set; }
639 | private ResultCookieType _ResultCookieType = ResultCookieType.String;
640 | ///
641 | /// Cookie返回类型,默认的是只返回字符串类型
642 | ///
643 | public ResultCookieType ResultCookieType
644 | {
645 | get { return _ResultCookieType; }
646 | set { _ResultCookieType = value; }
647 | }
648 | private ICredentials _ICredentials = CredentialCache.DefaultCredentials;
649 | ///
650 | /// 获取或设置请求的身份验证信息。
651 | ///
652 | public ICredentials ICredentials
653 | {
654 | get { return _ICredentials; }
655 | set { _ICredentials = value; }
656 | }
657 | ///
658 | /// 设置请求将跟随的重定向的最大数目
659 | ///
660 | public int MaximumAutomaticRedirections { get; set; }
661 | private DateTime? _IfModifiedSince = null;
662 | ///
663 | /// 获取和设置IfModifiedSince,默认为当前日期和时间
664 | ///
665 | public DateTime? IfModifiedSince
666 | {
667 | get { return _IfModifiedSince; }
668 | set { _IfModifiedSince = value; }
669 | }
670 | #region ip-port
671 | private IPEndPoint _IPEndPoint = null;
672 | ///
673 | /// 设置本地的出口ip和端口
674 | /// ]
675 | ///
676 | ///item.IPEndPoint = new IPEndPoint(IPAddress.Parse("192.168.1.1"),80);
677 | ///
678 | public IPEndPoint IPEndPoint
679 | {
680 | get { return _IPEndPoint; }
681 | set { _IPEndPoint = value; }
682 | }
683 | #endregion
684 | }
685 | ///
686 | /// Http返回参数类
687 | ///
688 | public class HttpResult
689 | {
690 | ///
691 | /// Http请求返回的Cookie
692 | ///
693 | public string Cookie { get; set; }
694 | ///
695 | /// Cookie对象集合
696 | ///
697 | public CookieCollection CookieCollection { get; set; }
698 | private string _html = string.Empty;
699 | ///
700 | /// 返回的String类型数据 只有ResultType.String时才返回数据,其它情况为空
701 | ///
702 | public string Html
703 | {
704 | get { return _html; }
705 | set { _html = value; }
706 | }
707 | ///
708 | /// 返回的Byte数组 只有ResultType.Byte时才返回数据,其它情况为空
709 | ///
710 | public byte[] ResultByte { get; set; }
711 | ///
712 | /// header对象
713 | ///
714 | public WebHeaderCollection Header { get; set; }
715 | ///
716 | /// 返回状态说明
717 | ///
718 | public string StatusDescription { get; set; }
719 | ///
720 | /// 返回状态码,默认为OK
721 | ///
722 | public HttpStatusCode StatusCode { get; set; }
723 | ///
724 | /// 最后访问的URl
725 | ///
726 | public string ResponseUri { get; set; }
727 | ///
728 | /// 获取重定向的URl
729 | ///
730 | public string RedirectUrl
731 | {
732 | get
733 | {
734 | try
735 | {
736 | if (Header != null && Header.Count > 0)
737 | {
738 | if (Header.AllKeys.Any(k => k.ToLower().Contains("location")))
739 | {
740 | string locationurl = Header["location"].ToString().ToLower();
741 |
742 | if (!string.IsNullOrWhiteSpace(locationurl))
743 | {
744 | bool b = locationurl.StartsWith("http://") || locationurl.StartsWith("https://");
745 | if (!b)
746 | {
747 | locationurl = new Uri(new Uri(ResponseUri), locationurl).AbsoluteUri;
748 | }
749 | }
750 | return locationurl;
751 | }
752 | }
753 | }
754 | catch { }
755 | return string.Empty;
756 | }
757 | }
758 | }
759 | ///
760 | /// 返回类型
761 | ///
762 | public enum ResultType
763 | {
764 | ///
765 | /// 表示只返回字符串 只有Html有数据
766 | ///
767 | String,
768 | ///
769 | /// 表示返回字符串和字节流 ResultByte和Html都有数据返回
770 | ///
771 | Byte
772 | }
773 | ///
774 | /// Post的数据格式默认为string
775 | ///
776 | public enum PostDataType
777 | {
778 | ///
779 | /// 字符串类型,这时编码Encoding可不设置
780 | ///
781 | String,
782 | ///
783 | /// Byte类型,需要设置PostdataByte参数的值编码Encoding可设置为空
784 | ///
785 | Byte,
786 | ///
787 | /// 传文件,Postdata必须设置为文件的绝对路径,必须设置Encoding的值
788 | ///
789 | FilePath
790 | }
791 | ///
792 | /// Cookie返回类型
793 | ///
794 | public enum ResultCookieType
795 | {
796 | ///
797 | /// 只返回字符串类型的Cookie
798 | ///
799 | String,
800 | ///
801 | /// CookieCollection格式的Cookie集合同时也返回String类型的cookie
802 | ///
803 | CookieCollection
804 | }
805 | #endregion
806 | }
--------------------------------------------------------------------------------
/Wechat/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using System.Windows.Forms;
6 |
7 | namespace Wechat
8 | {
9 | static class Program
10 | {
11 | ///
12 | /// 应用程序的主入口点。
13 | ///
14 | [STAThread]
15 | static void Main()
16 | {
17 | Application.EnableVisualStyles();
18 | Application.SetCompatibleTextRenderingDefault(false);
19 | Application.Run(new Form1());
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Wechat/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的一般信息由以下
6 | // 控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("Wechat")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("Wechat")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2018")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 会使此程序集中的类型
18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
19 | //请将此类型的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("c4b71771-883f-46b2-860b-63f6b1c70831")]
24 |
25 | // 程序集的版本信息由下列四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 生成号
30 | // 修订号
31 | //
32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
33 | // 方法是按如下所示使用“*”: :
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Wechat/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本: 4.0.30319.42000
5 | //
6 | // 对此文件的更改可能导致不正确的行为,如果
7 | // 重新生成代码,则所做更改将丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Wechat.Properties
12 | {
13 |
14 |
15 | ///
16 | /// 强类型资源类,用于查找本地化字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources
26 | {
27 |
28 | private static global::System.Resources.ResourceManager resourceMan;
29 |
30 | private static global::System.Globalization.CultureInfo resourceCulture;
31 |
32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
33 | internal Resources()
34 | {
35 | }
36 |
37 | ///
38 | /// 返回此类使用的缓存 ResourceManager 实例。
39 | ///
40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
41 | internal static global::System.Resources.ResourceManager ResourceManager
42 | {
43 | get
44 | {
45 | if ((resourceMan == null))
46 | {
47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Wechat.Properties.Resources", typeof(Resources).Assembly);
48 | resourceMan = temp;
49 | }
50 | return resourceMan;
51 | }
52 | }
53 |
54 | ///
55 | /// 覆盖当前线程的 CurrentUICulture 属性
56 | /// 使用此强类型的资源类的资源查找。
57 | ///
58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
59 | internal static global::System.Globalization.CultureInfo Culture
60 | {
61 | get
62 | {
63 | return resourceCulture;
64 | }
65 | set
66 | {
67 | resourceCulture = value;
68 | }
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/Wechat/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | text/microsoft-resx
107 |
108 |
109 | 2.0
110 |
111 |
112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
113 |
114 |
115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
--------------------------------------------------------------------------------
/Wechat/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Wechat.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Wechat/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Wechat/RSAEncryptData.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Security.Cryptography;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Wchat
9 | {
10 | public class RSAEncryptData
11 | {
12 | static public string rsaKey2 = "";
13 |
14 | static string rsaKey = "BD6A54477640F0C0B209DB7747126896B27FB6B219AB9BC9C4CD9661F422E143A75AB2C34EAB88F44719D8D2E0D57CEC9713748BF821EC2014DF97B01CCE262F27CA24F4D89492F99DC8C1A414D0B8E760D815DF53A911D5D807CAF6827084BBE825A49C1BB9369675C4BE435597565B5C4222090235F6A5595003D5D5FA6780EBD51CEAC76D03D8EB9F97B45299719F7C352B2EF32449E0FDD09B562BA0317418B66FC0853EA9F5FFA85EAB8A14E2785C02B0CAC6AFD450EE5A6971C220E72FE6FA4B781235F39D206734C9974127E369E479BF3255FFF8C5FA4B133C642A5656A8E5F176472C5A3FE18D8816E40E58ABC2A4A32BA056EB0B504C86DAE05907";
15 |
16 | static string rsaKeyNewReg = "BD6A54477640F0C0B209DB7747126896B27FB6B219AB9BC9C4CD9661F422E143A75AB2C34EAB88F44719D8D2E0D57CEC9713748BF821EC2014DF97B01CCE262F27CA24F4D89492F99DC8C1A414D0B8E760D815DF53A911D5D807CAF6827084BBE825A49C1BB9369675C4BE435597565B5C4222090235F6A5595003D5D5FA6780EBD51CEAC76D03D8EB9F97B45299719F7C352B2EF32449E0FDD09B562BA0317418B66FC0853EA9F5FFA85EAB8A14E2785C02B0CAC6AFD450EE5A6971C220E72FE6FA4B781235F39D206734C9974127E369E479BF3255FFF8C5FA4B133C642A5656A8E5F176472C5A3FE18D8816E40E58ABC2A4A32BA056EB0B504C86DAE05907";
17 |
18 |
19 | public static byte[] RSAEncryptUnlock(byte[] data)
20 | {
21 | byte[] rasResult = null;
22 |
23 | int rsaLen = 256 - 12;
24 | byte[] aaa1 = new byte[rsaLen];
25 | byte[] aaa2 = new byte[rsaLen];
26 | byte[] aaa3 = new byte[rsaLen];
27 | byte[] aaa4 = new byte[data.Length - 3 * rsaLen];
28 | Array.Copy(data, 0 * rsaLen, aaa1, 0, rsaLen);
29 | Array.Copy(data, 1 * rsaLen, aaa2, 0, rsaLen);
30 | Array.Copy(data, 2 * rsaLen, aaa3, 0, rsaLen);
31 | Array.Copy(data, 3 * rsaLen, aaa4, 0, data.Length - rsaLen * 3);
32 |
33 | //rsa加密
34 | byte[] byteKey = null;
35 | if (rsaKey2 == "")
36 | {
37 | byteKey = strToToHexByte(rsaKey);
38 | }
39 | else
40 | {
41 | byteKey = strToToHexByte(rsaKey2);
42 | }
43 | string base64Key = Convert.ToBase64String(byteKey);
44 |
45 | byte[] rsa1 = RSAEncrypt(base64Key, aaa1);
46 | byte[] rsa2 = RSAEncrypt(base64Key, aaa2);
47 | byte[] rsa3 = RSAEncrypt(base64Key, aaa3);
48 | byte[] rsa4 = RSAEncrypt(base64Key, aaa4);
49 |
50 | rasResult = rsa1.Concat(rsa2).Concat(rsa3).Concat(rsa4).ToArray();
51 |
52 | return rasResult;
53 | }
54 |
55 |
56 | public static byte[] RSAEncryptCoreData(byte[] data)
57 | {
58 | byte[] rasResult = null;
59 |
60 | if (data.Length <= 256)
61 | {
62 | //rsa加密
63 | byte[] byteKey = strToToHexByte(rsaKey);
64 | string base64Key = Convert.ToBase64String(byteKey);
65 | rasResult = RSAEncrypt(base64Key, data);
66 | }
67 | else
68 | {
69 | byte[] aaa1 = data.Take(256 - 12).ToArray();
70 | byte[] aaa2 = data.Take(data.Length).Skip(256 - 12).ToArray();
71 | //rsa加密
72 | byte[] byteKey = strToToHexByte(rsaKey);
73 | string base64Key = Convert.ToBase64String(byteKey);
74 | byte[] rsa1 = RSAEncrypt(base64Key, aaa1);
75 |
76 | //rsa加密
77 | byte[] rsa2 = RSAEncrypt(base64Key, aaa2);
78 | rasResult = rsa1.Concat(rsa2).ToArray();
79 | }
80 |
81 | return rasResult;
82 | }
83 |
84 | static byte[] RSAEncrypt(string publickey, byte[] byt)
85 | {
86 | publickey = @"" + publickey + "AQAB";
87 | RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
88 | byte[] cipherbytes;
89 | rsa.FromXmlString(publickey);
90 | cipherbytes = rsa.Encrypt(byt, false);
91 |
92 | return cipherbytes;
93 | }
94 |
95 | static byte[] strToToHexByte(string hexString)
96 | {
97 | hexString = hexString.Replace(" ", "");
98 | if ((hexString.Length % 2) != 0)
99 | hexString += " ";
100 | byte[] returnBytes = new byte[hexString.Length / 2];
101 | for (int i = 0; i < returnBytes.Length; i++)
102 | returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
103 | return returnBytes;
104 | }
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/Wechat/Util.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using CRYPT;
8 | using System.Security.Cryptography;
9 | using DotNet4.Utilities;
10 | using ProtoBuf;
11 | using System.Runtime.InteropServices;
12 | using System.Web.Script.Serialization;
13 |
14 | namespace Wchat
15 | {
16 | public class Util
17 | {
18 | [DllImport("CodeDecrypt.dll", EntryPoint = "Zip")]
19 | private static extern int Zip(byte[] srcByte, int srcLen, byte[] dstByte, int dstLen);
20 | [DllImport("Common.dll")]
21 | public static extern int GenerateECKey(int nid, byte[] pub, byte[] pri);
22 |
23 | [DllImport("Common.dll")]
24 | public static extern int ComputerECCKeyMD5(byte[] pub, int pubLen, byte[] pri, int priLen, byte[] eccKey);
25 |
26 |
27 | public static string shortUrl = "http://hkshort.weixin.qq.com";
28 | ///
29 | /// 序列化
30 | ///
31 | ///
32 | ///
33 | ///
34 | public static string SerializeToString(t T)
35 | {
36 | using (MemoryStream ms = new MemoryStream())
37 | {
38 | ProtoBuf.Serializer.Serialize(ms, T);
39 |
40 | ProtoBuf.Serializer.Deserialize(ms);
41 |
42 | return Encoding.ASCII.GetString(ms.ToArray());
43 | }
44 | }
45 |
46 | public static T Deserialize(byte[] data)
47 | {
48 | T t = default(T);
49 | try
50 | {
51 | t = ProtoBuf.Serializer.Deserialize(new MemoryStream(data));
52 | }
53 | catch (Exception ex)
54 | {
55 | Console.WriteLine("解析成对象出错!");
56 | }
57 | return t;
58 |
59 |
60 | }
61 |
62 | public static byte[] Serialize(T data)
63 | {
64 | MemoryStream memoryStream = new MemoryStream();
65 | ProtoBuf.Serializer.Serialize(memoryStream, data);
66 | return memoryStream.ToArray();
67 | }
68 |
69 | public static byte[] nocompress_rsa(byte[] data)
70 | {
71 | RSA rsa = RSA.Create();
72 | rsa.ImportParameters(new RSAParameters() { Exponent = "010001".ToByteArray(16, 2), Modulus = "D153E8A2B314D2110250A0A550DDACDCD77F5801F3D1CC21CB1B477E4F2DE8697D40F10265D066BE8200876BB7135EDC74CDBC7C4428064E0CDCBE1B6B92D93CEAD69EC27126DEBDE564AAE1519ACA836AA70487346C85931273E3AA9D24A721D0B854A7FCB9DED49EE03A44C189124FBEB8B17BB1DBE47A534637777D33EEC88802CD56D0C7683A796027474FEBF237FA5BF85C044ADC63885A70388CD3696D1F2E466EB6666EC8EFE1F91BC9353F8F0EAC67CC7B3281F819A17501E15D03291A2A189F6A35592130DE2FE5ED8E3ED59F65C488391E2D9557748D4065D00CBEA74EB8CA19867C65B3E57237BAA8BF0C0F79EBFC72E78AC29621C8AD61A2B79B".ToByteArray(16, 2) });
73 |
74 | return rsa.Encrypt(data, RSAEncryptionPadding.Pkcs1);
75 | }
76 |
77 | public static byte[] HttpPost(byte[] data, string Url_GCI)
78 | {
79 | //Console.WriteLine(shortUrl + Url_GCI);
80 | HttpHelper http = new HttpHelper();
81 | HttpItem item = new HttpItem()
82 | {
83 | URL = shortUrl + Url_GCI,
84 | Method = "post",
85 | PostdataByte = data,
86 | PostDataType = PostDataType.Byte,
87 | UserAgent = "MicroMessenger Client",
88 | Accept = "*/*",
89 | ContentType = "application/octet-stream",
90 | //sessionid = SEC_SF_edcd630591726845634a339fa1e14168; Domain =.weixin110.qq.com; Path =/; Secure; HttpOnly
91 | ResultType = ResultType.Byte,
92 | ProxyIp = "",
93 | };
94 |
95 | HttpResult ret = http.GetHtml(item);
96 | // Console.WriteLine(ret.ResultByte.ToString(16, 2));
97 | return ret.ResultByte == null ? new byte[2] { 1, 2 } : ret.ResultByte;
98 | }
99 | ///
100 | /// AES解密 先解密后解压
101 | ///
102 | ///
103 | ///
104 | ///
105 | public static byte[] uncompress_aes(byte[] data, byte[] key)
106 | {
107 | try
108 | {
109 | data = AES.AESDecrypt(data, key);
110 | data = ZipUtils.deCompressBytes(data);
111 | }
112 | catch (Exception ex)
113 | {
114 | Console.WriteLine(ex.ToString());
115 | }
116 | return data;
117 | }
118 | ///
119 | /// 生成62数据
120 | ///
121 | ///
122 | ///
123 | public static string SixTwoData(string imei)
124 | {
125 |
126 | /// string randStr = Time_Stamp().ToString();//随机字符串
127 | string hexStr = HexToStr(System.Text.Encoding.Default.GetBytes(imei)).Replace(" ", "");
128 | string str = "62706c6973743030d4010203040506090a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a2070855246e756c6c5f1020" + hexStr + "5f100f4e534b657965644172636869766572d10b0c54726f6f74800108111a232d32373a406375787d0000000000000101000000000000000d0000000000000000000000000000007f";
129 | return str;
130 | }
131 | ///
132 | /// 获取62数据设备信息
133 | ///
134 | /// 62数据
135 | ///
136 | public static string Get62Key(string Data)
137 | {
138 | int FinIndex = Data.IndexOf("6E756C6C5F1020", StringComparison.CurrentCultureIgnoreCase);
139 |
140 | if (FinIndex == -1)
141 | {
142 | return "3267b9918eb51294259866a6360432c0";
143 | }
144 |
145 | int head = FinIndex + "6E756C6C5F1020".Length;
146 | Console.WriteLine(Data.Substring(head, 64));
147 | return Encoding.Default.GetString(Data.Substring(head, 64).ToByteArray(16, 2));
148 | }
149 | ///
150 | /// //AES解密 只解密
151 | ///
152 | ///
153 | ///
154 | ///
155 | public static byte[] nouncompress_aes(byte[] data, byte[] key)
156 | {
157 | data = AES.AESDecrypt(data, key);
158 | //data = ZipUtils.deCompressBytes(data);
159 | return data;
160 | }
161 | public static byte[] compress_rsa(byte[] data)
162 | {
163 |
164 | using (RSA rsa = RSA.Create())
165 | {
166 | byte[] strOut = new byte[] { };
167 | rsa.ImportParameters(new RSAParameters() { Exponent = "010001".ToByteArray(16, 2), Modulus = "D153E8A2B314D2110250A0A550DDACDCD77F5801F3D1CC21CB1B477E4F2DE8697D40F10265D066BE8200876BB7135EDC74CDBC7C4428064E0CDCBE1B6B92D93CEAD69EC27126DEBDE564AAE1519ACA836AA70487346C85931273E3AA9D24A721D0B854A7FCB9DED49EE03A44C189124FBEB8B17BB1DBE47A534637777D33EEC88802CD56D0C7683A796027474FEBF237FA5BF85C044ADC63885A70388CD3696D1F2E466EB6666EC8EFE1F91BC9353F8F0EAC67CC7B3281F819A17501E15D03291A2A189F6A35592130DE2FE5ED8E3ED59F65C488391E2D9557748D4065D00CBEA74EB8CA19867C65B3E57237BAA8BF0C0F79EBFC72E78AC29621C8AD61A2B79B".ToByteArray(16, 2) });
168 | var rsa_len = rsa.KeySize;
169 | rsa_len = rsa_len / 8;
170 | // data = ZipUtils.compressBytes(data);
171 | if (data.Length > rsa_len - 12)
172 | {
173 | int blockCnt = (data.Length / (rsa_len - 12)) + (((data.Length % (rsa_len - 12)) == 0) ? 0 : 1);
174 | //strOut.resize(blockCnt * rsa_len);
175 |
176 | for (int i = 0; i < blockCnt; ++i)
177 | {
178 | int blockSize = rsa_len - 12;
179 | if (i == blockCnt - 1) blockSize = data.Length - i * blockSize;
180 | var temp = data.Copy(i * (rsa_len - 12), blockSize);
181 | strOut = strOut.Concat(rsa.Encrypt(temp, RSAEncryptionPadding.Pkcs1)).ToArray();
182 | }
183 | return strOut;
184 | }
185 | else
186 | {
187 | //strOut.resize(rsa_len);
188 | return rsa.Encrypt(data, RSAEncryptionPadding.Pkcs1);
189 | }
190 | }
191 |
192 | }
193 |
194 | public static byte[] compress_rsa_LOGIN(byte[] data)
195 | {
196 |
197 | using (RSA rsa = RSA.Create())
198 | {
199 | byte[] strOut = new byte[] { };
200 | rsa.ImportParameters(new RSAParameters() { Exponent = "010001".ToByteArray(16, 2), Modulus = "D153E8A2B314D2110250A0A550DDACDCD77F5801F3D1CC21CB1B477E4F2DE8697D40F10265D066BE8200876BB7135EDC74CDBC7C4428064E0CDCBE1B6B92D93CEAD69EC27126DEBDE564AAE1519ACA836AA70487346C85931273E3AA9D24A721D0B854A7FCB9DED49EE03A44C189124FBEB8B17BB1DBE47A534637777D33EEC88802CD56D0C7683A796027474FEBF237FA5BF85C044ADC63885A70388CD3696D1F2E466EB6666EC8EFE1F91BC9353F8F0EAC67CC7B3281F819A17501E15D03291A2A189F6A35592130DE2FE5ED8E3ED59F65C488391E2D9557748D4065D00CBEA74EB8CA19867C65B3E57237BAA8BF0C0F79EBFC72E78AC29621C8AD61A2B79B".ToByteArray(16, 2) });
201 | var rsa_len = rsa.KeySize;
202 | rsa_len = rsa_len / 8;
203 | data = ZipUtils.compressBytes(data);
204 | if (data.Length > rsa_len - 12)
205 | {
206 | int blockCnt = (data.Length / (rsa_len - 12)) + (((data.Length % (rsa_len - 12)) == 0) ? 0 : 1);
207 | //strOut.resize(blockCnt * rsa_len);
208 |
209 | for (int i = 0; i < blockCnt; ++i)
210 | {
211 | int blockSize = rsa_len - 12;
212 | if (i == blockCnt - 1) blockSize = data.Length - i * blockSize;
213 | var temp = data.Copy(i * (rsa_len - 12), blockSize);
214 | strOut = strOut.Concat(rsa.Encrypt(temp, RSAEncryptionPadding.Pkcs1)).ToArray();
215 | }
216 | return strOut;
217 | }
218 | else
219 | {
220 | //strOut.resize(rsa_len);
221 | return rsa.Encrypt(data, RSAEncryptionPadding.Pkcs1);
222 | }
223 | }
224 |
225 | }
226 |
227 |
228 | public static byte[] compress_aes(byte[] data, byte[] key)
229 | {
230 | data = ZipUtils.compressBytes(data);
231 |
232 | return AES.AESEncrypt(data, key);
233 | }
234 | public static byte[] nocompress_aes(byte[] data, byte[] key)
235 | {
236 | return AES.AESEncrypt(data, key);
237 | }
238 |
239 | public static byte[] MD5(byte[] src)
240 | {
241 | System.Security.Cryptography.MD5CryptoServiceProvider MD5CSP = new System.Security.Cryptography.MD5CryptoServiceProvider();
242 |
243 | return MD5CSP.ComputeHash(src);
244 | }
245 | public static byte[] AESEncryptorData(byte[] data, byte[] key)
246 | {
247 | AesCryptoServiceProvider aes = new AesCryptoServiceProvider();
248 | aes.Key = key.Take(16).ToArray();
249 | aes.Mode = CipherMode.CBC;
250 | aes.Padding = PaddingMode.PKCS7;
251 | aes.IV = key.Take(16).ToArray();
252 | ICryptoTransform ict = aes.CreateEncryptor();
253 | byte[] decByte = null;
254 | decByte = ict.TransformFinalBlock(data, 0, data.Length);
255 | aes.Clear();
256 |
257 | return decByte;
258 | }
259 | public static byte[] DeflateZip(byte[] srcByte)
260 | {
261 | //压缩的时候数据长度 要处理
262 | byte[] dstByte = new byte[srcByte.Length + 100];
263 | int len = Zip(srcByte, srcByte.Length, dstByte, dstByte.Length);
264 | dstByte = dstByte.Take(len).ToArray();
265 |
266 | return dstByte;
267 | }
268 |
269 | ///
270 | /// 反序列JSON
271 | ///
272 | /// JSON字符串
273 | ///
274 | public static dynamic JsonToObject(string jsonStr)
275 | {
276 |
277 | JavaScriptSerializer jsonSerialize = new JavaScriptSerializer();
278 | dynamic modelDy = "";
279 | try
280 | {
281 | modelDy = jsonSerialize.Deserialize(jsonStr); //反序列化
282 | }
283 | catch (Exception ex)
284 | {
285 | Console.WriteLine("反序列json失败发生错误");
286 | }
287 | return modelDy;
288 |
289 | }
290 |
291 | public static string HexToStr(byte[] bytes)
292 | {
293 | string returnStr = "";
294 | if (bytes != null)
295 | {
296 | for (int i = 0; i < bytes.Length; i++)
297 | {
298 | returnStr += bytes[i].ToString("x2");
299 | }
300 | }
301 | return returnStr;
302 | }
303 |
304 |
305 | public static string MD5Encrypt(string strText)
306 | {
307 | MD5 md5 = new MD5CryptoServiceProvider();
308 | byte[] result = md5.ComputeHash(Encoding.Default.GetBytes(strText));
309 | return HexToStr(result);
310 | }
311 |
312 | private static string getip()
313 | {
314 | HttpHelper http = new HttpHelper();
315 | HttpItem Item = new HttpItem()
316 | {
317 | URL = "http://www.ifunc.ink/getIp.php",
318 | };
319 |
320 | HttpResult HttpRet = http.GetHtml(Item);
321 |
322 | return HttpRet.Html;
323 |
324 | }
325 |
326 |
327 | public static string EncryptWithMD5(string source)
328 | {
329 | byte[] sor = Encoding.UTF8.GetBytes(source);
330 | MD5 md5 = System.Security.Cryptography.MD5.Create();
331 | byte[] result = md5.ComputeHash(sor);
332 | StringBuilder strbul = new StringBuilder(40);
333 | for (int i = 0; i < result.Length; i++)
334 | {
335 | strbul.Append(result[i].ToString("x2"));//加密结果"x2"结果为32位,"x3"结果为48位,"x4"结果为64位
336 |
337 | }
338 | return strbul.ToString();
339 | }
340 | }
341 |
342 |
343 |
344 | }
345 |
346 |
347 |
--------------------------------------------------------------------------------
/Wechat/Wechat.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {C4B71771-883F-46B2-860B-63F6B1C70831}
8 | WinExe
9 | Wechat
10 | Wechat
11 | v4.6.1
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\..\..\ipad协议\Wchat\Wchat\bin\Debug\ClassLibrary1.dll
38 |
39 |
40 | ..\..\..\ipad协议\Wchat\Wchat\bin\Debug\Google.ProtocolBuffers.dll
41 |
42 |
43 | ..\..\..\proto\MMPro\MMPro\bin\Debug\MMPro.dll
44 |
45 |
46 | False
47 | ..\..\..\ipad协议\Wchat\Wchat\bin\Debug\Newtonsoft.Json.dll
48 |
49 |
50 | False
51 | bin\Debug\OpenSSLNativeClass.dll
52 |
53 |
54 | ..\..\..\ipad协议\Wchat\Wchat\bin\Debug\protobuf-net.dll
55 |
56 |
57 |
58 |
59 | ..\..\..\ipad协议\Wchat\Wchat\bin\Debug\System.Extended.dll
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | ..\..\..\ipad协议\Wchat\Wchat\bin\Debug\zxing.presentation.dll
75 |
76 |
77 |
78 |
79 |
80 |
81 | Form
82 |
83 |
84 | Form1.cs
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | Form1.cs
97 |
98 |
99 | ResXFileCodeGenerator
100 | Resources.Designer.cs
101 | Designer
102 |
103 |
104 | True
105 | Resources.resx
106 |
107 |
108 | SettingsSingleFileGenerator
109 | Settings.Designer.cs
110 |
111 |
112 | True
113 | Settings.settings
114 | True
115 |
116 |
117 |
118 |
119 |
120 |
121 |
--------------------------------------------------------------------------------
/Wechat/bin/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/Wechat/bin/.DS_Store
--------------------------------------------------------------------------------
/Wechat/bin/Debug/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/Wechat/bin/Debug/.DS_Store
--------------------------------------------------------------------------------
/Wechat/obj/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/Wechat/obj/.DS_Store
--------------------------------------------------------------------------------
/Wechat/obj/Debug/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/Wechat/obj/Debug/.DS_Store
--------------------------------------------------------------------------------
/png1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/png1.png
--------------------------------------------------------------------------------
/png2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wechathelper/WeChatXY/057a31a570abdc9f67430986a0b65c3476531aff/png2.png
--------------------------------------------------------------------------------