Пример #1
0
        public Options()
            : base()
        {
            pcapLogFile = new CLStringArgument("pcap-log", "Log data to this pcap file");
            Add(pcapLogFile);

            //communicationLogFile = new CLStringArgument('l', "CommunicationLogFile");
            //Add(communicationLogFile);

            specialPortList = new CLStringArgument('c', "Connect Request Port List", "Special list of ports that when connected, must establish a connection request. A connection request must be established with incoming connections if the connection is to another instance of NetworkAdapter where it's opposite end is a client that is waiting for a connection request.");
            Add(specialPortList);

            readBufferSize = new CLUInt32Argument('b', "Read Buffer Size", "The size of the buffer used to hold the bytes being read from a socket");
            readBufferSize.SetDefault(4096);
            Add(readBufferSize);

            socketBackLog = new CLInt32Argument('s', "Server Socket BackLog", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);

            logData = new CLSwitch('d', "log-data", "Log the socket data");
            Add(logData);

            noTransferMessages = new CLSwitch('t', "no-transfer-messages", "Do not log transfer messages");
            Add(noTransferMessages);

            this.adapterTypeModeIsSet = false;
        }
Пример #2
0
    public Options()
        : base()
    {
        listenMode = new CLSwitch('l', "listen mode", "Specifies that NetCat will listen for a tcp connection");
        Add(listenMode);

        localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "the local port to bind to");
        localPort.SetDefault(0);
        Add(localPort);

        localHost = new CLStringArgument('i', "the local host or ip address to bind to");
        localHost.SetDefault("0.0.0.0");
        Add(localHost);

        bufferSizes = new CLInt32Argument('s', "tunnel buffer sizes");
        bufferSizes.SetDefault(8192);
        Add(bufferSizes);

        tcpSendWindow = new CLInt32Argument("send-window", "Size of TCP send window (0 means network stack window size)");
        tcpSendWindow.SetDefault(0);
        Add(tcpSendWindow);
        tcpReceiveWindow = new CLInt32Argument("recv-window", "Size of TCP recv window (0 means network stack window size)");
        tcpReceiveWindow.SetDefault(0);
        Add(tcpReceiveWindow);
    }
Пример #3
0
        public ProxyServerOptions()
            : base()
        {
            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "Listening Port");
            port.SetDefault(1080);
            Add(port);

            socketBackLog = new CLInt32Argument('b', "Socket Back Log", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);
        }
Пример #4
0
        public TunnelOptions()
            : base()
        {
            readBufferSize = new CLInt32Argument('r', "Read Buffer Size", "The size of the buffer used to read from a socket");
            readBufferSize.SetDefault(8192);
            Add(readBufferSize);

            socketBackLog = new CLInt32Argument('s', "Server Socket BackLog", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);
        }
Пример #5
0
        public DnsServerOptions()
            : base()
        {
            notificationHost = new CLStringArgument('n', "Notification Host", "Host [and port] to send notifications when an address is handed out");
            Add(notificationHost);

            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "Listen Port");
            port.SetDefault(53);
            Add(port);

            socketBackLog = new CLInt32Argument('b', "Socket Back Log", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);
        }
Пример #6
0
    public Options()
        : base()
    {
        localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "the local port to bind to");
        localPort.SetDefault(0);
        Add(localPort);

        localHost = new CLStringArgument('i', "the local host or ip address to bind to");
        localHost.SetDefault("0.0.0.0");
        Add(localHost);

        bufferSizes = new CLInt32Argument('s', "tunnel buffer sizes");
        bufferSizes.SetDefault(8192);
        Add(bufferSizes);
    }
Пример #7
0
        public AppLayerProxyOptions()
        {
            listenIP = new CLGenericArgument <IPAddress>(IPAddress.Parse, 'l', "listenip", "IP address of the interface to listen on");
            listenIP.SetDefault(IPAddress.Any);
            Add(listenIP);

            forwardProxy = new CLStringArgument('p', "proxy", "Set a proxy to forward all connections to");
            Add(forwardProxy);

            backlog = new CLGenericArgument <UInt16>(UInt16.Parse, 'b', "backlog", "Listen socket backlog");
            backlog.SetDefault(32);
            Add(backlog);

            bufferSize = new CLInt32Argument("buffer-size", "Size of the buffer used for receiving data from the client");
            bufferSize.SetDefault(8192);
            Add(bufferSize);

            help = new CLSwitch('h', "help", "Show the usage");
            Add(help);
        }
Пример #8
0
        public WebServerOptions()
            : base()
        {
            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "Listen Port", "The port number to listen on");
            port.SetDefault(80);
            Add(port);

            defaultIndexFile = new CLStringArgument('i', "Default Index File", "Filename of the default file to send when the client requests a directory");
            defaultIndexFile.SetDefault("index.html");
            Add(defaultIndexFile);

            socketBackLog = new CLInt32Argument('b', "Socket Back Log", "The maximum length of the pending connections queue");
            socketBackLog.SetDefault(32);
            Add(socketBackLog);

            logFile = new CLStringArgument("log", "File for message log");
            Add(logFile);

            logData = new CLSwitch('d', "log-data", "Use to turn on data logging");
            Add(logData);
        }