Enum SystemCommandRestrictions

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SystemCommandRestrictions>

    public enum SystemCommandRestrictions
    extends java.lang.Enum<SystemCommandRestrictions>
    The restrictions that could be applied to a command being run through this type.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SystemCommandRestrictions valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SystemCommandRestrictions[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • PREVENT_COMMAND_CHAINING

        public static final SystemCommandRestrictions PREVENT_COMMAND_CHAINING
        Prevent multiple commands from being executed in a single call.
      • PREVENT_COMMON_EXPLOIT_EXECUTABLES

        public static final SystemCommandRestrictions PREVENT_COMMON_EXPLOIT_EXECUTABLES
        Prevent commands commonly used in exploitation from being executed in a call (e.g., wget, netcat)
      • PREVENT_ARGUMENTS_TARGETING_SENSITIVE_FILES

        public static final SystemCommandRestrictions PREVENT_ARGUMENTS_TARGETING_SENSITIVE_FILES
        Prevent commands from passing arguments that seem to be sensitive files (e.g., /etc/shadow)
    • Method Detail

      • values

        public static SystemCommandRestrictions[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SystemCommandRestrictions c : SystemCommandRestrictions.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SystemCommandRestrictions valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null