Exemple #1
0
        static void StartProxyService(UdpProxyOptions upo)
        {
            ProxyUDPSocketService proxy = null;

            if (upo.output == null)
            {
                proxy = new ProxyUDPSocketService(upo.src_iep, upo.dest_iep);
            }
            else
            {
                try
                {
                    //output_file = File.Open(output, FileMode.Create);
                    proxy = new ProxyUDPSocketService(upo.src_iep, upo.dest_iep, upo.output, upo.format, upo.modify);
                }
                catch (System.IO.IOException ioe)
                {
                    Console.WriteLine("Error opening file {0} for writing: {1}", upo.output, ioe.Message);
                    return;
                }
            }
            if (upo.dll != null)
            {
                Console.WriteLine("Attempting to load decryptor dll {0}", upo.dll);
                int ret = proxy.SetDecryptor(upo.dll);
                if (ret != 0)
                {
                    Console.WriteLine("Error loading dll: {0}\n", ret);
                    return;
                }
            }
            proxy.ConnectToServer();
            proxy.StartListening();
        }
Exemple #2
0
 // sets a reference of the server so we can send data back on ProcessBuffer
 public UdpProxyClient(IPEndPoint iep, ProxyUDPSocketService puss)
     : base(iep)
 {
     this.puss = puss;
 }