refactoring. Rewriting code to spring-boot service.
This commit is contained in:
parent
1c62c52004
commit
f3479a3a91
109
pom.xml
109
pom.xml
@ -4,28 +4,28 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.alterdekim</groupId>
|
||||
<artifactId>jstud</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>14</maven.compiler.source>
|
||||
<maven.compiler.target>14</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<exec.mainClass>com.alterdekim.Main</exec.mainClass>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>2.0.9</version>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
@ -42,21 +42,39 @@
|
||||
<artifactId>protobuf-java-util</artifactId>
|
||||
<version>3.24.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.ektorp</groupId>
|
||||
<artifactId>org.ektorp</artifactId>
|
||||
<version>1.5.0</version>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nanohttpd</groupId>
|
||||
<artifactId>nanohttpd</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<type>maven-plugin</type>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.33</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
<version>1.18.28</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-ip</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.integration</groupId>
|
||||
<artifactId>spring-integration-core</artifactId>
|
||||
<version>6.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@ -69,32 +87,6 @@
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<!--<plugin>
|
||||
<groupId>com.github.os72</groupId>
|
||||
<artifactId>protoc-jar-maven-plugin</artifactId>
|
||||
<version>3.11.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<addProtoSources>all</addProtoSources>
|
||||
<includeMavenTypes>direct</includeMavenTypes>
|
||||
<optimizeCodegen>false</optimizeCodegen>
|
||||
<includeStdTypes>true</includeStdTypes>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.14.0</protocArtifact>
|
||||
<inputDirectories>
|
||||
<inputDirectory>${project.basedir}/src/main/proto</inputDirectory>
|
||||
</inputDirectories>
|
||||
<includeDirectories>
|
||||
<includeDirectory>${project.basedir}/src/main/proto</includeDirectory>
|
||||
</includeDirectories>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>-->
|
||||
<plugin>
|
||||
<groupId>org.xolstice.maven.plugins</groupId>
|
||||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
@ -114,28 +106,23 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>
|
||||
com.alterdekim.Main
|
||||
</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
@ -1,11 +1,10 @@
|
||||
package com.alterdekim;
|
||||
|
||||
import com.alterdekim.db.Database;
|
||||
import com.alterdekim.login.LoginServer;
|
||||
import com.alterdekim.services.*;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Compute32;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -14,19 +13,21 @@ import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Slf4j
|
||||
public class Connection extends Thread {
|
||||
|
||||
/*
|
||||
All files were merged into protocol.proto
|
||||
*/
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Connection.class);
|
||||
|
||||
private final SSLSocket fromClient;
|
||||
private OutputStream outToClient;
|
||||
|
||||
@Getter
|
||||
private Map<Integer, Service> services;
|
||||
|
||||
@Getter
|
||||
private final Database db;
|
||||
|
||||
public Connection(SSLSocket socket, Database db) {
|
||||
@ -40,10 +41,6 @@ public class Connection extends Thread {
|
||||
log.warn("Tried to stopListening");
|
||||
}
|
||||
|
||||
public Map<Integer, Service> getServices() {
|
||||
return services;
|
||||
}
|
||||
|
||||
public void send(BattleNetPacket bp) throws Exception {
|
||||
// log.info("Sending response: " + bp.getHeader().getServiceId() + " / " + bp.getHeader().getMethodId());
|
||||
this.outToClient.write(bp.Encode());
|
||||
@ -55,10 +52,6 @@ public class Connection extends Thread {
|
||||
this.outToClient.flush();
|
||||
}
|
||||
|
||||
public Database getDb() {
|
||||
return db;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
this.services = new HashMap<>();
|
||||
this.services.put(0, new ConnectionService(""));
|
||||
|
@ -1,19 +1,13 @@
|
||||
package com.alterdekim;
|
||||
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Scanner;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
@Slf4j
|
||||
public class Main {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Main.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Server(1119).startListening();
|
||||
// public static void main(String[] args) {
|
||||
// new Server(1119).startListening();
|
||||
/* System.out.println(Util.bytesToHex(exampleProtocol.Test.newBuilder()
|
||||
.setA(9999)
|
||||
.setB("testing")
|
||||
@ -38,5 +32,5 @@ public class Main {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
// }
|
||||
}
|
@ -2,8 +2,8 @@ package com.alterdekim;
|
||||
|
||||
|
||||
import com.alterdekim.db.Database;
|
||||
import com.alterdekim.login.LoginServer;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -11,10 +11,9 @@ import javax.net.ssl.*;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedList;
|
||||
|
||||
@Slf4j
|
||||
public class Server implements Runnable {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Server.class);
|
||||
|
||||
private SSLServerSocket serverSocket;
|
||||
private int portNumber;
|
||||
private Thread acceptThread;
|
||||
@ -49,11 +48,6 @@ public class Server implements Runnable {
|
||||
public void startListening() {
|
||||
acceptThread = new Thread(this);
|
||||
acceptThread.start();
|
||||
try {
|
||||
new LoginServer(8080);
|
||||
} catch ( Exception e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void stopListening() {
|
||||
for(Connection c:connections) {
|
||||
|
@ -1,18 +1,8 @@
|
||||
package com.alterdekim.db;
|
||||
|
||||
import org.ektorp.CouchDbConnector;
|
||||
import org.ektorp.CouchDbInstance;
|
||||
import org.ektorp.http.HttpClient;
|
||||
import org.ektorp.http.StdHttpClient;
|
||||
import org.ektorp.impl.StdCouchDbConnector;
|
||||
import org.ektorp.impl.StdCouchDbInstance;
|
||||
import org.ektorp.support.DesignDocument;
|
||||
import org.ektorp.support.DesignDocumentFactory;
|
||||
import org.ektorp.support.View;
|
||||
|
||||
public class Database {
|
||||
|
||||
private CouchDbConnector lobbyConnector;
|
||||
//private CouchDbConnector lobbyConnector;
|
||||
|
||||
private String host;
|
||||
private int port;
|
||||
|
14
src/main/java/com/alterdekim/hearthhack/Application.java
Normal file
14
src/main/java/com/alterdekim/hearthhack/Application.java
Normal file
@ -0,0 +1,14 @@
|
||||
package com.alterdekim.hearthhack;
|
||||
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableScheduling
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.alterdekim.hearthhack.config;
|
||||
|
||||
import com.alterdekim.hearthhack.handler.BattleNetSocketHandler;
|
||||
import com.alterdekim.hearthhack.parser.BattleNetSerializerDeserializer;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.integration.config.EnableIntegration;
|
||||
import org.springframework.integration.dsl.IntegrationFlow;
|
||||
import org.springframework.integration.ip.dsl.Tcp;
|
||||
import org.springframework.integration.ip.dsl.TcpInboundGatewaySpec;
|
||||
import org.springframework.integration.ip.dsl.TcpServerConnectionFactorySpec;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@EnableIntegration
|
||||
public class TcpServerSocketConfiguration {
|
||||
|
||||
private final int socketPort = 1119;
|
||||
|
||||
@Bean
|
||||
public IntegrationFlow server(BattleNetSocketHandler serverSocketHandler) {
|
||||
TcpServerConnectionFactorySpec connectionFactory =
|
||||
Tcp.netServer(socketPort)
|
||||
.deserializer(new BattleNetSerializerDeserializer())
|
||||
.serializer(new BattleNetSerializerDeserializer())
|
||||
.soTcpNoDelay(true);
|
||||
|
||||
TcpInboundGatewaySpec inboundGateway =
|
||||
Tcp.inboundGateway(connectionFactory);
|
||||
|
||||
return IntegrationFlow
|
||||
.from(inboundGateway)
|
||||
.handle(serverSocketHandler::handleMessage)
|
||||
.get();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public BattleNetSocketHandler serverSocketHandler() {
|
||||
return new BattleNetSocketHandler();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.alterdekim.hearthhack.handler;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHeaders;
|
||||
|
||||
@Slf4j
|
||||
public class BattleNetSocketHandler {
|
||||
public String handleMessage(Message<?> message, MessageHeaders messageHeaders) {
|
||||
log.info(message.getPayload() + "");
|
||||
// TODO implement something useful to process the incoming message here...
|
||||
return message.getPayload().toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.alterdekim.hearthhack.parser;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.core.serializer.Deserializer;
|
||||
import org.springframework.core.serializer.Serializer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
@Slf4j
|
||||
@Data
|
||||
public class BattleNetSerializerDeserializer implements Serializer<byte[]>, Deserializer<byte[]> {
|
||||
|
||||
|
||||
@Override
|
||||
public byte[] deserialize(InputStream inputStream) throws IOException {
|
||||
return inputStream.readAllBytes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize(byte[] object, OutputStream outputStream) throws IOException {
|
||||
outputStream.write(object);
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.alterdekim.utils;
|
||||
package com.alterdekim.hearthhack.util;
|
||||
|
||||
public enum BattleNetErrors// : uint
|
||||
{
|
||||
public enum BattleNetErrors {
|
||||
// Token: 0x04000CAF RID: 3247
|
||||
ERROR_OK,
|
||||
// Token: 0x04000CB0 RID: 3248
|
||||
@ -1240,4 +1239,4 @@ public enum BattleNetErrors// : uint
|
||||
ERROR_REPORT_REJECTED,
|
||||
// Token: 0x04000F19 RID: 3865
|
||||
ERROR_REPORT_TOO_MANY_REQUESTS
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.alterdekim.utils;
|
||||
package com.alterdekim.hearthhack.util;
|
||||
|
||||
import com.alterdekim.Protocol;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
@ -10,18 +12,14 @@ public class BattleNetPacket {
|
||||
|
||||
private int bodySize = -1;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private Protocol.Header header;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private byte[] body;
|
||||
|
||||
public Protocol.Header getHeader() {
|
||||
return header;
|
||||
}
|
||||
|
||||
public byte[] getBody() {
|
||||
return body;
|
||||
}
|
||||
|
||||
public BattleNetPacket(Protocol.Header header, byte[] body) {
|
||||
this.header = header;
|
||||
this.body = body;
|
||||
@ -32,29 +30,17 @@ public class BattleNetPacket {
|
||||
this.body = null;
|
||||
}
|
||||
|
||||
public void setHeader(Protocol.Header header) {
|
||||
this.header = header;
|
||||
}
|
||||
|
||||
public void setBody(byte[] body) {
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public int Decode(byte[] bytes, int offset, int available) throws Exception {
|
||||
int num = 0;
|
||||
if (this.headerSize < 0) {
|
||||
if (available < 2) {
|
||||
return num;
|
||||
}
|
||||
if (available < 2) return num;
|
||||
this.headerSize = ((int)bytes[offset] << 8) + (int)bytes[offset + 1];
|
||||
available -= 2;
|
||||
num += 2;
|
||||
offset += 2;
|
||||
}
|
||||
if (this.header == null) {
|
||||
if (available < this.headerSize) {
|
||||
return num;
|
||||
}
|
||||
if (available < this.headerSize) return num;
|
||||
this.header = Protocol.Header.getDefaultInstance();
|
||||
byte[] s = new byte[this.headerSize];
|
||||
System.arraycopy(bytes, offset, s, 0, this.headerSize);
|
||||
@ -65,9 +51,7 @@ public class BattleNetPacket {
|
||||
offset += this.headerSize;
|
||||
}
|
||||
if (this.body == null) {
|
||||
if (available < this.bodySize) {
|
||||
return num;
|
||||
}
|
||||
if (available < this.bodySize) return num;
|
||||
byte[] destinationArray = new byte[this.bodySize];
|
||||
System.arraycopy(bytes, offset, destinationArray, 0, this.bodySize);
|
||||
this.body = destinationArray;
|
@ -1,4 +1,4 @@
|
||||
package com.alterdekim.utils;
|
||||
package com.alterdekim.hearthhack.util;
|
||||
|
||||
public class Compute32 {
|
||||
public static int Hash(String str) {
|
@ -1,4 +1,4 @@
|
||||
package com.alterdekim.utils;
|
||||
package com.alterdekim.hearthhack.util;
|
||||
|
||||
import com.google.protobuf.MessageOrBuilder;
|
||||
import com.google.protobuf.util.JsonFormat;
|
@ -1,17 +0,0 @@
|
||||
package com.alterdekim.login;
|
||||
|
||||
import fi.iki.elonen.NanoHTTPD;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class LoginServer extends NanoHTTPD {
|
||||
public LoginServer(int port) throws IOException {
|
||||
super(port);
|
||||
start(NanoHTTPD.SOCKET_READ_TIMEOUT, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response serve(IHTTPSession session) {
|
||||
return newChunkedResponse(Response.Status.OK, "text/html", Thread.currentThread().getContextClassLoader().getResourceAsStream("login.html"));
|
||||
}
|
||||
}
|
@ -2,8 +2,8 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -2,13 +2,11 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Compute32;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class AuthService extends Service {
|
||||
|
@ -2,7 +2,7 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -2,8 +2,8 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import java.util.List;
|
||||
|
@ -2,8 +2,7 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -2,8 +2,8 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -2,10 +2,8 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.exampleProtocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.google.protobuf.AbstractMessage;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -2,8 +2,8 @@ package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.Protocol;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Util;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Util;
|
||||
import com.google.protobuf.ByteString;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.alterdekim.services;
|
||||
|
||||
import com.alterdekim.Connection;
|
||||
import com.alterdekim.utils.BattleNetPacket;
|
||||
import com.alterdekim.utils.Compute32;
|
||||
import com.alterdekim.hearthhack.util.BattleNetPacket;
|
||||
import com.alterdekim.hearthhack.util.Compute32;
|
||||
|
||||
public abstract class Service {
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Login</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css" integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<form class="pure-form pure-form-stacked" method="get" action="localhost:0">
|
||||
<fieldset>
|
||||
<legend>Hearthstone (mod) Sign-in:</legend>
|
||||
<label for="stacked-email">Login</label>
|
||||
<input type="hidden" value="ABCDEFGHIJKLMNOPQRSTU111111222" name="ST">
|
||||
<input type="text" id="stacked-email" placeholder="Login" name="login" />
|
||||
<label for="stacked-password">Password</label>
|
||||
<input type="password" id="stacked-password" placeholder="Password" name="pwd" />
|
||||
<label for="stacked-remember" class="pure-checkbox">
|
||||
<input type="checkbox" id="stacked-remember" /> Remember me
|
||||
</label>
|
||||
<button type="submit" name="submit" class="pure-button pure-button-primary">Sign in</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user