Files
2026-01-07 11:33:05 +08:00

63 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using Fiddler;
using EmoneyInteceptor.Fiddler.Interfaces;
using EmoneyInteceptor.Fiddler.Models;
using EmoneyInteceptor.Emoney.Controls;
// is required
[assembly: RequiredVersion("4.5.1.2")]
namespace FiddlerPlugin.Fiddler.Models
{
public class EmoneyPlugin : FiddlerPluginApplication, IFiddlerViewProvider, IResponseInspector2, IWSMInspector
{
public HTTPResponseHeaders headers { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public byte[] body { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public bool bDirty => throw new NotImplementedException();
public bool bReadOnly { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public override void OnLoad()
{
FiddlerApplication.Log.LogString("Load MyFiddlerFiddlerPlugin");
// base.OnLoad() is required
base.OnLoad();
}
public override IFiddlerViewProvider GetFiddlerViewProvider()
{
return this;
}
public override void AutoTamperRequestAfter(Session oSession)
{
// do your work
}
public IList<FiddlerTabPage> BuildFiddlerTabPages()
{
string title = "益盟辅助";
EmoneyTabControl control = new EmoneyTabControl();
FiddlerApplication.OnWebSocketMessage += control.OnWebSocketMessage;
FiddlerApplication.BeforeResponse += control.BeforeResponse;
FiddlerApplication.BeforeRequest += control.BeforeRequest;
FiddlerTabPage fiddlerTabPage = new FiddlerTabPage(title, control);
return new List<FiddlerTabPage>()
{
fiddlerTabPage
};
}
public void Clear()
{
throw new NotImplementedException();
}
public void AssignMessage(WebSocketMessage oWSM)
{
throw new NotImplementedException();
}
}
}