Skip to content

Commit

Permalink
Clear out command line logic until API module logic is fleshed out
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jul 8, 2023
1 parent 472f75a commit 873779f
Showing 1 changed file with 14 additions and 26 deletions.
40 changes: 14 additions & 26 deletions concoction-app/src/main/java/info/mmpa/concoction/Main.java
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
package info.mmpa.concoction;

import java.io.File;
import java.io.PrintWriter;
import java.util.Map;
import java.util.concurrent.Callable;

import info.mmpa.concoction.result.ArchiveScanResults;
import info.mmpa.concoction.result.printer.HumanReadablePrinter;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Parameters;

@Command(name = "Concoction", mixinStandardHelpOptions = true, version = "Concoction v1.0.0", description = "Dynamic Shared Malware Scanner")
public class Main implements Callable<Integer> {
@Parameters(index = "0", description = "The file / directory to scan")
private File file;
import java.util.concurrent.Callable;

@Override
public Integer call() throws Exception {
Map<String, ArchiveScanResults> results = Concoction.scanDirectory(file);
@Command(name = "Concoction", mixinStandardHelpOptions = true,
version = "Concoction v" + ConcoctionBuildConfig.VERSION,
description = "Dynamic Shared Malware Scanner")
public class Main implements Callable<Integer> {

if (results.isEmpty()) {
return CommandLine.ExitCode.OK;
} else {
new HumanReadablePrinter(results).print(new PrintWriter(System.out));
return 1;
}
}
@Override
public Integer call() throws Exception {
// TODO: Reimplement once the core library API solidifies
return 0;
}

public static void main(String[] args) {
final int exitCode = new CommandLine(new Main()).execute(args);
System.exit(exitCode);
}
public static void main(String[] args) {
final int exitCode = new CommandLine(new Main()).execute(args);
System.exit(exitCode);
}
}

0 comments on commit 873779f

Please sign in to comment.