-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from olgaKiseleva/master
Windows support
- Loading branch information
Showing
11 changed files
with
126 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
# | ||
__author__ = "Kir Ermakov <[email protected]>" | ||
|
||
from . import ClientApplication | ||
from app import ClientApplication | ||
import os | ||
from os import access, R_OK | ||
from common.configreader import get_full_config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,9 @@ | |
# All Rights Reserved. | ||
# | ||
__author__ = "Kir Ermakov <[email protected]>" | ||
from . import ClientApplication | ||
import re | ||
|
||
from app import ClientApplication | ||
from common import osdetect, oscommands | ||
|
||
|
||
|
@@ -51,17 +53,30 @@ def linux_scan(self, os_name, os_version, os_data): | |
package=packages) | ||
return scan_results | ||
|
||
def windows_scan(self, os_name, os_version, os_data): | ||
from common.winutils import get_windows_installed_software, get_windows_updates, get_windows_data | ||
windows_data = get_windows_data() | ||
def windows_scan(self, os_name, os_version, os_data, os_family='windows'): | ||
from common.winutils import get_windows_installed_software, get_windows_updates | ||
|
||
missing_kb, missing_updates, installed_kb, installed_updates = get_windows_updates() | ||
installed_software_list = get_windows_installed_software() | ||
|
||
software = [] | ||
for name, version in installed_software_list.items(): | ||
if re.match(r'^[\d+?.]+$', name.split()[-1]): | ||
name = ' '.join(name.split()[:-1]) | ||
software.append({ | ||
'software': name, | ||
'version': version, | ||
}) | ||
self.log.debug("Found missing KB's: %s" % missing_kb) | ||
self.log.debug("Enumerated Windows Software List: %s" % installed_software_list) | ||
|
||
return None | ||
agent_id = self.get_var('agent_id', namespace='shared') | ||
scan_results = self.vulners.agent_winaudit( | ||
agent_id=agent_id, | ||
os=os_data['osType'], | ||
os_version=os_version, | ||
software=software, | ||
kb_list=installed_kb | ||
) | ||
return scan_results | ||
|
||
def run(self): | ||
agent_id = self.get_var('agent_id', namespace='shared') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Agent version | ||
__version__ = "2.1.3" | ||
__agent_type__ = 'Vulners Agent' | ||
__version__ = "2.2.0" | ||
__agent_type__ = 'Vulners Agent' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.