• 大小: 148KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: 其他
  • 标签: HTTP  报文  拦截  篡改  

资源简介

•HTTP代理实现请求报文的拦截与篡改9--实现篡改功能后的演示+源码下载 http://blog.csdn.net/duhai/article/details/22936979

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net.Sockets;
using System.Threading;
using JrIntercepter.Net;
using System.IO;

namespace JrIntercepter
{
    public partial class FrmMain : Form
    {
        private Proxy proxy; 
        // sessions    
        private IList sessions = new List(); 
 
        public FrmMain()
        {
            InitializeComponent();
            Control.CheckForIllegalCrossThreadCalls = false;

            pContainer.Dock = Dockstyle.Fill;  
            pLeft.Dock = Dockstyle.Left;
            pLeft.Width = this.Width/2;
            pLeftTop.Dock = Dockstyle.Top;
            pSpliter.Dock = Dockstyle.Bottom;  
            tbCommand.Dock = Dockstyle.Bottom;  
            // tbDetail.Dock = Dockstyle.Fill; 
            splitter3.Dock = Dockstyle.Left;
            tbRequest.Dock = Dockstyle.Top;
            tbResponse.Dock = Dockstyle.Fill;    
            pBody.Dock = Dockstyle.Fill;
            // statusStrip1.BringToFront();  

            lvSessions.Dock = Dockstyle.Fill;
            lvSessions.BringToFront();

            Intercepter.OnUpdateSession += new Intercepter.DelegateUpdateSession(this.OnUpdateSession);
            Intercepter.OnBreakPoint += new Intercepter.DelegateBreakPoint(this.OnBreakPoint);

            lvSessions.Columns.Add(new ColumnHeader() { 
                Text = “编号“ 
                TextAlign = HorizontalAlignment.Center 
                Width = 28 
            });
            lvSessions.Columns.Add(new ColumnHeader() { 
                Text = “主机“ 
                TextAlign = HorizontalAlignment.Left 
                Width = 130 
            });
            lvSessions.Columns.Add(new ColumnHeader() { 
                Text = “网址“ 
                TextAlign = HorizontalAlignment.Left
                Width=150 
            });
            lvSessions.Columns.Add(new ColumnHeader() { 
                Text = “方式“ 
                TextAlign = HorizontalAlignment.Left
                Width = 48
            });
            lvSessions.Columns.Add(new ColumnHeader() { 
                Text = “进程“ 
                TextAlign = HorizontalAlignment.Left 
                Width = 80
            });

            proxy = new Proxy();
            if (proxy.Attach())
            {
                proxy.Start(Config.ListenPort);
            }  

            // proxy.Start(Config.ListenPort);
        }
 
        internal void OnUpdateSession(Session session)
        {
            try
            {
                lock (lvSessions)
                {
                    sessions.Insert(0 session);
                    //  sessions.Add(session);

                    ListViewItem lvi = new ListViewItem();
                    lvi.Text = session.id.To

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     208384  2013-03-25 10:22  build\HttpIntercepter.exe

     文件        144  2013-02-03 18:35  source\app.config

     文件       8711  2013-03-24 17:20  source\FrmMain.cs

     文件      16105  2013-03-24 17:20  source\FrmMain.Designer.cs

     文件     108161  2013-03-24 17:20  source\FrmMain.resx

     文件        787  2013-03-24 18:58  source\FrmUrlCode.cs

     文件       5375  2013-03-24 18:58  source\FrmUrlCode.Designer.cs

     文件       5817  2013-03-24 18:58  source\FrmUrlCode.resx

     文件       7564  2013-03-24 17:13  source\JrIntercepter.csproj

     文件        497  2013-03-24 17:13  source\JrIntercepter.csproj.user

     文件       3402  2013-03-25 10:16  source\JrIntercepter.sln

    ..A..H.     36864  2013-03-15 16:33  source\JrIntercepter.suo

    ..A..H.     71680  2013-03-24 20:37  source\JrIntercepter.v11.suo

     文件      67646  2013-02-06 09:36  source\logo.ico

     文件       5567  2013-02-06 08:48  source\Net\basePipe.cs

     文件       1109  2013-03-24 17:07  source\Net\BreakPoint.cs

     文件      18389  2013-02-21 08:47  source\Net\ClientChatter.cs

     文件       2799  2013-02-06 15:09  source\Net\ClientPipe.cs

     文件        563  2013-02-06 08:48  source\Net\CodeDescription.cs

     文件        378  2013-02-07 21:02  source\Net\Config.cs

     文件       6101  2013-02-21 08:47  source\Net\DNSResolver.cs

     文件        688  2013-02-06 08:48  source\Net\HTTPHeaderItem.cs

     文件        226  2013-02-06 08:48  source\Net\HTTPHeaderParseWarnings.cs

     文件       6568  2013-02-06 08:48  source\Net\HTTPHeaders.cs

     文件       7065  2013-03-05 10:20  source\Net\HTTPRequestHeaders.cs

     文件       3186  2013-02-06 08:48  source\Net\HTTPResponseHeaders.cs

     文件        910  2013-03-24 17:13  source\Net\Intercepter.cs

     文件      10124  2013-02-06 08:48  source\Net\Parser.cs

     文件       2690  2013-02-21 08:47  source\Net\ProcessHelper.cs

     文件       4805  2013-03-15 10:32  source\Net\Proxy.cs

............此处省略29个文件信息

评论

共有 条评论