Skip to content

Commit

Permalink
- added command to display the logo
Browse files Browse the repository at this point in the history
  • Loading branch information
mimic2300 committed Jun 1, 2018
1 parent 1d07651 commit 71e41d9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public final class Application implements ICommandListener {
private static final Logger LOG = LoggerFactory.getLogger(Application.class);

public static final int ERROR_CODE_MISSING_LOGIN_CREDENTIAL = 10;
public static final String LOGO = getBotnetLogo();

private static Botnet botnet;
private static BotnetGui gui;
Expand All @@ -52,7 +53,7 @@ public static void main(String[] args) {
gui = new BotnetGui();
gui.open();
}
LOG.info(getBotnetLogo());
LOG.info(LOGO);
LOG.info("The botnet starting...");

// vytvoří instanci aplikace a botnetu
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package cz.ophite.mimic.vhackos.botnet.command;

import cz.ophite.mimic.vhackos.botnet.Application;
import cz.ophite.mimic.vhackos.botnet.api.exception.IpNotExistsException;
import cz.ophite.mimic.vhackos.botnet.api.module.*;
import cz.ophite.mimic.vhackos.botnet.api.net.response.*;
Expand Down Expand Up @@ -61,6 +62,17 @@ final class BotnetCommands extends BaseCommand {
@Autowired
private SdkModule sdkModule;

/**
* Vypíše logo.
*/
@Command(value = "logo", comment = "Prints the logo")
private String logo() {
return execute("logo", am -> {
am.setTopTheme();
put(am, " ", Application.LOGO);
});
}

/**
* Přenačte konfiguraci aplikace.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public void setInsideTheme() {
getContext().setGridTheme(TA_GridThemes.INSIDE);
}

public void setTopTheme() {
getContext().setGridTheme(TA_GridThemes.TOP);
}

public AT_Row add(Collection<?> columns) throws NullPointerException, AsciiTableException {
Validate.notNull(columns);
return add(columns.toArray());
Expand Down

0 comments on commit 71e41d9

Please sign in to comment.