mirror of
https://github.com/frohoff/ysoserial.git
synced 2026-09-22 23:11:52 +08:00
Drop empty javadocs.
This commit is contained in:
@@ -117,13 +117,6 @@ public class JBoss {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param u
|
||||
* @param payloadObject
|
||||
* @param username
|
||||
* @param password
|
||||
*/
|
||||
private static void doRun ( URI u, final Object payloadObject, String username, String password ) {
|
||||
ConnectionProvider instance = null;
|
||||
ConnectionProviderContextImpl context = null;
|
||||
@@ -159,13 +152,6 @@ public class JBoss {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param instance
|
||||
* @param context
|
||||
* @param ch
|
||||
* @param c
|
||||
* @param vc
|
||||
*/
|
||||
private static void cleanup ( ConnectionProvider instance, ConnectionProviderContextImpl context, ConnectionHandler ch, Channel c,
|
||||
VersionedConnection vc ) {
|
||||
if ( vc != null ) {
|
||||
@@ -204,21 +190,6 @@ public class JBoss {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param destination
|
||||
* @param username
|
||||
* @param password
|
||||
* @param context
|
||||
* @param instance
|
||||
* @param options
|
||||
* @param xnioSsl
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws NoSuchProviderException
|
||||
* @throws KeyManagementException
|
||||
*/
|
||||
private static ConnectionHandlerFactory getConnection ( SocketAddress destination, final String username, final String password,
|
||||
ConnectionProviderContextImpl context, ConnectionProvider instance, OptionMap options )
|
||||
throws IOException, InterruptedException, KeyManagementException, NoSuchProviderException, NoSuchAlgorithmException {
|
||||
@@ -263,14 +234,6 @@ public class JBoss {
|
||||
return chf;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param context
|
||||
* @param ch
|
||||
* @param options
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
private static Channel getChannel ( ConnectionProviderContextImpl context, ConnectionHandler ch, OptionMap options ) throws IOException {
|
||||
Channel c;
|
||||
FutureResult<Channel> chResult = new FutureResult<Channel>(context.getExecutor());
|
||||
@@ -294,15 +257,6 @@ public class JBoss {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param c
|
||||
* @return
|
||||
* @throws ClassNotFoundException
|
||||
* @throws NoSuchMethodException
|
||||
* @throws IllegalAccessException
|
||||
* @throws InvocationTargetException
|
||||
* @throws MalformedURLException
|
||||
*/
|
||||
private static VersionedConnection makeVersionedConnection ( Channel c )
|
||||
throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, MalformedURLException {
|
||||
VersionedConnection vc;
|
||||
@@ -314,14 +268,6 @@ public class JBoss {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param payloadObject
|
||||
* @param mbc
|
||||
* @throws IOException
|
||||
* @throws InstanceNotFoundException
|
||||
* @throws IntrospectionException
|
||||
* @throws ReflectionException
|
||||
*/
|
||||
private static void doExploit ( final Object payloadObject, MBeanServerConnection mbc )
|
||||
throws IOException, InstanceNotFoundException, IntrospectionException, ReflectionException {
|
||||
Object[] params = new Object[1];
|
||||
@@ -359,10 +305,7 @@ public class JBoss {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author mbechler
|
||||
*
|
||||
*/
|
||||
|
||||
private static final class ConsoleLogHandler extends Handler {
|
||||
|
||||
|
||||
@@ -382,18 +325,11 @@ public class JBoss {
|
||||
public void close () throws SecurityException {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author mbechler
|
||||
*
|
||||
*/
|
||||
private static final class ConnectionHandlerContextImpl implements ConnectionHandlerContext {
|
||||
|
||||
private ConnectionProviderContextImpl context;
|
||||
|
||||
|
||||
/**
|
||||
* @param context
|
||||
*/
|
||||
public ConnectionHandlerContextImpl ( ConnectionProviderContextImpl context ) {
|
||||
this.context = context;
|
||||
}
|
||||
@@ -422,10 +358,7 @@ public class JBoss {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author mbechler
|
||||
*
|
||||
*/
|
||||
|
||||
private static final class ConnectionProviderContextImpl implements ConnectionProviderContext {
|
||||
|
||||
private XnioWorker worker;
|
||||
@@ -434,12 +367,6 @@ public class JBoss {
|
||||
private Endpoint endpoint;
|
||||
|
||||
|
||||
/**
|
||||
* @param endpointName
|
||||
* @throws IOException
|
||||
* @throws IllegalArgumentException
|
||||
*
|
||||
*/
|
||||
public ConnectionProviderContextImpl ( OptionMap opts, String endpointName ) throws IllegalArgumentException, IOException {
|
||||
this.instance = Xnio.getInstance();
|
||||
|
||||
|
||||
@@ -46,14 +46,6 @@ public class JRMPClient {
|
||||
Utils.releasePayload(args[2], payloadObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param hostname
|
||||
* @param port
|
||||
* @param payloadObject
|
||||
* @throws IOException
|
||||
* @throws UnknownHostException
|
||||
* @throws SocketException
|
||||
*/
|
||||
public static void makeDGCCall ( String hostname, int port, Object payloadObject ) throws IOException, UnknownHostException, SocketException {
|
||||
InetSocketAddress isa = new InetSocketAddress(hostname, port);
|
||||
Socket s = null;
|
||||
@@ -97,15 +89,8 @@ public class JRMPClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author mbechler
|
||||
*
|
||||
*/
|
||||
static final class MarshalOutputStream extends ObjectOutputStream {
|
||||
|
||||
/**
|
||||
* @param out
|
||||
*/
|
||||
MarshalOutputStream ( OutputStream out ) throws IOException {
|
||||
super(out);
|
||||
}
|
||||
|
||||
@@ -44,12 +44,6 @@ public class JRMPListener implements Runnable {
|
||||
private boolean hadConnection;
|
||||
|
||||
|
||||
/**
|
||||
* @param port
|
||||
* @param payloadObject
|
||||
* @throws IOException
|
||||
* @throws NumberFormatException
|
||||
*/
|
||||
public JRMPListener ( int port, Object payloadObject ) throws NumberFormatException, IOException {
|
||||
this.port = port;
|
||||
this.payloadObject = payloadObject;
|
||||
@@ -113,11 +107,6 @@ public class JRMPListener implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see java.lang.Runnable#run()
|
||||
*/
|
||||
public void run () {
|
||||
try {
|
||||
Socket s = null;
|
||||
@@ -205,12 +194,6 @@ public class JRMPListener implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param s
|
||||
* @param in
|
||||
* @param out
|
||||
* @throws Exception
|
||||
*/
|
||||
private void doMessage ( Socket s, DataInputStream in, DataOutputStream out, Object payload ) throws Exception {
|
||||
System.err.println("Reading message...");
|
||||
|
||||
@@ -239,19 +222,9 @@ public class JRMPListener implements Runnable {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param in
|
||||
* @param out
|
||||
* @throws Exception
|
||||
*/
|
||||
private void doCall ( DataInputStream in, DataOutputStream out, Object payload ) throws Exception {
|
||||
ObjectInputStream ois = new ObjectInputStream(in) {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see java.io.ObjectInputStream#resolveClass(java.io.ObjectStreamClass)
|
||||
*/
|
||||
@Override
|
||||
protected Class<?> resolveClass ( ObjectStreamClass desc ) throws IOException, ClassNotFoundException {
|
||||
throw new IOException("Not allowed to read object");
|
||||
|
||||
@@ -20,9 +20,6 @@ import ysoserial.payloads.ObjectPayload.Utils;
|
||||
*/
|
||||
public class JSF {
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main ( String[] args ) {
|
||||
|
||||
if ( args.length < 3 ) {
|
||||
|
||||
@@ -103,17 +103,6 @@ public class JenkinsListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param oid
|
||||
* @param uro
|
||||
* @param reqClass
|
||||
* @return
|
||||
* @throws NoSuchMethodException
|
||||
* @throws InstantiationException
|
||||
* @throws IllegalAccessException
|
||||
* @throws InvocationTargetException
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
private static Object makeIsPresentOnRemoteCallable ( int oid, Object uro, Class<?> reqClass )
|
||||
throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException {
|
||||
Constructor<?> reqCons = reqClass.getDeclaredConstructor(int.class, Method.class, Object[].class);
|
||||
@@ -125,15 +114,6 @@ public class JenkinsListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param args
|
||||
* @param payloadClass
|
||||
* @param jrmpPort
|
||||
* @param isa
|
||||
* @param e
|
||||
* @throws Exception
|
||||
* @throws IOException
|
||||
*/
|
||||
private static void parseObjIdAndExploit ( final String[] args, final Class<? extends ObjectPayload> payloadClass, int jrmpPort,
|
||||
InetSocketAddress isa, Exception e ) throws Exception, IOException {
|
||||
String msg = e.getMessage();
|
||||
@@ -171,14 +151,6 @@ public class JenkinsListener {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param inetSocketAddress
|
||||
* @param obj
|
||||
* @param o1
|
||||
* @param o2
|
||||
* @param o3
|
||||
* @throws IOException
|
||||
*/
|
||||
private static void exploit ( InetSocketAddress isa, long obj, int o1, long o2, short o3, Class<?> payloadClass, String payloadArg )
|
||||
throws IOException {
|
||||
Socket s = null;
|
||||
|
||||
@@ -62,10 +62,7 @@ public class C3P0 implements ObjectPayload<Object> {
|
||||
|
||||
private String className;
|
||||
private String url;
|
||||
/**
|
||||
* @param className
|
||||
* @param url
|
||||
*/
|
||||
|
||||
public PoolSource ( String className, String url ) {
|
||||
this.className = className;
|
||||
this.url = url;
|
||||
|
||||
@@ -42,11 +42,6 @@ import ysoserial.payloads.util.Reflections;
|
||||
@PayloadTest(harness="ysoserial.payloads.FileUploadTest")
|
||||
public class FileUpload1 implements ReleaseableObjectPayload<DiskFileItem> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see ysoserial.payloads.ObjectPayload#getObject(java.lang.String)
|
||||
*/
|
||||
public DiskFileItem getObject ( String command ) throws Exception {
|
||||
|
||||
String[] parts = command.split(":");
|
||||
@@ -71,12 +66,7 @@ public class FileUpload1 implements ReleaseableObjectPayload<DiskFileItem> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @throws Exception
|
||||
*
|
||||
* @see ysoserial.payloads.ReleaseableObjectPayload#release(java.lang.Object)
|
||||
*/
|
||||
|
||||
public void release ( DiskFileItem obj ) throws Exception {
|
||||
// otherwise the finalizer deletes the file
|
||||
DeferredFileOutputStream dfos = new DeferredFileOutputStream(0, null);
|
||||
@@ -100,15 +90,6 @@ public class FileUpload1 implements ReleaseableObjectPayload<DiskFileItem> {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param thresh
|
||||
* @param repoPath
|
||||
* @param filePath
|
||||
* @param data
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @throws Exception
|
||||
*/
|
||||
private static DiskFileItem makePayload ( int thresh, String repoPath, String filePath, byte[] data ) throws IOException, Exception {
|
||||
// if thresh < written length, delete outputFile after copying to repository temp file
|
||||
// otherwise write the contents to repository temp file
|
||||
|
||||
@@ -94,11 +94,6 @@ public class Hibernate1 implements ObjectPayload<Object>, DynamicDependencies {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see ysoserial.payloads.ObjectPayload#getObject(java.lang.String)
|
||||
*/
|
||||
public Object getObject ( String command ) throws Exception {
|
||||
Object tpl = Gadgets.createTemplatesImpl(command);
|
||||
Object getters = makeGetter(tpl.getClass(), "getOutputProperties");
|
||||
@@ -106,18 +101,6 @@ public class Hibernate1 implements ObjectPayload<Object>, DynamicDependencies {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param tpl
|
||||
* @param getters
|
||||
* @return
|
||||
* @throws NoSuchMethodException
|
||||
* @throws InstantiationException
|
||||
* @throws IllegalAccessException
|
||||
* @throws InvocationTargetException
|
||||
* @throws NoSuchFieldException
|
||||
* @throws Exception
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
static Object makeCaller ( Object tpl, Object getters ) throws NoSuchMethodException, InstantiationException, IllegalAccessException,
|
||||
InvocationTargetException, NoSuchFieldException, Exception, ClassNotFoundException {
|
||||
PojoComponentTuplizer tup = Reflections.createWithoutConstructor(PojoComponentTuplizer.class);
|
||||
|
||||
@@ -67,11 +67,6 @@ import net.sf.json.JSONObject;
|
||||
} )
|
||||
public class JSON1 implements ObjectPayload<Object> {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see ysoserial.payloads.ObjectPayload#getObject(java.lang.String)
|
||||
*/
|
||||
public Map getObject ( String command ) throws Exception {
|
||||
return makeCallerChain(Gadgets.createTemplatesImpl(command), Templates.class);
|
||||
}
|
||||
@@ -117,12 +112,6 @@ public class JSON1 implements ObjectPayload<Object> {
|
||||
return Gadgets.makeMap(t1, t2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void main ( final String[] args ) throws Exception {
|
||||
PayloadRunner.run(JSON1.class, args);
|
||||
}
|
||||
|
||||
@@ -42,12 +42,6 @@ import ysoserial.payloads.util.Reflections;
|
||||
@PayloadTest(skip="Requires running MyFaces, no direct execution")
|
||||
public class Myfaces1 implements ObjectPayload<Object>, DynamicDependencies {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see ysoserial.payloads.ObjectPayload#getObject(java.lang.String)
|
||||
*/
|
||||
|
||||
public Object getObject ( String command ) throws Exception {
|
||||
return makeExpressionPayload(command);
|
||||
}
|
||||
|
||||
@@ -35,13 +35,6 @@ public class Myfaces2 implements ObjectPayload<Object>, DynamicDependencies {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @see ysoserial.payloads.ObjectPayload#getObject(java.lang.String)
|
||||
*/
|
||||
|
||||
public Object getObject ( String command ) throws Exception {
|
||||
int sep = command.lastIndexOf(':');
|
||||
if ( sep < 0 ) {
|
||||
|
||||
@@ -56,11 +56,6 @@ public interface ObjectPayload <T> {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param payloadType
|
||||
* @param payloadArg
|
||||
* @return an payload object
|
||||
*/
|
||||
public static Object makePayloadObject ( String payloadType, String payloadArg ) {
|
||||
final Class<? extends ObjectPayload> payloadClass = getPayloadClass(payloadType);
|
||||
if ( payloadClass == null || !ObjectPayload.class.isAssignableFrom(payloadClass) ) {
|
||||
@@ -80,11 +75,6 @@ public interface ObjectPayload <T> {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param payload
|
||||
* @param object
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings ( "unchecked" )
|
||||
public static void releasePayload ( ObjectPayload payload, Object object ) throws Exception {
|
||||
if ( payload instanceof ReleaseableObjectPayload ) {
|
||||
@@ -93,10 +83,6 @@ public interface ObjectPayload <T> {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param payloadType
|
||||
* @param payloadObject
|
||||
*/
|
||||
public static void releasePayload ( String payloadType, Object payloadObject ) {
|
||||
final Class<? extends ObjectPayload> payloadClass = getPayloadClass(payloadType);
|
||||
if ( payloadClass == null || !ObjectPayload.class.isAssignableFrom(payloadClass) ) {
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
/**
|
||||
* © 2016 AgNO3 Gmbh & Co. KG
|
||||
* All right reserved.
|
||||
*
|
||||
* Created: 06.03.2016 by mbechler
|
||||
*/
|
||||
package ysoserial.payloads;
|
||||
|
||||
|
||||
|
||||
@@ -61,12 +61,6 @@ public class Spring2 extends PayloadRunner implements ObjectPayload<Object> {
|
||||
return mitp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param args
|
||||
* @throws Exception
|
||||
*/
|
||||
public static void main ( final String[] args ) throws Exception {
|
||||
PayloadRunner.run(Spring2.class, args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user