first commit
This commit is contained in:
233
FiddlerDecryption/Controls/RequestDecodeControl.Designer.cs
generated
Normal file
233
FiddlerDecryption/Controls/RequestDecodeControl.Designer.cs
generated
Normal file
@@ -0,0 +1,233 @@
|
||||
namespace FiddlerDecryption.Controls
|
||||
{
|
||||
partial class RequestDecodeControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 组件设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tabControl1 = new System.Windows.Forms.TabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.txtSupposedClass = new System.Windows.Forms.TextBox();
|
||||
this.txtAuth = new System.Windows.Forms.TextBox();
|
||||
this.txtProtoName = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtProtoId = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tecJson = new ICSharpCode.TextEditor.TextEditorControlEx();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.tabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
this.tabControl1.Controls.Add(this.tabPage1);
|
||||
this.tabControl1.Controls.Add(this.tabPage2);
|
||||
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(552, 434);
|
||||
this.tabControl1.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.Controls.Add(this.txtSupposedClass);
|
||||
this.tabPage1.Controls.Add(this.txtAuth);
|
||||
this.tabPage1.Controls.Add(this.txtProtoName);
|
||||
this.tabPage1.Controls.Add(this.label4);
|
||||
this.tabPage1.Controls.Add(this.txtProtoId);
|
||||
this.tabPage1.Controls.Add(this.label2);
|
||||
this.tabPage1.Controls.Add(this.label3);
|
||||
this.tabPage1.Controls.Add(this.label1);
|
||||
this.tabPage1.Controls.Add(this.tecJson);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(544, 408);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "基本解析";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txtSupposedClass
|
||||
//
|
||||
this.txtSupposedClass.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSupposedClass.Location = new System.Drawing.Point(107, 32);
|
||||
this.txtSupposedClass.Name = "txtSupposedClass";
|
||||
this.txtSupposedClass.ReadOnly = true;
|
||||
this.txtSupposedClass.Size = new System.Drawing.Size(431, 21);
|
||||
this.txtSupposedClass.TabIndex = 3;
|
||||
//
|
||||
// txtAuth
|
||||
//
|
||||
this.txtAuth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtAuth.Location = new System.Drawing.Point(107, 56);
|
||||
this.txtAuth.Name = "txtAuth";
|
||||
this.txtAuth.ReadOnly = true;
|
||||
this.txtAuth.Size = new System.Drawing.Size(431, 21);
|
||||
this.txtAuth.TabIndex = 4;
|
||||
//
|
||||
// txtProtoName
|
||||
//
|
||||
this.txtProtoName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtProtoName.Location = new System.Drawing.Point(279, 8);
|
||||
this.txtProtoName.Name = "txtProtoName";
|
||||
this.txtProtoName.ReadOnly = true;
|
||||
this.txtProtoName.Size = new System.Drawing.Size(259, 21);
|
||||
this.txtProtoName.TabIndex = 2;
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(7, 36);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(89, 12);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Supposed Class";
|
||||
//
|
||||
// txtProtoId
|
||||
//
|
||||
this.txtProtoId.Location = new System.Drawing.Point(107, 8);
|
||||
this.txtProtoId.Name = "txtProtoId";
|
||||
this.txtProtoId.ReadOnly = true;
|
||||
this.txtProtoId.Size = new System.Drawing.Size(77, 21);
|
||||
this.txtProtoId.TabIndex = 1;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(6, 60);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(83, 12);
|
||||
this.label2.TabIndex = 6;
|
||||
this.label2.Text = "Authorization";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(190, 11);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(83, 12);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Protocol Name";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(6, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(71, 12);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "Protocol ID";
|
||||
//
|
||||
// tecJson
|
||||
//
|
||||
this.tecJson.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tecJson.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.tecJson.FoldingStrategy = "JSON";
|
||||
this.tecJson.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.tecJson.IsReadOnly = true;
|
||||
this.tecJson.Location = new System.Drawing.Point(6, 81);
|
||||
this.tecJson.Name = "tecJson";
|
||||
this.tecJson.Size = new System.Drawing.Size(532, 321);
|
||||
this.tecJson.SyntaxHighlighting = "JSON";
|
||||
this.tecJson.TabIndex = 5;
|
||||
this.tecJson.TextChanged += new System.EventHandler(this.tecJson_TextChanged);
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.Controls.Add(this.label5);
|
||||
this.tabPage2.Controls.Add(this.textBox1);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(544, 408);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "设置";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox1.Location = new System.Drawing.Point(89, 15);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(449, 21);
|
||||
this.textBox1.TabIndex = 0;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(6, 18);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(77, 12);
|
||||
this.label5.TabIndex = 1;
|
||||
this.label5.Text = "API Host地址";
|
||||
//
|
||||
// RequestDecodeControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.tabControl1);
|
||||
this.Name = "RequestDecodeControl";
|
||||
this.Size = new System.Drawing.Size(552, 434);
|
||||
this.tabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage1.PerformLayout();
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TabControl tabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TextBox txtSupposedClass;
|
||||
private System.Windows.Forms.TextBox txtAuth;
|
||||
private System.Windows.Forms.TextBox txtProtoName;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtProtoId;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private ICSharpCode.TextEditor.TextEditorControlEx tecJson;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
}
|
||||
}
|
||||
68
FiddlerDecryption/Controls/RequestDecodeControl.cs
Normal file
68
FiddlerDecryption/Controls/RequestDecodeControl.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FiddlerDecryption.Controls
|
||||
{
|
||||
public partial class RequestDecodeControl : UserControl
|
||||
{
|
||||
|
||||
public RequestDecodeControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void tecJson_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
UpdateAndCheckFoldings();
|
||||
}
|
||||
|
||||
private void UpdateAndCheckFoldings()
|
||||
{
|
||||
tecJson.Document.FoldingManager.UpdateFoldings(null, null);
|
||||
}
|
||||
|
||||
public void SetData(JObject jo, string auth)
|
||||
{
|
||||
txtAuth.Text = auth;
|
||||
if (jo == null)
|
||||
{
|
||||
Clear();
|
||||
return;
|
||||
}
|
||||
txtProtoId.Text = jo["protocolId"]?.Value<string>().ToString();
|
||||
txtSupposedClass.Text = jo["supposedClassName"]?.Value<string>().ToString();
|
||||
|
||||
|
||||
|
||||
if (!jo["ok"].Value<bool>())
|
||||
{
|
||||
tecJson.Text = string.Empty;
|
||||
tecJson.Text = jo["message"].Value<string>().ToString();
|
||||
UpdateAndCheckFoldings();
|
||||
}
|
||||
else
|
||||
{
|
||||
tecJson.Text = string.Empty;
|
||||
tecJson.Text = jo.ToString(Newtonsoft.Json.Formatting.Indented);
|
||||
UpdateAndCheckFoldings();
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
tecJson.Text = string.Empty;
|
||||
txtAuth.Clear();
|
||||
txtProtoId.Clear();
|
||||
txtProtoName.Clear();
|
||||
txtSupposedClass.Clear();
|
||||
}
|
||||
|
||||
public void AddToTab(TabPage o)
|
||||
{
|
||||
o.Text = "EProtobuf";
|
||||
o.Controls.Add(this);
|
||||
o.Controls[0].Dock = DockStyle.Fill;
|
||||
}
|
||||
}
|
||||
}
|
||||
120
FiddlerDecryption/Controls/RequestDecodeControl.resx
Normal file
120
FiddlerDecryption/Controls/RequestDecodeControl.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user