Added Maven and moved sample extensions to their own modules

mvn install, mvn package, done! Extensions have been moved to a new folder
This commit is contained in:
Scott Stamp 2018-10-13 17:53:54 -02:30
parent dcd90b17b5
commit 9d8740c951
98 changed files with 734 additions and 293 deletions

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<artifactId>AdminOnConnect</artifactId>
<packaging>jar</packaging>
<version>0.0.1-beta</version>
<parent>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
<version>0.0.1-beta</version>
</parent>
<build>
<resources>
<!-- Embedded FXML and CSS resources -->
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
<include>**/*.css</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bin/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<mainClass>extensions.adminonconnect.AdminOnConnect</mainClass>
<useUniqueVersions>false</useUniqueVersions>
<classpathPrefix>lib/</classpathPrefix>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<finalName>${artifactId}</finalName>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-UI</artifactId>
<version>0.0.1-beta</version>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
</project>

View File

@ -1,16 +1,14 @@
package main.extensions.examples.adminonconnect;
package extensions.adminonconnect;
import main.extensions.Extension;
import main.extensions.ExtensionInfo;
import main.protocol.HMessage;
import main.protocol.HPacket;
import gearth.extensions.Extension;
import gearth.extensions.ExtensionInfo;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
/**
* Created by Jonas on 26/06/18.
*/
@ExtensionInfo(
Title = "Always admin!",
Description = "Gives you admin permission on connect",

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<artifactId>BlockReplacePackets</artifactId>
<packaging>jar</packaging>
<version>0.0.1-beta</version>
<parent>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
<version>0.0.1-beta</version>
</parent>
<build>
<resources>
<!-- Embedded FXML and CSS resources -->
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
<include>**/*.css</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bin/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<mainClass>extensions.blockreplacepackets.BlockAndReplacePackets</mainClass>
<useUniqueVersions>false</useUniqueVersions>
<classpathPrefix>lib/</classpathPrefix>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<finalName>${artifactId}</finalName>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-UI</artifactId>
<version>0.0.1-beta</version>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
</project>

View File

@ -1,4 +1,4 @@
package main.extensions.examples.blockreplacepackets;
package extensions.blockreplacepackets;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
@ -7,11 +7,9 @@ import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import main.extensions.ExtensionForm;
import main.extensions.ExtensionInfo;
import main.ui.GEarthController;
import java.net.URL;
import gearth.extensions.ExtensionForm;
import gearth.extensions.ExtensionInfo;
import gearth.ui.GEarthController;
/**
* Created by Jonas on 22/09/18.
@ -54,6 +52,6 @@ public class BlockAndReplacePackets extends ExtensionForm {
primaryStage.setTitle("Packet blocker &/ replacer");
primaryStage.setScene(new Scene(root, 580, 262));
primaryStage.getScene().getStylesheets().add(GEarthController.class.getResource("bootstrap3.css").toExternalForm());
primaryStage.getScene().getStylesheets().add(GEarthController.class.getResource("/gearth/ui/bootstrap3.css").toExternalForm());
}
}

View File

@ -12,7 +12,7 @@
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<TabPane prefHeight="255.0" prefWidth="580.0" tabClosingPolicy="UNAVAILABLE" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.extensions.examples.blockreplacepackets.BlockAndReplacePackets">
<TabPane prefHeight="255.0" prefWidth="580.0" tabClosingPolicy="UNAVAILABLE" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.extensions.examples.blockreplacepackets.BlockAndReplacePackets">
<tabs>
<Tab text="Block/replace packet">
<content>

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<artifactId>SpeechColorizer</artifactId>
<packaging>jar</packaging>
<version>0.0.1-beta</version>
<parent>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
<version>0.0.1-beta</version>
</parent>
<build>
<resources>
<!-- Embedded FXML and CSS resources -->
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
<include>**/*.css</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bin/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<outputDirectory>${project.build.directory}/bin</outputDirectory>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<mainClass>extensions.speechcolorizer.SpeechColorizer</mainClass>
<useUniqueVersions>false</useUniqueVersions>
<classpathPrefix>lib/</classpathPrefix>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<finalName>${artifactId}</finalName>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-UI</artifactId>
<version>0.0.1-beta</version>
<!--<scope>provided</scope>-->
</dependency>
</dependencies>
</project>

View File

@ -1,9 +1,9 @@
package main.extensions.examples.speechcolorizer;
package extensions.speechcolorizer;
import main.extensions.Extension;
import main.extensions.ExtensionInfo;
import main.protocol.HMessage;
import main.protocol.HPacket;
import gearth.extensions.Extension;
import gearth.extensions.ExtensionInfo;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import java.util.Random;

138
G-Earth-UI/pom.xml Normal file
View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<artifactId>G-Earth-UI</artifactId>
<packaging>jar</packaging>
<version>0.0.1-beta</version>
<parent>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
<version>0.0.1-beta</version>
</parent>
<build>
<resources>
<!-- Embedded FXML and CSS resources -->
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
<include>**/*.css</include>
<include>**/*.png</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- this would copy dependencies if we were building a non-standalone JAR -->
<!--<plugin>-->
<!--<artifactId>maven-dependency-plugin</artifactId>-->
<!--<executions>-->
<!--<execution>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>copy-dependencies</goal>-->
<!--</goals>-->
<!--<configuration>-->
<!--<outputDirectory>${project.build.directory}/bin/lib</outputDirectory>-->
<!--</configuration>-->
<!--</execution>-->
<!--</executions>-->
<!--</plugin>-->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- this builds a non-standalone JAR file -->
<!--<plugin>-->
<!--<groupId>org.apache.maven.plugins</groupId>-->
<!--<artifactId>maven-jar-plugin</artifactId>-->
<!--<version>2.5</version>-->
<!--<configuration>-->
<!--<outputDirectory>${project.build.directory}/bin</outputDirectory>-->
<!--<archive>-->
<!--<manifest>-->
<!--<addDefaultImplementationEntries>true</addDefaultImplementationEntries>-->
<!--<addClasspath>true</addClasspath>-->
<!--<mainClass>main.Main</mainClass>-->
<!--<useUniqueVersions>false</useUniqueVersions>-->
<!--<classpathPrefix>lib/</classpathPrefix>-->
<!--<addDefaultImplementationEntries>true</addDefaultImplementationEntries>-->
<!--</manifest>-->
<!--</archive>-->
<!--</configuration>-->
<!--</plugin>-->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<mainClass>main.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180813</version>
</dependency>
<dependency>
<groupId>org.fxmisc.richtext</groupId>
<artifactId>richtextfx</artifactId>
<version>0.9.1</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: gearth.Main

View File

@ -1,16 +1,12 @@
package main;
package gearth;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import main.ui.GEarthController;
import java.util.Arrays;
import gearth.ui.GEarthController;
// run as root issue Invalid MIT-MAGIC-COOKIE-1 key fix: https://stackoverflow.com/questions/48139447/invalid-mit-magic-cookie-1-key

View File

@ -1,8 +1,8 @@
package main.extensions;
package gearth.extensions;
import main.protocol.HMessage;
import main.protocol.HPacket;
import main.ui.extensions.Extensions;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import gearth.ui.extensions.Extensions;
import java.io.*;
import java.net.Socket;
@ -134,7 +134,7 @@ public abstract class Extension {
onEndConnection();
}
else if (packet.headerId() == Extensions.OUTGOING_MESSAGES_IDS.FLAGSCHECK) {
// body = an array of G-Earths main flags
// body = an array of G-Earths gearth flags
if (flagRequestCallback != null) {
int arraysize = packet.readInteger();
String[] gEarthArgs = new String[arraysize];

View File

@ -1,10 +1,10 @@
package main.extensions;
package gearth.extensions;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.stage.Stage;
import main.protocol.HMessage;
import main.protocol.HPacket;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
/**
* Created by Jonas on 22/09/18.

View File

@ -1,4 +1,4 @@
package main.extensions;
package gearth.extensions;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

View File

@ -1,4 +1,4 @@
package main.extensions.extra;
package gearth.extensions.extra;
/**
* Created by Jonas on 22/09/18.

View File

@ -1,52 +1,48 @@
package main.misc;
package gearth.misc;
import main.Main;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import gearth.Main;
import org.json.JSONArray;
import org.json.JSONObject;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by Jonas on 28/09/18.
*/
public class Cacher {
private static final String CACHEFILENAME = "cache.json";
private static final String CACHE_FILENAME = "cache.json";
private static String getCacheDir() {
return new File(Main.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent();
}
private static boolean cacheFileExists() {
File f = new File(getCacheDir(), CACHEFILENAME);
File f = new File(getCacheDir(), CACHE_FILENAME);
return (f.exists() && !f.isDirectory());
}
private static JSONObject getCacheContents() {
if (cacheFileExists()) {
try {
File f = new File(getCacheDir(), CACHEFILENAME);
File f = new File(getCacheDir(), CACHE_FILENAME);
String contents = String.join("\n", Files.readAllLines(f.toPath()));
JSONParser parser = new JSONParser();
return (JSONObject) parser.parse(contents);
} catch (IOException | ParseException e) {
return new JSONObject(contents);
} catch (IOException e) {
e.printStackTrace();
}
}
return new JSONObject();
}
private static void updateCache(JSONObject contents) {
try (FileWriter file = new FileWriter(new File(getCacheDir(), CACHEFILENAME))) {
try (FileWriter file = new FileWriter(new File(getCacheDir(), CACHE_FILENAME))) {
file.write(contents.toJSONString());
file.write(contents.toString());
file.flush();
} catch (IOException e) {
@ -56,16 +52,24 @@ public class Cacher {
public static void put(String key, Object val) {
JSONObject object = getCacheContents();
if (object.containsKey(key)) object.remove(key);
if (object.has(key)) object.remove(key);
object.put(key, val);
updateCache(object);
}
public static Object get(String key) {
JSONObject object = getCacheContents();
return object.get(key);
if (object.has(key)) return object.get(key);
else return null;
}
public static List<Object> getList(String key) {
JSONObject object = getCacheContents();
if (object.has(key)) return ((JSONArray)object.get(key)).toList();
else return null;
}
public static void clear() {
updateCache(new JSONObject());
}

View File

@ -1,4 +1,4 @@
package main.misc;
package gearth.misc;
import javafx.scene.Group;
import javafx.scene.Node;

View File

@ -1,4 +1,4 @@
package main.misc;
package gearth.misc;
public class OSValidator {

View File

@ -1,4 +1,4 @@
package main.misc;
package gearth.misc;
/**
* Created by Jonas on 14/06/18.

View File

@ -1,12 +1,13 @@
package main.protocol;
package gearth.protocol;
import main.misc.Cacher;
import main.protocol.hostreplacer.HostReplacer;
import main.protocol.hostreplacer.HostReplacerFactory;
import main.protocol.memory.Rc4Obtainer;
import main.protocol.packethandler.Handler;
import main.protocol.packethandler.IncomingHandler;
import main.protocol.packethandler.OutgoingHandler;
import gearth.misc.Cacher;
import gearth.protocol.hostreplacer.HostReplacer;
import gearth.protocol.hostreplacer.HostReplacerFactory;
import gearth.protocol.memory.Rc4Obtainer;
import gearth.protocol.packethandler.Handler;
import gearth.protocol.packethandler.IncomingHandler;
import gearth.protocol.packethandler.OutgoingHandler;
import org.json.JSONArray;
import java.io.*;
import java.net.InetAddress;
@ -78,11 +79,11 @@ public class HConnection {
autoDetectHosts.add("game-tr.habbo.com:30000");
autoDetectHosts.add("game-us.habbo.com:38101");
List<String> additionalCachedHotels = (List<String>) Cacher.get(HOTELS_CACHE_KEY);
List<Object> additionalCachedHotels = Cacher.getList(HOTELS_CACHE_KEY);
if (additionalCachedHotels != null) {
for (String additionalHotel : additionalCachedHotels) {
for (Object additionalHotel : additionalCachedHotels) {
if (!autoDetectHosts.contains(additionalHotel)) {
autoDetectHosts.add(additionalHotel);
autoDetectHosts.add((String)additionalHotel);
}
}
}
@ -123,7 +124,7 @@ public class HConnection {
// manual method
public void prepare(String domain, int port) {
List<String> additionalCachedHotels = (List<String>) Cacher.get(HOTELS_CACHE_KEY);
List<Object> additionalCachedHotels = Cacher.getList(HOTELS_CACHE_KEY);
if (additionalCachedHotels == null) {
additionalCachedHotels = new ArrayList<>();
}
@ -132,7 +133,6 @@ public class HConnection {
Cacher.put(HOTELS_CACHE_KEY, additionalCachedHotels);
}
List<String> potentialHost = new ArrayList<>();
potentialHost.add(domain+":"+port);
prepare(potentialHost);
@ -171,7 +171,7 @@ public class HConnection {
}
}
List<String> additionalCachedHotels = (List<String>) Cacher.get(HOTELS_CACHE_KEY);
List<Object> additionalCachedHotels = Cacher.getList(HOTELS_CACHE_KEY);
if (additionalCachedHotels != null) {
for (String host : willremove) {
additionalCachedHotels.remove(host);

View File

@ -1,6 +1,6 @@
package main.protocol;
package gearth.protocol;
import main.misc.StringifyAble;
import gearth.misc.StringifyAble;
public class HMessage implements StringifyAble {
@ -75,7 +75,7 @@ public class HMessage implements StringifyAble {
return message.hPacket.equals(hPacket) && (side == message.side) && (index == message.index);
}
// public static void main(String[] args) {
// public static void gearth(String[] args) {
// HPacket packet3 = new HPacket(81, new byte[]{0,0,0,1,0,0});
//
// HPacket packet = new HPacket(82, new byte[]{0,0,0,1,0,0});

View File

@ -1,14 +1,12 @@
package main.protocol;
package gearth.protocol;
import main.misc.StringifyAble;
import gearth.misc.StringifyAble;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class HPacket implements StringifyAble {
// te komen: toExpressions (+impl. expressies)

View File

@ -1,4 +1,4 @@
package main.protocol;
package gearth.protocol;
public interface StateChangeListener {

View File

@ -1,4 +1,4 @@
package main.protocol;
package gearth.protocol;
public interface TrafficListener {

View File

@ -1,4 +1,4 @@
package main.protocol.crypto;
package gearth.protocol.crypto;
/*
* Copyright (C) 2003 Clarence Ho (clarence@clarenceho.net)
* All rights reserved.
@ -33,11 +33,7 @@ package main.protocol.crypto;
* THE POSSIBILITY OF SUCH DAMAGE.
*/
import main.protocol.HPacket;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* This is a simple implementation of the RC4 (tm) encryption algorithm. The

View File

@ -1,4 +1,4 @@
package main.protocol.hostreplacer;
package gearth.protocol.hostreplacer;
public interface HostReplacer {

View File

@ -1,6 +1,6 @@
package main.protocol.hostreplacer;
package gearth.protocol.hostreplacer;
import main.misc.OSValidator;
import gearth.misc.OSValidator;
/**
* Created by Jonas on 04/04/18.

View File

@ -1,4 +1,4 @@
package main.protocol.hostreplacer;
package gearth.protocol.hostreplacer;
import java.io.*;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package main.protocol.hostreplacer;
package gearth.protocol.hostreplacer;
/**
* Created by Jonas on 04/04/18.

View File

@ -1,16 +1,15 @@
package main.protocol.memory;
package gearth.protocol.memory;
import main.protocol.HConnection;
import main.protocol.HMessage;
import main.protocol.HPacket;
import main.protocol.crypto.RC4;
import main.protocol.memory.habboclient.HabboClient;
import main.protocol.memory.habboclient.HabboClientFactory;
import main.protocol.memory.habboclient.linux.LinuxHabboClient;
import main.protocol.packethandler.Handler;
import main.protocol.packethandler.IncomingHandler;
import main.protocol.packethandler.OutgoingHandler;
import main.protocol.packethandler.PayloadBuffer;
import gearth.protocol.HConnection;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import gearth.protocol.crypto.RC4;
import gearth.protocol.memory.habboclient.HabboClient;
import gearth.protocol.memory.habboclient.HabboClientFactory;
import gearth.protocol.packethandler.Handler;
import gearth.protocol.packethandler.IncomingHandler;
import gearth.protocol.packethandler.OutgoingHandler;
import gearth.protocol.packethandler.PayloadBuffer;
import java.util.Arrays;
import java.util.List;

View File

@ -1,6 +1,6 @@
package main.protocol.memory.habboclient;
package gearth.protocol.memory.habboclient;
import main.protocol.HConnection;
import gearth.protocol.HConnection;
import java.util.List;

View File

@ -1,9 +1,9 @@
package main.protocol.memory.habboclient;
package gearth.protocol.memory.habboclient;
import main.misc.OSValidator;
import main.protocol.HConnection;
import main.protocol.memory.habboclient.linux.LinuxHabboClient;
import main.protocol.memory.habboclient.windows.WindowsHabboClient;
import gearth.misc.OSValidator;
import gearth.protocol.HConnection;
import gearth.protocol.memory.habboclient.linux.LinuxHabboClient;
import gearth.protocol.memory.habboclient.windows.WindowsHabboClient;
/**
* Created by Jonas on 13/06/18.

View File

@ -1,7 +1,7 @@
package main.protocol.memory.habboclient.linux;
package gearth.protocol.memory.habboclient.linux;
import main.protocol.HConnection;
import main.protocol.memory.habboclient.HabboClient;
import gearth.protocol.HConnection;
import gearth.protocol.memory.habboclient.HabboClient;
import java.io.*;
import java.nio.file.Files;

View File

@ -1,4 +1,4 @@
package main.protocol.memory.habboclient.linux;
package gearth.protocol.memory.habboclient.linux;
public class LinuxMemorySnippet {
long offset;

View File

@ -1,11 +1,10 @@
package main.protocol.memory.habboclient.windows;
package gearth.protocol.memory.habboclient.windows;
import main.misc.Cacher;
import main.protocol.HConnection;
import main.protocol.HMessage;
import main.protocol.TrafficListener;
import main.protocol.memory.habboclient.HabboClient;
import org.json.simple.JSONObject;
import gearth.misc.Cacher;
import gearth.protocol.HConnection;
import gearth.protocol.HMessage;
import gearth.protocol.memory.habboclient.HabboClient;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.File;
@ -23,22 +22,16 @@ public class WindowsHabboClient extends HabboClient {
super(connection);
connection.addTrafficListener(0, message -> {
if (message.getDestination() == HMessage.Side.TOSERVER && message.getPacket().headerId() == PRODUCTIONID) {
if (message.getDestination() == HMessage.Side.TOSERVER && message.getPacket().headerId() == PRODUCTION_ID) {
production = message.getPacket().readString();
}
});
}
private static final int PRODUCTIONID = 4000;
private static final String OFFSETS_CACHE_KEY = "RC4Offsets";
private static final int PRODUCTION_ID = 4000;
private String production = "";
private String getOffsetsCacheKey() {
return "RC4Offsets";
}
private String getOffsetsRevision() {
return production;
}
@Override
public List<byte[]> getRC4cached() {
@ -58,15 +51,16 @@ public class WindowsHabboClient extends HabboClient {
}
private ArrayList<String> readPossibleBytes(boolean useCache) throws IOException, URISyntaxException {
ProcessBuilder pb = null;
JSONObject revisionList = (JSONObject) Cacher.get(getOffsetsCacheKey());
ProcessBuilder pb;
JSONObject revisionList = (JSONObject) Cacher.get(OFFSETS_CACHE_KEY);
if (revisionList == null) {
Cacher.put(getOffsetsCacheKey(), new JSONObject());
revisionList = (JSONObject) Cacher.get(getOffsetsCacheKey()); // refresh
Cacher.put(OFFSETS_CACHE_KEY, new JSONObject());
revisionList = (JSONObject) Cacher.get(OFFSETS_CACHE_KEY);
}
List<String> cachedOffsets = (List<String>) revisionList.get(getOffsetsRevision());
assert revisionList != null;
List<Object> cachedOffsets = revisionList.getJSONArray(production).toList();
StringJoiner joiner = new StringJoiner(" ");
if (useCache) {
@ -74,8 +68,8 @@ public class WindowsHabboClient extends HabboClient {
return null;
}
for (String s : cachedOffsets) {
joiner.add(s);
for (Object s : cachedOffsets) {
joiner.add((String)s);
}
}
@ -108,8 +102,9 @@ public class WindowsHabboClient extends HabboClient {
possibleData.add(line);
}
}
revisionList.put(getOffsetsRevision(), cachedOffsets);
Cacher.put(getOffsetsCacheKey(), revisionList);
revisionList.put(production, cachedOffsets);
Cacher.put(OFFSETS_CACHE_KEY, revisionList);
p.destroy();
return possibleData;
}
@ -129,7 +124,7 @@ public class WindowsHabboClient extends HabboClient {
return result;
}
public static byte[] hexStringToByteArray(String s) {
private static byte[] hexStringToByteArray(String s) {
int len = s.length();
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {

View File

@ -1,4 +1,4 @@
package main.protocol.packethandler;
package gearth.protocol.packethandler;
public interface BufferListener {

View File

@ -1,9 +1,9 @@
package main.protocol.packethandler;
package gearth.protocol.packethandler;
import main.protocol.HMessage;
import main.protocol.HPacket;
import main.protocol.TrafficListener;
import main.protocol.crypto.RC4;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import gearth.protocol.TrafficListener;
import gearth.protocol.crypto.RC4;
import java.io.IOException;
import java.io.OutputStream;

View File

@ -1,8 +1,8 @@
package main.protocol.packethandler;
package gearth.protocol.packethandler;
import main.protocol.HMessage;
import main.protocol.HPacket;
import main.protocol.TrafficListener;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import gearth.protocol.TrafficListener;
import java.io.IOException;
import java.io.OutputStream;

View File

@ -1,11 +1,10 @@
package main.protocol.packethandler;
package gearth.protocol.packethandler;
import main.protocol.HMessage;
import main.protocol.HPacket;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
public class OutgoingHandler extends Handler {

View File

@ -1,6 +1,6 @@
package main.protocol.packethandler;
package gearth.protocol.packethandler;
import main.protocol.HPacket;
import gearth.protocol.HPacket;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -7,7 +7,7 @@
<!--maxHeight="19.0" minHeight="19.0"-->
<VBox xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.GEarthController">
<VBox xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.GEarthController">
<Pane fx:id="mover" maxHeight="0.0" minHeight="0.0" prefWidth="200.0" />
<TabPane fx:id="tabBar" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="295.0" prefWidth="565.0" tabClosingPolicy="UNAVAILABLE">
<tabs>

View File

@ -1,18 +1,18 @@
package main.ui;
package gearth.ui;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import main.protocol.HConnection;
import main.ui.connection.Connection;
import main.ui.extensions.Extensions;
import main.ui.info.Info;
import main.ui.injection.Injection;
import main.ui.logger.Logger;
import main.ui.scheduler.Scheduler;
import main.ui.settings.Settings;
import main.ui.tools.Tools;
import gearth.protocol.HConnection;
import gearth.ui.connection.Connection;
import gearth.ui.extensions.Extensions;
import gearth.ui.info.Info;
import gearth.ui.injection.Injection;
import gearth.ui.logger.Logger;
import gearth.ui.scheduler.Scheduler;
import gearth.ui.settings.Settings;
import gearth.ui.tools.Tools;
public class GEarthController {

View File

@ -1,11 +1,7 @@
package main.ui;
package gearth.ui;
import main.protocol.HConnection;
import main.protocol.HMessage;
import main.protocol.HPacket;
import java.awt.*;
import gearth.protocol.HConnection;
public class SubForm {

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
import javafx.event.EventHandler;
import javafx.scene.Cursor;

View File

@ -1,8 +1,4 @@
package main.ui.buttons;
import org.omg.CORBA.Environment;
import java.io.File;
package gearth.ui.buttons;
public class DeleteButton extends BoxButton {

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
public class EditButton extends BoxButton {

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
/**
* Created by Jonas on 26/09/18.

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
/**
* Created by Jonas on 26/09/18.

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
import javafx.beans.InvalidationListener;
import javafx.event.EventHandler;

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
/**
* Created by Jonas on 26/09/18.

View File

@ -1,4 +1,4 @@
package main.ui.buttons;
package gearth.ui.buttons;
/**
* Created by Jonas on 19/07/18.

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 443 B

View File

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 460 B

View File

Before

Width:  |  Height:  |  Size: 454 B

After

Width:  |  Height:  |  Size: 454 B

View File

Before

Width:  |  Height:  |  Size: 644 B

After

Width:  |  Height:  |  Size: 644 B

View File

Before

Width:  |  Height:  |  Size: 538 B

After

Width:  |  Height:  |  Size: 538 B

View File

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

View File

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 642 B

View File

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 725 B

View File

Before

Width:  |  Height:  |  Size: 621 B

After

Width:  |  Height:  |  Size: 621 B

View File

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 643 B

View File

Before

Width:  |  Height:  |  Size: 535 B

After

Width:  |  Height:  |  Size: 535 B

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 446 B

After

Width:  |  Height:  |  Size: 446 B

View File

@ -11,7 +11,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.connection.Connection">
<GridPane alignment="CENTER" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.connection.Connection">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>

View File

@ -1,17 +1,10 @@
package main.ui.connection;
package gearth.ui.connection;
import javafx.application.Platform;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.event.EventType;
import javafx.scene.control.*;
import main.protocol.HConnection;
import main.protocol.HMessage;
import main.protocol.TrafficListener;
import main.ui.SubForm;
import gearth.protocol.HConnection;
import gearth.ui.SubForm;
import java.io.IOException;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package main.ui.extensions;
package gearth.ui.extensions;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
@ -8,17 +8,13 @@ import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
import javafx.scene.paint.Paint;
import javafx.scene.text.Font;
import main.extensions.Extension;
import main.misc.ConfirmationDialog;
import main.ui.buttons.*;
import main.ui.extensions.executer.ExecutionInfo;
import main.ui.extensions.executer.ExtensionRunner;
import main.ui.extensions.executer.ExtensionRunnerFactory;
import main.ui.extensions.executer.NormalExtensionRunner;
import main.ui.scheduler.ScheduleItem;
import gearth.misc.ConfirmationDialog;
import gearth.ui.buttons.*;
import gearth.ui.extensions.executer.ExecutionInfo;
import gearth.ui.extensions.executer.ExtensionRunner;
import gearth.ui.extensions.executer.ExtensionRunnerFactory;
import gearth.ui.extensions.executer.NormalExtensionRunner;
import javax.tools.Tool;
import java.nio.file.Path;
import java.nio.file.Paths;
/**

View File

@ -1,4 +1,4 @@
package main.ui.extensions;
package gearth.ui.extensions;
import javafx.scene.Node;
import javafx.scene.control.ScrollPane;

View File

@ -10,7 +10,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.extensions.Extensions">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.extensions.Extensions">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="277.0" />
</columnConstraints>

View File

@ -1,8 +1,6 @@
package main.ui.extensions;
package gearth.ui.extensions;
import javafx.application.Platform;
import javafx.beans.*;
import javafx.beans.Observable;
import javafx.event.ActionEvent;
import javafx.scene.control.Button;
import javafx.scene.control.ScrollPane;
@ -10,20 +8,16 @@ import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import main.Main;
import main.protocol.*;
import main.ui.SubForm;
import main.ui.extensions.executer.ExecutionInfo;
import main.ui.extensions.executer.ExtensionRunner;
import main.ui.extensions.executer.ExtensionRunnerFactory;
import main.ui.scheduler.ScheduleItem;
import sun.misc.ExtensionInfo;
import gearth.Main;
import gearth.protocol.*;
import gearth.ui.SubForm;
import gearth.ui.extensions.executer.ExecutionInfo;
import gearth.ui.extensions.executer.ExtensionRunner;
import gearth.ui.extensions.executer.ExtensionRunnerFactory;
import gearth.ui.scheduler.ScheduleItem;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.ServerSocket;
import java.util.*;
/**
@ -73,7 +67,7 @@ import java.util.*;
* | 3 | PACKET-INTERCEPT* | Includes the whole HMessage as body, needs response with the |
* | | | manipulated HMessage (OUTGOING id: 2) |
* -----------------------------------------------------------------------------------------------------
* | 4 | FLAGS-CHECK** | Body: String with G-Earth's boot flags (args from static main method) |
* | 4 | FLAGS-CHECK** | Body: String with G-Earth's boot flags (args from static gearth method) |
* -----------------------------------------------------------------------------------------------------
* | 5 | CONNECTION START | Empty body, just a note that a new connection has been made, |
* | | | you could check this yourself as well (listen to out:4000 packet) |

View File

@ -1,7 +1,7 @@
package main.ui.extensions;
package gearth.ui.extensions;
import javafx.beans.InvalidationListener;
import main.protocol.HPacket;
import gearth.protocol.HPacket;
import java.io.DataInputStream;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package main.ui.extensions;
package gearth.ui.extensions;
import java.io.IOException;
import java.net.ServerSocket;

View File

@ -1,4 +1,4 @@
package main.ui.extensions.executer;
package gearth.ui.extensions.executer;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -1,10 +1,4 @@
package main.ui.extensions.executer;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
package gearth.ui.extensions.executer;
/**
* Created by Jonas on 21/09/18.

View File

@ -1,4 +1,4 @@
package main.ui.extensions.executer;
package gearth.ui.extensions.executer;
/**
* Created by Jonas on 22/09/18.

View File

@ -1,6 +1,6 @@
package main.ui.extensions.executer;
package gearth.ui.extensions.executer;
import main.Main;
import gearth.Main;
import java.io.File;
import java.io.IOException;

View File

@ -6,7 +6,7 @@
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.info.Info">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.info.Info">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="367.0" minWidth="10.0" prefWidth="332.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="10.0" prefWidth="233.0" />

View File

@ -1,7 +1,7 @@
package main.ui.info;
package gearth.ui.info;
import javafx.scene.control.TextArea;
import main.ui.SubForm;
import gearth.ui.SubForm;
/**
* Created by Jonas on 06/04/18.

View File

@ -9,7 +9,7 @@
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.injection.Injection">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.injection.Injection">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>

View File

@ -1,4 +1,4 @@
package main.ui.injection;
package gearth.ui.injection;
import javafx.application.Platform;
import javafx.event.ActionEvent;
@ -7,9 +7,9 @@ import javafx.scene.control.TextArea;
import javafx.scene.paint.Color;
import javafx.scene.paint.Paint;
import javafx.scene.text.Text;
import main.protocol.HConnection;
import main.protocol.HPacket;
import main.ui.SubForm;
import gearth.protocol.HConnection;
import gearth.protocol.HPacket;
import gearth.ui.SubForm;
public class Injection extends SubForm {
public TextArea inputPacket;

View File

@ -12,7 +12,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.TextFlow?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.logger.Logger">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.logger.Logger">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="293.0" minWidth="10.0" prefWidth="242.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="10.0" prefWidth="323.0" />

View File

@ -1,4 +1,4 @@
package main.ui.logger;
package gearth.ui.logger;
import javafx.application.Platform;
import javafx.event.ActionEvent;
@ -9,15 +9,13 @@ import javafx.scene.input.KeyCode;
import javafx.scene.paint.Color;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import main.protocol.HConnection;
import main.protocol.HMessage;
import main.ui.SubForm;
import main.ui.logger.loggerdisplays.PacketLogger;
import main.ui.logger.loggerdisplays.PacketLoggerFactory;
import gearth.protocol.HConnection;
import gearth.protocol.HMessage;
import gearth.ui.SubForm;
import gearth.ui.logger.loggerdisplays.PacketLogger;
import gearth.ui.logger.loggerdisplays.PacketLoggerFactory;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
public class Logger extends SubForm {

View File

@ -1,6 +1,6 @@
package main.ui.logger.loggerdisplays;
package gearth.ui.logger.loggerdisplays;
import main.protocol.HPacket;
import gearth.protocol.HPacket;
import java.util.HashMap;
import java.util.Map;

View File

@ -1,7 +1,6 @@
package main.ui.logger.loggerdisplays;
package gearth.ui.logger.loggerdisplays;
import main.protocol.HMessage;
import main.protocol.HPacket;
import gearth.protocol.HPacket;
/**
* Created by Jonas on 04/04/18.

View File

@ -1,6 +1,6 @@
package main.ui.logger.loggerdisplays;
package gearth.ui.logger.loggerdisplays;
import main.misc.OSValidator;
import gearth.misc.OSValidator;
/**
* Created by Jonas on 04/04/18.

View File

@ -1,6 +1,6 @@
package main.ui.logger.loggerdisplays;
package gearth.ui.logger.loggerdisplays;
import main.protocol.HPacket;
import gearth.protocol.HPacket;
/**
* Created by Jonas on 04/04/18.

View File

@ -1,4 +1,4 @@
package main.ui.scheduler;
package gearth.ui.scheduler;
/**
* Created by Jonas on 11/04/18.

View File

@ -1,12 +1,12 @@
package main.ui.scheduler;
package gearth.ui.scheduler;
import javafx.beans.InvalidationListener;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleObjectProperty;
import main.misc.StringifyAble;
import main.protocol.HMessage;
import main.protocol.HPacket;
import gearth.misc.StringifyAble;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package main.ui.scheduler;
package gearth.ui.scheduler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
@ -7,9 +7,9 @@ import javafx.scene.control.ScrollPane;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.*;
import javafx.scene.text.Font;
import main.ui.buttons.DeleteButton;
import main.ui.buttons.EditButton;
import main.ui.buttons.PauseResumeButton;
import gearth.ui.buttons.DeleteButton;
import gearth.ui.buttons.EditButton;
import gearth.ui.buttons.PauseResumeButton;
/**
* Created by Jonas on 07/04/18.

View File

@ -12,7 +12,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.scheduler.Scheduler">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.scheduler.Scheduler">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="10.0" prefWidth="277.0" />
</columnConstraints>

View File

@ -1,16 +1,14 @@
package main.ui.scheduler;
package gearth.ui.scheduler;
import javafx.application.Platform;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.event.ActionEvent;
import javafx.scene.control.*;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox;
import javafx.stage.FileChooser;
import main.protocol.HMessage;
import main.protocol.HPacket;
import main.ui.SubForm;
import gearth.protocol.HMessage;
import gearth.protocol.HPacket;
import gearth.ui.SubForm;
import java.io.*;
import java.util.ArrayList;

View File

@ -3,7 +3,7 @@
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.RowConstraints?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.settings.Settings">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.settings.Settings">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="303.0" minWidth="10.0" prefWidth="277.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="10.0" prefWidth="288.0" />

View File

@ -1,6 +1,6 @@
package main.ui.settings;
package gearth.ui.settings;
import main.ui.SubForm;
import gearth.ui.SubForm;
/**
* Created by Jonas on 06/04/18.

View File

@ -10,7 +10,7 @@
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="main.ui.tools.Tools">
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="262.0" prefWidth="565.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="gearth.ui.tools.Tools">
<rowConstraints>
<RowConstraints maxHeight="158.0" minHeight="10.0" prefHeight="134.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="141.0" minHeight="10.0" prefHeight="128.0" vgrow="SOMETIMES" />

View File

@ -1,17 +1,14 @@
package main.ui.tools;
package gearth.ui.tools;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.control.Button;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import main.protocol.HPacket;
import main.ui.SubForm;
import gearth.protocol.HPacket;
import gearth.ui.SubForm;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
public class Tools extends SubForm {

29
pom.xml Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<groupId>G-Earth</groupId>
<artifactId>G-Earth-Parent</artifactId>
<packaging>pom</packaging>
<version>0.0.1-beta</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<name>G-Earth</name>
<url>https://github.com/sirjonasxx/G-Earth</url>
<description></description>
<modules>
<module>G-Earth-UI</module>
<!-- Compile our extensions too please! -->
<module>Extensions/AdminOnConnect</module>
<module>Extensions/BlockReplacePackets</module>
<module>Extensions/SpeechColorizer</module>
</modules>
</project>

View File

@ -1,3 +0,0 @@
Manifest-Version: 1.0
Main-Class: main.Main