Skip to content

Commit

Permalink
Merge pull request #155 from OpticFusion1/update
Browse files Browse the repository at this point in the history
Changes
  • Loading branch information
OpticFusion1 authored Jun 13, 2019
2 parents 088aced + c861156 commit 666912a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/main/java/optic_fusion1/mcantimalware/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ private void init() {
printOnlyIfInfected = (Boolean) options.valueOf("printOnlyIfInfected");
}
}
if(!scanDirectory.exists()){
logger.alert("The scan directory '" + scanDirectory.getName() + "' doesn't exist");
System.exit(0);
}
downloadChecksumDatabase(false);
checkManager = new CheckManager(this);
new CheckRegistery(this).registerChecks();
Expand Down
18 changes: 6 additions & 12 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="optic_fusion1.mcantimalware.logging">
<Configuration status="WARN">
<Appenders>
<Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console>
<Queue name="TerminalConsole">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
</Queue>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n"/>
</Console>
<RollingRandomAccessFile name="File" fileName="AntiMalware/latest.log" filePattern="AntiMalware/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
<Policies>
Expand All @@ -16,12 +15,8 @@
</Appenders>
<Loggers>
<Root level="info">
<filters>
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
</filters>
<AppenderRef ref="WINDOWS_COMPAT" level="info"/>
<AppenderRef ref="File"/>
<AppenderRef ref="TerminalConsole" level="info"/>
<AppenderRef ref="Console"/>
</Root>
</Loggers>
<CustomLevels>
Expand All @@ -33,5 +28,4 @@
<CustomLevel name="EXCEPTION" intLevel="1200" />
<CustomLevel name="MALICIOUS" intLevel="1300" />
</CustomLevels>
</Configuration>

</Configuration>

0 comments on commit 666912a

Please sign in to comment.