Skip to content

Commit

Permalink
- changing, modifying, and improving the configuration
Browse files Browse the repository at this point in the history
- adding a GUI (default)
- minor modifications to current services
- adding new commands
- change of logo
- added support for proxy server settings
- and much more...
  • Loading branch information
mimic2300 committed Jun 1, 2018
1 parent e55ee87 commit 1d07651
Show file tree
Hide file tree
Showing 31 changed files with 790 additions and 211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public interface IBotnet {
/**
* Verze Botnetu.
*/
String VERSION = "0.9.1";
String VERSION = "0.9.2";

/**
* Verze REST API pro vHackOS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public BotnetCoreException() {
super(message);
}

BotnetCoreException(String message, Throwable cause) {
public BotnetCoreException(String message, Throwable cause) {
super(message, cause);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ public final class ConnectionException extends BotnetException {
public ConnectionException(String message) {
super(null, message);
}

public ConnectionException(String resultCode, String message, Throwable cause) {
super(resultCode, message, cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public synchronized UpdateResponse update() {
ModuleHelper.setField(response, dto, UpdateResponse.P_ACCESS_TOKEN);
ModuleHelper.setField(response, dto, UpdateResponse.P_UID);
ModuleHelper.setField(response, dto, UpdateResponse.P_USERNAME);
ModuleHelper.setField(response, dto, UpdateResponse.P_EMAIL);
ModuleHelper.setField(response, dto, UpdateResponse.P_EXPIRED);
ModuleHelper.setField(response, dto, UpdateResponse.P_EASTER_EVENT);
ModuleHelper.setField(response, dto, UpdateResponse.P_BLUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ private ServerResponse createServerResponse(Opcode opcode) {
ModuleHelper.setField(response, dto, ServerResponse.P_NODE_NUMBER);
ModuleHelper.setField(response, dto, ServerResponse.P_SPACK_TYPE);
ModuleHelper.setField(response, dto, ServerResponse.P_SHOW_MUCH);
ModuleHelper.setField(response, dto, ServerResponse.P_SERVER);
ModuleHelper.setField(response, dto, ServerResponse.P_AV);
ModuleHelper.setField(response, dto, ServerResponse.P_FW);
ModuleHelper.setField(response, dto, ServerResponse.P_BOOST);
return dto;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public Map<String, Object> send(IModule module) {
}
} catch (IOException e) {
LOG.error("Something is wrong with processing the request. URI: {}", uri);
throw new IllegalStateException("An error occurred while processing request: " + uri, e);
throw new ConnectionException(null, "An error occurred while processing request: " + uri, e);
} finally {
if (conn != null) {
LOG.debug("Closing connection for opcode: {}->{}", opcode.getTarget(), opcode.getOpcodeValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,26 @@ public final class ServerResponse extends Response {
private Integer sHowMuch;
public static final String P_SHOW_MUCH = "sHowMuch";

@AsciiRow("sServer")
@ResponseKey("sServer")
private String sServer;
public static final String P_SERVER = "sServer";

@AsciiRow("sAV")
@ResponseKey("sAV")
private String sAV;
public static final String P_AV = "sAV";

@AsciiRow("sFW")
@ResponseKey("sFW")
private String sFW;
public static final String P_FW = "sFW";

@AsciiRow("sBoost")
@ResponseKey("sBoost")
private String sBoost;
public static final String P_BOOST = "sBoost";

public Integer getAvAdded() {
return avAdded;
}
Expand Down Expand Up @@ -549,4 +569,36 @@ public Integer getsHowMuch() {
public void setsHowMuch(Integer sHowMuch) {
this.sHowMuch = sHowMuch;
}

public String getsServer() {
return sServer;
}

public void setsServer(String sServer) {
this.sServer = sServer;
}

public String getsAV() {
return sAV;
}

public void setsAV(String sAV) {
this.sAV = sAV;
}

public String getsFW() {
return sFW;
}

public void setsFW(String sFW) {
this.sFW = sFW;
}

public String getsBoost() {
return sBoost;
}

public void setsBoost(String sBoost) {
this.sBoost = sBoost;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ public final class UpdateResponse extends Response {
private String userName;
public static final String P_USERNAME = "userName";

@AsciiRow("Email")
@ResponseKey("email")
private String email;
public static final String P_EMAIL = "email";

@AsciiRow(value = "Expired", converter = AsciiBooleanConverter.class)
@ResponseKey("expired")
private Integer expired;
Expand Down Expand Up @@ -278,6 +283,14 @@ public final class UpdateResponse extends Response {
private String internetConnection;
public static final String P_INTERNET_CONNECTION = "internetConnection";

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getUserName() {
return userName;
}
Expand Down
25 changes: 9 additions & 16 deletions m.bot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
</dependency>

<dependency>
<groupId>cz.ophite.mimic</groupId>
<artifactId>m.shared</artifactId>
Expand All @@ -50,8 +51,6 @@
</dependencies>

<build>
<finalName>${p.jarName}</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -70,26 +69,19 @@
</archive>
</configuration>
</plugin>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>${p.main}</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${p.jarName}</finalName>
</configuration>
</execution>
</executions>
</plugin>
Expand All @@ -101,6 +93,7 @@
<targetPath>${project.build.directory}/classes</targetPath>
<includes>
<include>log4j2.xml</include>
<include>font.ttf</include>
</includes>
</resource>
</resources>
Expand Down
Loading

0 comments on commit 1d07651

Please sign in to comment.