Beispiel #1
0
        /// <summary>
        /// Инициализация объекта состояния.
        /// </summary>
        /// <param name="from">Источник</param>
        /// <param name="to">Цель</param>
        /// <param name="isC2S">Источник клиент или нет</param>
        /// <param name="bufferSize">Размер буфера</param>
        public SocketStateObject(MitmSession session, Socket from, Socket to, int bufferSize, bool isC2S)
        {
            Session = session;

            From      = from;
            To        = to;
            IsC2S     = isC2S;
            Connected = true;

            this.bufferSize = bufferSize;
            FromBuffer      = new byte[bufferSize];
            FromStream      = new DataStream();

            Encryptor = Encryptor.Default;
        }
Beispiel #2
0
 public PluginManager(MitmSession session)
 {
     Session = session;
     Plugins = new Dictionary <Type, Plugin>();
 }