Exemplo n.º 1
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);
    }
Exemplo n.º 2
0
        public NfsServerProgramOptions()
        {
            listenIPAddress = new CLGenericArgument <IPAddress>(IPAddress.Parse, 'l', "Listen IP Address");
            listenIPAddress.SetDefault(IPAddress.Parse("0.0.0.0"));
            Add(listenIPAddress);

            //
            // Debug Server
            //
            debugListenPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'd', "DebugListenPort", "The TCP port that the debug server will be listening to (If no port is specified, the debug server will not be running)");
            Add(debugListenPort);

            //
            // Npc Server
            //
            npcListenPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'n', "NpcListenPort", "The TCP port that the NPC server will be listening to (If no port is specified, the NPC server will not be running)");
            Add(npcListenPort);

            logFile = new CLStringArgument('f', "LogFile", "Log file (logs to stdout if not specified)");
            Add(logFile);


            logLevel = new CLEnumArgument <LogLevel>('v', "LogLevel", "Level of statements to log");
            logLevel.SetDefault(LogLevel.None);
            Add(logLevel);

            performanceLog = new CLStringArgument('p', "PerformanceLog", "Where to log performance ('internal',<filename>)");
            Add(performanceLog);

#if WindowsCE
            jediTimer = new CLSwitch('j', "JediTimer", "Adds the jedi timer timestamp to printed commands");
            Add(jediTimer);
#endif
        }
Exemplo n.º 3
0
        public Options()
        {
            tmpListenPort = new CLGenericArgument <UInt16>(UInt16.Parse, 't', "tmp-port", "The TMP (Tunnel Manipulation Protocol) listen port");
            tmpListenPort.SetDefault(Tmp.DefaultPort);
            Add(tmpListenPort);

            disableNpc = new CLSwitch("disable-npc", "Do not start the npc control server");
            Add(disableNpc);
        }
Exemplo n.º 4
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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
    }
Exemplo n.º 7
0
        public TelnetOptions()
        {
            port = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "port");
            port.SetDefault(23);
            Add(port);

            windowSize = new CLGenericArgument <TelnetWindowSize>(TelnetWindowSize.Parse, 'w', "Telnet Window Size");
            windowSize.SetDefault(null);
            Add(windowSize);

            wantServerEcho = new CLSwitch('e', "Want Server To Echo", "Tries to negotiate with the server to make the server echo");
            Add(wantServerEcho);

            disableColorDecoding = new CLSwitch('c', "nocolor", "Disables color decoding");
            Add(disableColorDecoding);
        }
Exemplo n.º 8
0
        public CdpCatOptions()
            : base()
        {
            listenPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'l', "listen mode", "Specifies that NetCat should wait for a tcp connection on the given port");
            Add(listenPort);

            localPort = new CLGenericArgument <UInt16>(UInt16.Parse, 'p', "local port (the listen port in listen mode)");
            Add(localPort);

            maxPayload = new CLGenericArgument <UInt16>(UInt16.Parse, 'm', "maximum cdp packet size");
            maxPayload.SetDefault(4096);
            Add(maxPayload);

            verbose = new CLSwitch('v', "Verbose");
            Add(verbose);
        }
Exemplo n.º 9
0
        public Options()
        {
            heartbeatSeconds = new CLGenericArgument <UInt16>(UInt16.Parse, 'h', "heartbeat-time", "The number of seconds between heartbeats");
            heartbeatSeconds.SetDefault(Tmp.DefaultHeartbeatSeconds);
            Add(heartbeatSeconds);

            reconnectWaitSeconds = new CLGenericArgument <UInt16>(UInt16.Parse, 'w', "reconnect-wait-seconds", "The time between reconnect attempts");
            reconnectWaitSeconds.SetDefault(Tmp.DefaultReconnectWaitSeconds);
            Add(reconnectWaitSeconds);

            authenticationFile = new CLStringArgument('a', "auth", "Authentication file");
            Add(authenticationFile);

            receiveBufferLength = new CLGenericArgument <UInt32>(UInt32.Parse, 'r', "receive-buffer-length", "Receive buffer length");
            receiveBufferLength.SetDefault(4096);
            Add(receiveBufferLength);
        }
Exemplo n.º 10
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);
        }
Exemplo n.º 11
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);
        }