Skip to content

Commit be81e47

Browse files
committed
improved output (when no API key), additional hashes for shell config files, etc...
1 parent 37b581f commit be81e47

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

AppDelegate.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//TODO: scan other volumes
1313
//TODO: support delete items
1414
//TODO: search in UI
15-
//TODO: auto-start if persisted
15+
1616

1717
/* GLOBALS */
1818

@@ -940,7 +940,8 @@ -(void)displayScanStats
940940

941941
//when VT integration is enabled
942942
// add flagged and unknown items
943-
if(YES != self.prefsWindowController.disableVTQueries)
943+
if( !self.prefsWindowController.disableVTQueries &&
944+
self.prefsWindowController.vtAPIKey.length)
944945
{
945946
//when network is down
946947
// ->add msg about not being able to query VT

Localizable.xcstrings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@
682682
}
683683
}
684684
},
685+
"VirusTotal Results: N/A (No API Key)" : {
686+
"comment" : "VirusTotal Results: N/A (No API Key)"
687+
},
685688
"VirusTotal:\r\n %lu flagged item(s)\r\n %lu unknown item(s)" : {
686689
"comment" : "VirusTotal:\r\n %lu flagged item(s)\r\n %lu unknown item(s)",
687690
"localizations" : {

Plugins/ShellConfigs.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
#import "ShellConfigs.h"
1010

1111
//plugin name
12-
#define PLUGIN_NAME @"Shell Config Files"
12+
#define PLUGIN_NAME @"Shell Configuration Files"
1313

1414
//plugin description
1515
#define PLUGIN_DESCRIPTION NSLocalizedString(@"Commands executed at shell launch", @"Commands executed at shell launch")
1616

1717
//plugin icon
1818
#define PLUGIN_ICON @"shellConfigIcon"
1919

20-
2120
@implementation ShellConfigs
2221

2322
//init

PrefsWindowController.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ -(void)windowDidLoad
5252
self.showTrustedItemsBtn.state = NSControlStateValueOn;
5353
}
5454

55-
//TODO: add start at load
56-
5755
//check if 'show trusted items' button should be selected
5856
if(YES == self.startAtLogin)
5957
{
@@ -91,13 +89,12 @@ -(void)windowDidBecomeKey:(NSNotification *)notification {
9189
}
9290

9391

94-
//TODO: splash screen
9592
//register default prefs
9693
// only used if user hasn't set any
9794
-(void)registerDefaults
9895
{
9996
//set defaults
100-
[[NSUserDefaults standardUserDefaults] registerDefaults:@{PREF_SHOW_TRUSTED_ITEMS:@NO, PREF_DISABLE_UPDATE_CHECK:@NO, PREF_DISABLE_VT_QUERIRES:@NO}];
97+
[[NSUserDefaults standardUserDefaults] registerDefaults:@{PREF_SHOW_TRUSTED_ITEMS:@NO, PREF_START_AT_LOGIN:@NO, PREF_DISABLE_UPDATE_CHECK:@NO, PREF_DISABLE_VT_QUERIRES:@YES}];
10198

10299
return;
103100
}

ResultsWindowController.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,21 @@ -(void)windowDidLoad
5656
// disabled? something else?
5757
else
5858
{
59+
//hide 'unknown items' button
60+
self.submitToVT.hidden = YES;
61+
5962
//disabled
60-
if(YES == ((AppDelegate*)[[NSApplication sharedApplication] delegate]).prefsWindowController.disableVTQueries)
63+
if(((AppDelegate*)NSApplication.sharedApplication.delegate).prefsWindowController.disableVTQueries)
6164
{
6265
self.vtDetailsLabel.stringValue = NSLocalizedString(@"VirusTotal Results: N/A (Disabled)", @"VirusTotal Results: N/A (Disabled)");
6366
}
67+
68+
//no API key
69+
else if(!((AppDelegate*)NSApplication.sharedApplication.delegate).prefsWindowController.vtAPIKey.length)
70+
{
71+
self.vtDetailsLabel.stringValue = NSLocalizedString(@"VirusTotal Results: N/A (No API Key)", @"VirusTotal Results: N/A (No API Key)");
72+
}
73+
6474
//?
6575
else
6676
{

WhiteList/whitelistedFiles.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"/etc/defaults/periodic.conf":["7beb8971f053949f6f1681a9d5204028", "62842e4978d878da44697ba81eac797c"],
2323
"/etc/rc.common":["5db454651210bcb920c010f8149d118c", "9c3ea0b6d054087fecd2013d875c336b", "28ce428faefe6168618867f3ff5527f9"],
2424
"/usr/libexec/tmp_cleaner":["33747b79a29e3462d1799c911854461c"],
25-
"/etc/zprofile":["82e0d6b73125cdc9428e1f4a39d2a5a1"],
26-
"/etc/zshrc":["8c234b3fb7e4a27f1364df17cb6b22c5"],
25+
"/etc/zprofile":["179b0fd32c80f305c2b1ab91432f4557", "82e0d6b73125cdc9428e1f4a39d2a5a1"],
26+
"/etc/zshrc":["5c21be339555680489cc7448c92acc18", "8c234b3fb7e4a27f1364df17cb6b22c5"],
2727
"/etc/bashrc":["7817a5d0c4ebbe0aa5321cf2dd1dcc0b"],
2828
"/etc/profile":["3a3febb29e55ee975098903a31f8022a"],
2929
"~/.zprofile":["e37b9b95873a94bf9b5c4566fe3a94c5"]

0 commit comments

Comments
 (0)