diff --git a/pom.xml b/pom.xml index ee9886d..10a1cbc 100644 --- a/pom.xml +++ b/pom.xml @@ -109,8 +109,60 @@ + org.springframework.boot spring-boot-maven-plugin + + ZIP + + + non-exists + non-exists + + + + + org.projectlombok + lombok + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + package + + copy-dependencies + + + + target/lib + false + false + runtime + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + **/*.properties + **/*.xml + **/*.yml + static/** + templates/** + mybatis/** + + diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..9b0b5cd --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -0,0 +1,98 @@ +server: + port: 7019 + ip: 192.168.0.120 + url: http://${server.ip}:7019/qmywzs + system-title: ?????? + system-sub-title: ?????? + # default-index-page: route/custom/index + servlet: + context-path: /qmywzs + +spring: + login-url: /oauth/login + login-failure: /oauth/login?error + login-process: /userlogin + assets-matchers: /assets/** + thymeleaf: + prefix: classpath:/templates/ + suffix: .html + mode: HTML5 + encoding: UTF-8 + cache: false + main: + allow-bean-definition-overriding: true + servlet: + multipart: + max-file-size: 1GB + max-request-size: 1GB + datasource: + druid: + url: jdbc:mysql://121.36.71.250:58003/db_qmywzs?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true + db-type: mysql + driver-class-name: com.mysql.cj.jdbc.Driver + username: root + password: root + initial-size: 2 + min-idle: 2 + max-active: 5 + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-while-idle: true + test-on-borrow: false + test-on-return: false + pool-prepared-statements: true + max-pool-prepared-statement-per-connection-size: 10 + filter: + commons-log: + connection-logger-name: stat,wall,log4j + stat: + log-slow-sql: true + slow-sql-millis: 2000 + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + use-global-data-source-stat: true + +mybatis: + config-location: classpath:mybatis/mybatis-config.xml + mapper-locations: classpath*:mybatis/mapper/**/*.xml + +access-control: + role-permission: false + +swagger: + base-package-list: ink.wgink,cn.com.tenlion + +file: + upload-path: D:\CF_work\ideaWorkSpace\uploadFiles\ + image-types: png,jpg,jpeg,gif,blob + video-types: mp4,rmvb + audio-types: mp3,wmv,amr + file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf + max-file-count: 6 + image-output-quality: 0.4 + # ??minIo + use-min-io: false + # ?use-min-io???? + min-io: + endpoint: http://192.168.2.103:9900 + access-key: smartcity + secret-key: smartcity + +# appToken +app-token: + has-department: false + has-role: true + has-position: false + has-group: false + +logging: + # enable-api-log: true + file: + name: C:\Users\wenc0\Desktop\UploadFiles\logs\usercenter-logs.log + level: + root: error + org.apache.kafka: error + org.springframework.data.mongodb: info + org.springframework.boot.autoconfigure.security.servlet: debug + ink.wgink: debug diff --git a/src/test/java/cn/com/tenlion/FinalShellTest.java b/src/test/java/cn/com/tenlion/FinalShellTest.java new file mode 100644 index 0000000..c6cee36 --- /dev/null +++ b/src/test/java/cn/com/tenlion/FinalShellTest.java @@ -0,0 +1,100 @@ +package cn.com.tenlion; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.DESKeySpec; +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.Base64; +import java.util.Random; + +public class FinalShellTest { + + public static void main(String[] args)throws Exception { + System.out.println(decodePass("ZjgJL0ZLZF9FCDVW4A6d7brVUtDRtI99")); + } + public static byte[] desDecode(byte[] data, byte[] head) throws Exception { + SecureRandom sr = new SecureRandom(); + DESKeySpec dks = new DESKeySpec(head); + SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES"); + SecretKey securekey = keyFactory.generateSecret(dks); + Cipher cipher = Cipher.getInstance("DES"); + cipher.init(2, securekey, sr); + return cipher.doFinal(data); + } + public static String decodePass(String data) throws Exception { + if (data == null) { + return null; + } else { + String rs = ""; + byte[] buf = Base64.getDecoder().decode(data); + byte[] head = new byte[8]; + System.arraycopy(buf, 0, head, 0, head.length); + byte[] d = new byte[buf.length - head.length]; + System.arraycopy(buf, head.length, d, 0, d.length); + byte[] bt = desDecode(d, ranDomKey(head)); + rs = new String(bt); + + return rs; + } + } + static byte[] ranDomKey(byte[] head) { + long ks = 3680984568597093857L / (long)(new Random((long)head[5])).nextInt(127); + Random random = new Random(ks); + int t = head[0]; + + for(int i = 0; i < t; ++i) { + random.nextLong(); + } + + long n = random.nextLong(); + Random r2 = new Random(n); + long[] ld = new long[]{(long)head[4], r2.nextLong(), (long)head[7], (long)head[3], r2.nextLong(), (long)head[1], random.nextLong(), (long)head[2]}; + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + DataOutputStream dos = new DataOutputStream(bos); + long[] var15 = ld; + int var14 = ld.length; + + for(int var13 = 0; var13 < var14; ++var13) { + long l = var15[var13]; + + try { + dos.writeLong(l); + } catch (IOException var18) { + var18.printStackTrace(); + } + } + + try { + dos.close(); + } catch (IOException var17) { + var17.printStackTrace(); + } + + byte[] keyData = bos.toByteArray(); + keyData = md5(keyData); + return keyData; + } + public static byte[] md5(byte[] data) { + String ret = null; + byte[] res=null; + + try { + MessageDigest m; + m = MessageDigest.getInstance("MD5"); + m.update(data, 0, data.length); + res=m.digest(); + ret = new BigInteger(1, res).toString(16); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } + return res; + } + +}