Skip to content

Commit

Permalink
Add JNDI option to actions
Browse files Browse the repository at this point in the history
Added the --jndi option to the different available beanshooter actions.
  • Loading branch information
qtc-de committed Sep 27, 2023
1 parent 264140a commit 36146ae
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 0 deletions.
6 changes: 6 additions & 0 deletions beanshooter/src/de/qtc/beanshooter/mbean/MBeanOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public enum MBeanOperation implements Operation {
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.ATTR_ATTRIBUTE,
BeanshooterOption.ATTR_VALUE,
BeanshooterOption.ATTR_TYPE,
Expand Down Expand Up @@ -67,6 +68,7 @@ public enum MBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.DEPLOY_NO_STAGER,
BeanshooterOption.DEPLOY_STAGER_URL,
BeanshooterOption.DEPLOY_STAGER_PORT,
Expand Down Expand Up @@ -107,6 +109,7 @@ public enum MBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.ATTR_WRITEABLE,
BeanshooterOption.ATTR_HARVEST,
BeanshooterOption.ATTR_KEYWORDS,
Expand Down Expand Up @@ -134,6 +137,7 @@ public enum MBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.INVOKE_METHOD_ARGS,
BeanshooterOption.INVOKE_METHOD,
BeanshooterOption.INVOKE_NO_WRAP,
Expand Down Expand Up @@ -169,6 +173,7 @@ public enum MBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

UNDEPLOY("undeploy", "undeploys the specified MBEAN from the JMX server", new Option[] {
Expand All @@ -193,6 +198,7 @@ public enum MBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
});

private Method method;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum DiagnosticCommandOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
DiagnosticCommandOption.FILENAME,
DiagnosticCommandOption.RAW,
}),
Expand All @@ -63,6 +64,7 @@ public enum DiagnosticCommandOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
DiagnosticCommandOption.LIBRARY_PATH,
}),

Expand All @@ -88,6 +90,7 @@ public enum DiagnosticCommandOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
DiagnosticCommandOption.FILENAME,
}),

Expand All @@ -113,6 +116,7 @@ public enum DiagnosticCommandOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

CMDLINE("getCommandLine", "get the Java virtual machine command line", new Option[] {
Expand All @@ -137,6 +141,7 @@ public enum DiagnosticCommandOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

PROPS("getSystemProperties", "get Java virtual machine System properties", new Option[] {
Expand All @@ -161,6 +166,7 @@ public enum DiagnosticCommandOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
});

private Method method;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum FlightRecorderOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

START("startRecording", "start a recording", new Option[] {
Expand All @@ -61,6 +62,7 @@ public enum FlightRecorderOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
FlightRecorderOption.RECORDING_ID,
}),

Expand All @@ -86,6 +88,7 @@ public enum FlightRecorderOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
FlightRecorderOption.RECORDING_ID,
}),

Expand All @@ -111,6 +114,7 @@ public enum FlightRecorderOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
FlightRecorderOption.RECORDING_ID,
FlightRecorderOption.DUMP_FILE,
}),
Expand All @@ -137,6 +141,7 @@ public enum FlightRecorderOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
FlightRecorderOption.RECORDING_ID,
FlightRecorderOption.DUMP_FILE,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public enum HotSpotDiagnosticOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
HotSpotDiagnosticOption.DUMP_FILE,
HotSpotDiagnosticOption.LIVE,
}),
Expand All @@ -64,6 +65,7 @@ public enum HotSpotDiagnosticOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

GET("getOption", "obtain a specific diagnostic option", new Option[] {
Expand All @@ -88,6 +90,7 @@ public enum HotSpotDiagnosticOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
HotSpotDiagnosticOption.OPTION_NAME,
}),

Expand All @@ -113,6 +116,7 @@ public enum HotSpotDiagnosticOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
HotSpotDiagnosticOption.OPTION_NAME,
HotSpotDiagnosticOption.OPTION_VALUE,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum MLetOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.DEPLOY_NO_STAGER,
BeanshooterOption.DEPLOY_STAGER_ADDR,
BeanshooterOption.DEPLOY_STAGER_PORT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public enum MemoryUserDatabaseMBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
MemoryUserDatabaseMBeanOption.USER_FILE,
MemoryUserDatabaseMBeanOption.PASS_FILE,
}),
Expand All @@ -64,6 +65,7 @@ public enum MemoryUserDatabaseMBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

