|
|
@@ -3,18 +3,19 @@ package com.vvvtimes.server;
|
|
|
import com.vvvtimes.JrebelUtil.JrebelSign;
|
|
|
import com.vvvtimes.util.rsasign;
|
|
|
import net.sf.json.JSONObject;
|
|
|
-
|
|
|
-import java.io.IOException;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.util.*;
|
|
|
+import org.eclipse.jetty.server.Request;
|
|
|
+import org.eclipse.jetty.server.Server;
|
|
|
+import org.eclipse.jetty.server.handler.AbstractHandler;
|
|
|
|
|
|
import javax.servlet.ServletException;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
-import org.eclipse.jetty.server.Request;
|
|
|
-import org.eclipse.jetty.server.Server;
|
|
|
-import org.eclipse.jetty.server.handler.AbstractHandler;
|
|
|
+import java.io.IOException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Locale;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
public class MainServer extends AbstractHandler {
|
|
|
|
|
|
@@ -52,17 +53,15 @@ public class MainServer extends AbstractHandler {
|
|
|
String port = arguments.get("p");
|
|
|
|
|
|
if (port == null || !port.matches("\\d+")) {
|
|
|
- port = "8081";
|
|
|
+ port = "8366";
|
|
|
}
|
|
|
|
|
|
Server server = new Server(Integer.parseInt(port));
|
|
|
server.setHandler(new MainServer());
|
|
|
server.start();
|
|
|
|
|
|
- System.out.println("License Server started at http://localhost:" + port);
|
|
|
- System.out.println("JetBrains Activation address was: http://localhost:" + port + "/");
|
|
|
- System.out.println("JRebel 7.1 and earlier version Activation address was: http://localhost:" + port + "/{tokenname}, with any email.");
|
|
|
- System.out.println("JRebel 2018.1 and later version Activation address was: http://localhost:" + port + "/{guid}(eg:http://localhost:" + port + "/"+ UUID.randomUUID().toString()+"), with any email.");
|
|
|
+ System.out.println("请使用https://jrebel.mokibox.cn/生成的guid来激活您的程序!");
|
|
|
+ System.out.println("Guid如何生成请去百度~");
|
|
|
|
|
|
server.join();
|
|
|
}
|
|
|
@@ -144,7 +143,7 @@ public class MainServer extends AbstractHandler {
|
|
|
String clientRandomness = request.getParameter("randomness");
|
|
|
String username = request.getParameter("username");
|
|
|
String guid = request.getParameter("guid");
|
|
|
- System.out.println(((Request) request).getParameters());
|
|
|
+// System.out.println(((Request) request).getParameters());
|
|
|
boolean offline = Boolean.parseBoolean(request.getParameter("offline"));
|
|
|
String validFrom = "null";
|
|
|
String validUntil = "null";
|
|
|
@@ -256,11 +255,9 @@ public class MainServer extends AbstractHandler {
|
|
|
baseRequest.setHandled(true);
|
|
|
|
|
|
int port = request.getServerPort();
|
|
|
- String html = "<h1>Hello,This is a Jrebel & JetBrains License Server!</h1>";
|
|
|
- html += "<p>License Server started at http://localhost:" + port;
|
|
|
- html += "<p>JetBrains Activation address was: <span style='color:red'>http://localhost:" + port + "/";
|
|
|
- html += "<p>JRebel 7.1 and earlier version Activation address was: <span style='color:red'>http://localhost:" + port + "/{tokenname}</span>, with any email.";
|
|
|
- html += "<p>JRebel 2018.1 and later version Activation address was: http://localhost:" + port + "/{guid}(eg:<span style='color:red'>http://localhost:" + port + "/"+ UUID.randomUUID().toString()+"</span>), with any email.";
|
|
|
+ String html = "<h1>哈喽,欢迎访问~ 这是一个Jrebel激活站!</h1>";
|
|
|
+ html += "<p>请使用\"https://jrebel.mokibox.cn/生成的guid\"来激活您的程序!</p>";
|
|
|
+ html += "<p>邮箱随便填写一个即可!Guid如何生成请去百度或访问<a href='https://tool.mokibox.cn'>工具站</a>,使用该站内工具生成~</p>";
|
|
|
|
|
|
response.getWriter().println(html);
|
|
|
|