mirror of
https://github.com/qi4L/JYso.git
synced 2026-09-21 22:40:43 +08:00
gui 初次提交
This commit is contained in:
@@ -4,3 +4,8 @@ out/
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
/build
|
/build
|
||||||
1.ser
|
1.ser
|
||||||
|
node_modules/
|
||||||
|
bun.lockb
|
||||||
|
src/main/frontend/dist/
|
||||||
|
src/main/resources/static/
|
||||||
|
.trae/
|
||||||
+46
-18
@@ -1,8 +1,12 @@
|
|||||||
|
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'com.gradleup.shadow' version '9.4.1'
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
||||||
|
id 'org.springframework.boot' version '2.7.18'
|
||||||
|
id 'io.spring.dependency-management' version '1.1.7'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -16,10 +20,30 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bootJar {
|
||||||
|
enabled = false
|
||||||
|
mainClass = 'com.qi4l.JYso.Starter'
|
||||||
|
}
|
||||||
|
|
||||||
|
springBoot {
|
||||||
|
mainClass = 'com.qi4l.JYso.Starter'
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveClassifier = ''
|
archiveClassifier = ''
|
||||||
zip64 = true
|
zip64 = true
|
||||||
minimize()
|
// minimize() // disabled: too many reflection-based libs get broken
|
||||||
|
mergeServiceFiles()
|
||||||
|
transform(AppendingTransformer) {
|
||||||
|
resource = 'META-INF/spring.factories'
|
||||||
|
}
|
||||||
|
transform(AppendingTransformer) {
|
||||||
|
resource = 'META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports'
|
||||||
|
}
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': 'com.qi4l.JYso.Starter'
|
attributes 'Main-Class': 'com.qi4l.JYso.Starter'
|
||||||
}
|
}
|
||||||
@@ -33,6 +57,7 @@ configurations.configureEach {
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
|
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
|
||||||
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
|
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
|
||||||
|
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.20.0'
|
||||||
implementation 'cn.hutool:hutool-all:5.7.7'
|
implementation 'cn.hutool:hutool-all:5.7.7'
|
||||||
implementation 'com.alibaba:fastjson:1.2.83'
|
implementation 'com.alibaba:fastjson:1.2.83'
|
||||||
implementation 'com.alibaba.fastjson2:fastjson2:2.0.26'
|
implementation 'com.alibaba.fastjson2:fastjson2:2.0.26'
|
||||||
@@ -59,13 +84,13 @@ dependencies {
|
|||||||
implementation 'org.apache.commons:commons-text:1.8'
|
implementation 'org.apache.commons:commons-text:1.8'
|
||||||
implementation 'org.apache.maven.plugins:maven-assembly-plugin:3.0.0'
|
implementation 'org.apache.maven.plugins:maven-assembly-plugin:3.0.0'
|
||||||
implementation 'org.apache.myfaces.core:myfaces-impl:2.2.9'
|
implementation 'org.apache.myfaces.core:myfaces-impl:2.2.9'
|
||||||
implementation 'org.apache.tomcat.embed:tomcat-embed-core:8.5.58'
|
implementation 'org.apache.tomcat.embed:tomcat-embed-core'
|
||||||
implementation 'org.apache.tomcat:tomcat-websocket:9.0.62'
|
implementation 'org.apache.tomcat:tomcat-websocket:9.0.83'
|
||||||
implementation 'org.apache.wicket:wicket-util:6.23.0'
|
implementation 'org.apache.wicket:wicket-util:6.23.0'
|
||||||
implementation 'org.aspectj:aspectjweaver:1.9.7'
|
implementation 'org.aspectj:aspectjweaver:1.9.7'
|
||||||
implementation 'org.beanshell:bsh:2.0b5'
|
implementation 'org.beanshell:bsh:2.0b5'
|
||||||
implementation 'org.clojure:clojure:1.8.0'
|
implementation 'org.clojure:clojure:1.8.0'
|
||||||
implementation 'org.codehaus.groovy:groovy:2.4.5'
|
implementation 'org.codehaus.groovy:groovy:2.5.23'
|
||||||
implementation 'org.eclipse.jetty:jetty-ant:11.0.7'
|
implementation 'org.eclipse.jetty:jetty-ant:11.0.7'
|
||||||
implementation 'org.fusesource.jansi:jansi:2.4.0'
|
implementation 'org.fusesource.jansi:jansi:2.4.0'
|
||||||
implementation 'org.glassfish.tyrus:tyrus-server:2.0.0'
|
implementation 'org.glassfish.tyrus:tyrus-server:2.0.0'
|
||||||
@@ -81,17 +106,13 @@ dependencies {
|
|||||||
implementation 'org.ow2.asm:asm:8.0.1'
|
implementation 'org.ow2.asm:asm:8.0.1'
|
||||||
implementation 'org.python:jython-standalone:2.5.2'
|
implementation 'org.python:jython-standalone:2.5.2'
|
||||||
implementation 'org.reflections:reflections:0.9.10'
|
implementation 'org.reflections:reflections:0.9.10'
|
||||||
implementation 'org.springframework:spring-aop:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-aop'
|
||||||
implementation 'org.springframework:spring-aop:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-beans'
|
||||||
implementation 'org.springframework:spring-beans:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-context-support'
|
||||||
implementation 'org.springframework:spring-context-support:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-core'
|
||||||
implementation 'org.springframework:spring-core:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-jdbc'
|
||||||
implementation 'org.springframework:spring-jdbc:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-oxm'
|
||||||
implementation 'org.springframework:spring-oxm:5.2.3.RELEASE'
|
implementation 'org.springframework:spring-tx'
|
||||||
implementation 'org.springframework:spring-test:5.2.3.RELEASE'
|
|
||||||
implementation 'org.springframework:spring-tx:5.2.3.RELEASE'
|
|
||||||
implementation 'org.springframework:spring-web:5.2.3.RELEASE'
|
|
||||||
implementation 'org.springframework:spring-webmvc:5.2.3.RELEASE'
|
|
||||||
implementation 'rhino:js:1.7R2'
|
implementation 'rhino:js:1.7R2'
|
||||||
implementation 'rome:rome:1.0'
|
implementation 'rome:rome:1.0'
|
||||||
implementation 'xerces:xercesImpl:2.12.0'
|
implementation 'xerces:xercesImpl:2.12.0'
|
||||||
@@ -125,7 +146,14 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'commons-beanutils:commons-beanutils:1.9.4'
|
implementation 'commons-beanutils:commons-beanutils:1.9.4'
|
||||||
|
|
||||||
|
implementation('org.springframework.boot:spring-boot-starter-web') {
|
||||||
|
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
|
||||||
|
exclude group: 'ch.qos.logback'
|
||||||
|
}
|
||||||
|
implementation('org.springframework.boot:spring-boot-starter-security') {
|
||||||
|
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
|
||||||
|
exclude group: 'ch.qos.logback'
|
||||||
|
}
|
||||||
|
|
||||||
runtimeOnly libs.org.aspectj.aspectjweaver
|
runtimeOnly libs.org.aspectj.aspectjweaver
|
||||||
compileOnly libs.org.apache.tomcat.tomcat.websocket
|
compileOnly libs.org.apache.tomcat.tomcat.websocket
|
||||||
@@ -133,7 +161,7 @@ dependencies {
|
|||||||
|
|
||||||
|
|
||||||
group = 'org.example'
|
group = 'org.example'
|
||||||
version = '1.3.7'
|
version = '1.3.8'
|
||||||
description = 'JYso'
|
description = 'JYso'
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#Thu Apr 23 23:23:32 CST 2026
|
#Thu Apr 23 23:23:32 CST 2026
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import static org.fusesource.jansi.Ansi.ansi;
|
|||||||
@SuppressWarnings("HttpUrlsUsage")
|
@SuppressWarnings("HttpUrlsUsage")
|
||||||
public class HTTPServer {
|
public class HTTPServer {
|
||||||
private static final Logger log = LogManager.getLogger(HTTPServer.class);
|
private static final Logger log = LogManager.getLogger(HTTPServer.class);
|
||||||
// 获取根目录路径
|
public static boolean isRunning = false;
|
||||||
public static String cwd = System.getProperty("user.dir");
|
public static String cwd = System.getProperty("user.dir");
|
||||||
|
|
||||||
public static void start() throws IOException {
|
public static void start() throws IOException {
|
||||||
@@ -78,6 +78,7 @@ public class HTTPServer {
|
|||||||
|
|
||||||
httpServer.setExecutor(null);
|
httpServer.setExecutor(null);
|
||||||
httpServer.start();
|
httpServer.start();
|
||||||
|
isRunning = true;
|
||||||
System.out.println(ansi().render("@|green [+]|@ HTTP Server Start Listening on >> " + Config.httpPort + "..."));
|
System.out.println(ansi().render("@|green [+]|@ HTTP Server Start Listening on >> " + Config.httpPort + "..."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class LdapServer extends InMemoryOperationInterceptor {
|
|||||||
|
|
||||||
private static final Logger log = LogManager.getLogger(LdapServer.class);
|
private static final Logger log = LogManager.getLogger(LdapServer.class);
|
||||||
public static TreeMap<String, LdapController> routes = new TreeMap<>();
|
public static TreeMap<String, LdapController> routes = new TreeMap<>();
|
||||||
|
public static boolean isRunning = false;
|
||||||
|
|
||||||
public LdapServer() throws Exception {
|
public LdapServer() throws Exception {
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ public class LdapServer extends InMemoryOperationInterceptor {
|
|||||||
serverConfig.addInMemoryOperationInterceptor(new LdapServer());
|
serverConfig.addInMemoryOperationInterceptor(new LdapServer());
|
||||||
InMemoryDirectoryServer ds = new InMemoryDirectoryServer(serverConfig);
|
InMemoryDirectoryServer ds = new InMemoryDirectoryServer(serverConfig);
|
||||||
ds.startListening();
|
ds.startListening();
|
||||||
|
isRunning = true;
|
||||||
System.out.println(ansi().render("@|green [+]|@ LDAP Server Start Listening on >> " + Config.ldapPort + "..."));
|
System.out.println(ansi().render("@|green [+]|@ LDAP Server Start Listening on >> " + Config.ldapPort + "..."));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("e: ", e);
|
log.error("e: ", e);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import static org.fusesource.jansi.Ansi.ansi;
|
|||||||
|
|
||||||
public class LdapsServer {
|
public class LdapsServer {
|
||||||
private static final Logger log = LogManager.getLogger(LdapsServer.class);
|
private static final Logger log = LogManager.getLogger(LdapsServer.class);
|
||||||
|
public static boolean isRunning = false;
|
||||||
private final String certFile;
|
private final String certFile;
|
||||||
private final String keyPass;
|
private final String keyPass;
|
||||||
|
|
||||||
@@ -51,6 +52,7 @@ public class LdapsServer {
|
|||||||
|
|
||||||
InMemoryDirectoryServer ds = new InMemoryDirectoryServer(config);
|
InMemoryDirectoryServer ds = new InMemoryDirectoryServer(config);
|
||||||
ds.startListening();
|
ds.startListening();
|
||||||
|
isRunning = true;
|
||||||
System.out.println(ansi().render("@|green [+]|@ LDAPS Server Start Listening on >> " + Config.ldapsPort + "..."));
|
System.out.println(ansi().render("@|green [+]|@ LDAPS Server Start Listening on >> " + Config.ldapsPort + "..."));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("e: ", e);
|
log.error("e: ", e);
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ import static org.fusesource.jansi.Ansi.ansi;
|
|||||||
@SuppressWarnings("restriction")
|
@SuppressWarnings("restriction")
|
||||||
public class RMIServer implements Runnable {
|
public class RMIServer implements Runnable {
|
||||||
|
|
||||||
|
public static boolean isRunning = false;
|
||||||
|
|
||||||
private final ServerSocket ss;
|
private final ServerSocket ss;
|
||||||
private final Object waitLock = new Object();
|
private final Object waitLock = new Object();
|
||||||
private final URL classpathUrl;
|
private final URL classpathUrl;
|
||||||
@@ -66,6 +68,7 @@ public class RMIServer implements Runnable {
|
|||||||
try {
|
try {
|
||||||
System.out.println(ansi().render("@|green [+]|@ RMI Server Start Listening on >> " + rmiPort + "..."));
|
System.out.println(ansi().render("@|green [+]|@ RMI Server Start Listening on >> " + rmiPort + "..."));
|
||||||
RMIServer c = new RMIServer(rmiPort, new URL(url));
|
RMIServer c = new RMIServer(rmiPort, new URL(url));
|
||||||
|
isRunning = true;
|
||||||
c.run();
|
c.run();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.err.println("Listener error");
|
System.err.println("Listener error");
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ package com.qi4l.JYso;
|
|||||||
import com.qi4l.JYso.gadgets.Config.ysoserial;
|
import com.qi4l.JYso.gadgets.Config.ysoserial;
|
||||||
import com.qi4l.JYso.gadgets.Config.Config;
|
import com.qi4l.JYso.gadgets.Config.Config;
|
||||||
import com.qi4l.JYso.gadgets.ObjectPayload;
|
import com.qi4l.JYso.gadgets.ObjectPayload;
|
||||||
|
import com.qi4l.JYso.web.JYsoWebApplication;
|
||||||
import org.apache.commons.collections4.map.CaseInsensitiveMap;
|
import org.apache.commons.collections4.map.CaseInsensitiveMap;
|
||||||
|
|
||||||
import static com.qi4l.JYso.gadgets.Config.Config.logo;
|
import static com.qi4l.JYso.gadgets.Config.Config.logo;
|
||||||
|
|
||||||
public class Starter {
|
public class Starter {
|
||||||
|
|
||||||
// 用于存储所有的ObjectPayload类
|
|
||||||
public static CaseInsensitiveMap<String, Class<? extends ObjectPayload<?>>> caseInsensitiveObjectPayloadMap = new CaseInsensitiveMap<>();
|
public static CaseInsensitiveMap<String, Class<? extends ObjectPayload<?>>> caseInsensitiveObjectPayloadMap = new CaseInsensitiveMap<>();
|
||||||
public static boolean JYsoMode = false;
|
public static boolean JYsoMode = false;
|
||||||
|
|
||||||
@@ -20,8 +20,12 @@ public class Starter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
// 如果参数中包含-j,则启动LDAP、HTTP、RMI服务
|
if (args.length == 0 || args[0].equals("-w")) {
|
||||||
if (args.length > 0 && args[0].equals("-j")) {
|
JYsoWebApplication.start(args);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args[0].equals("-j")) {
|
||||||
logo();
|
logo();
|
||||||
Config.applyCmdArgs(args);
|
Config.applyCmdArgs(args);
|
||||||
LdapServer.start();
|
LdapServer.start();
|
||||||
@@ -32,8 +36,7 @@ public class Starter {
|
|||||||
RMIServer.start();
|
RMIServer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果参数中包含-y,则启动 ysoserial
|
if (args[0].equals("-y")) {
|
||||||
if (args.length > 0 && args[0].equals("-y")) {
|
|
||||||
JYsoMode = true;
|
JYsoMode = true;
|
||||||
ysoserial.run(args);
|
ysoserial.run(args);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,9 +126,7 @@ public class ysoserial {
|
|||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
System.err.println("Error while generating or serializing payload");
|
System.err.println("Error while generating or serializing payload");
|
||||||
log.error(String.valueOf(e));
|
log.error(String.valueOf(e));
|
||||||
System.exit(1);
|
|
||||||
}
|
}
|
||||||
System.exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Options getOptions() {
|
public static Options getOptions() {
|
||||||
|
|||||||
Reference in New Issue
Block a user