WRITE("write", "write a parially controlled file to the server", new Option[] {
Expand All @@ -88,6 +90,7 @@ public enum MemoryUserDatabaseMBeanOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
MemoryUserDatabaseMBeanOption.LOCAL_FILE,
MemoryUserDatabaseMBeanOption.REMOTE_FILE,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum TonkaBeanOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

EXEC("execute", "execute a command on the MBeanServer", new Option[] {
Expand All @@ -61,6 +62,7 @@ public enum TonkaBeanOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
TonkaBeanOption.EXEC_CMD,
TonkaBeanOption.EXEC_ENV,
TonkaBeanOption.EXEC_CWD,
Expand Down Expand Up @@ -93,6 +95,7 @@ public enum TonkaBeanOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
TonkaBeanOption.EXEC_ARRAY,
TonkaBeanOption.EXEC_ENV,
TonkaBeanOption.EXEC_CWD,
Expand Down Expand Up @@ -124,6 +127,7 @@ public enum TonkaBeanOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
TonkaBeanOption.SHELL_CMD,
}),

Expand All @@ -149,6 +153,7 @@ public enum TonkaBeanOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
TonkaBeanOption.UPLOAD_DEST,
TonkaBeanOption.UPLOAD_SOURCE,
}),
Expand All @@ -175,6 +180,7 @@ public enum TonkaBeanOperation implements Operation
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
TonkaBeanOption.DOWNLOAD_DEST,
TonkaBeanOption.DOWNLOAD_SOURCE,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.INVOKE_OBJ_NAME,
BeanshooterOption.ATTR_ATTRIBUTE,
BeanshooterOption.ATTR_VALUE,
Expand All @@ -66,6 +67,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_JOLOKIA_PROXY_USER,
BeanshooterOption.CONN_JOLOKIA_PROXY_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.BRUTE_USER_FILE,
BeanshooterOption.BRUTE_PW_FILE,
BeanshooterOption.BRUTE_USER,
Expand Down Expand Up @@ -98,6 +100,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.DEPLOY_NO_STAGER,
BeanshooterOption.DEPLOY_STAGER_URL,
BeanshooterOption.DEPLOY_STAGER_PORT,
Expand Down Expand Up @@ -129,6 +132,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
}),

INFO("info", "display method and attribute information on an MBean", new Option[] {
Expand All @@ -153,6 +157,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.OBJ_NAME,
BeanshooterOption.ATTR_WRITEABLE,
BeanshooterOption.ATTR_HARVEST,
Expand Down Expand Up @@ -182,6 +187,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.INVOKE_OBJ_NAME,
BeanshooterOption.INVOKE_METHOD_ARGS,
BeanshooterOption.INVOKE_METHOD,
Expand Down Expand Up @@ -230,6 +236,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.LIST_FILTER_CLASS,
BeanshooterOption.LIST_FILTER_OBJ,
}),
Expand All @@ -256,6 +263,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.MODEL_OBJ_NAME,
BeanshooterOption.MODEL_CLASS_NAME,
BeanshooterOption.MODEL_RESOURCE,
Expand Down Expand Up @@ -286,6 +294,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.STANDARD_OPERATION,
BeanshooterOption.STANDARD_OPERATION_ARGS,
BeanshooterOption.STANDARD_EXEC_ARRAY,
Expand Down Expand Up @@ -313,6 +322,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_JMXMP,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.SERIAL_GADGET_NAME,
BeanshooterOption.SERIAL_GADGET_CMD,
BeanshooterOption.YSO,
Expand Down Expand Up @@ -357,6 +367,7 @@ public enum BeanshooterOperation implements Operation {
BeanshooterOption.CONN_USER,
BeanshooterOption.CONN_PASS,
BeanshooterOption.CONN_SASL,
BeanshooterOption.CONN_JNDI,
BeanshooterOption.UNDEPLOY_BEAN_NAME,
});

Expand Down

0 comments on commit 36146ae

Please sign in to comment.