added vmmanager and USBEventSvc
authormb
Tue, 03 Dec 2013 18:04:46 +0100
changeset 7903480cebdfb
parent 6 088f4b20dbbc
child 8 616dca19f52c
added vmmanager and USBEventSvc
server/opensecurityd.py
server/opensecurityd.pyc
server/vmmanager/PKG-INFO
server/vmmanager/__init__.py
server/vmmanager/__init__.pyc
server/vmmanager/vmmanager.py
server/vmmanager/vmmanager.pyc
server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.Build.CppClean.log
server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.log
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.cpp
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.h
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.ico
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.rc
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.filters
server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.user
server/windows/USBEventSvc/OpenSecUSBEventSvc/ReadMe.txt
server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.Build.CppClean.log
server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.log
server/windows/USBEventSvc/OpenSecUSBEventSvc/Resource.h
server/windows/USBEventSvc/OpenSecUSBEventSvc/small.ico
server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.cpp
server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.h
server/windows/USBEventSvc/OpenSecUSBEventSvc/targetver.h
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Build.txt
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.Build.CppClean.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.lastbuildstate
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/MSG00409.bin
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.h
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.mc
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.reg
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.sdf
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.filters
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.user
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/ReadMe.txt
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.Build.CppClean.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/dllmain.cpp
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.cpp
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.h
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/targetver.h
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.dll
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.read.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.write.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/OpenSecMgrLog.lastbuildstate
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/cl.command.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.command.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.read.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.write.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.read.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.write.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/OpenSecUSBEventSvcLog.lastbuildstate
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/cl.command.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.command.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.read.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.write.1.tlog
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.dll
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.ilk
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pch
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pdb
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/dllmain.obj
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/stdafx.obj
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.idb
server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.pdb
server/windows/USBEventSvc/Release/OpenSecUSBEventSvcLog.dll
server/windows/USBEventSvc/USBEventSvc.opensdf
server/windows/USBEventSvc/USBEventSvc.sdf
server/windows/USBEventSvc/USBEventSvc.sln
server/windows/USBEventSvc/USBEventSvc.v12.suo
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/server/opensecurityd.py	Tue Dec 03 18:04:46 2013 +0100
     1.3 @@ -0,0 +1,190 @@
     1.4 +#!/bin/env python
     1.5 +# -*- coding: utf-8 -*-
     1.6 +
     1.7 +# ------------------------------------------------------------
     1.8 +# opensecurityd
     1.9 +# 
    1.10 +# the opensecurityd as RESTful server
    1.11 +#
    1.12 +# Autor: Oliver Maurhart, <oliver.maurhart@ait.ac.at>
    1.13 +#
    1.14 +# Copyright (C) 2013 AIT Austrian Institute of Technology
    1.15 +# AIT Austrian Institute of Technology GmbH
    1.16 +# Donau-City-Strasse 1 | 1220 Vienna | Austria
    1.17 +# http://www.ait.ac.at
    1.18 +#
    1.19 +# This program is free software; you can redistribute it and/or
    1.20 +# modify it under the terms of the GNU General Public License
    1.21 +# as published by the Free Software Foundation version 2.
    1.22 +# 
    1.23 +# This program is distributed in the hope that it will be useful,
    1.24 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.25 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.26 +# GNU General Public License for more details.
    1.27 +# 
    1.28 +# You should have received a copy of the GNU General Public License
    1.29 +# along with this program; if not, write to the Free Software
    1.30 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, 
    1.31 +# Boston, MA  02110-1301, USA.
    1.32 +# ------------------------------------------------------------
    1.33 +
    1.34 +
    1.35 +# ------------------------------------------------------------
    1.36 +# imports
    1.37 +
    1.38 +import os
    1.39 +import os.path
    1.40 +import subprocess
    1.41 +import sys
    1.42 +import web
    1.43 +from vmmanager.vmmanager import VMManager
    1.44 +
    1.45 +# local
    1.46 +from environment import Environment
    1.47 +
    1.48 +
    1.49 +# ------------------------------------------------------------
    1.50 +# const
    1.51 +
    1.52 +__version__ = "0.1"
    1.53 +
    1.54 +
    1.55 +"""All the URLs we know mapping to class handler"""
    1.56 +opensecurity_urls = (
    1.57 +    '/device_change',           'os_device_change',
    1.58 +    '/application',             'os_application',
    1.59 +    '/device',                  'os_device',
    1.60 +    '/device/credentials',      'os_device_credentials',
    1.61 +    '/device/password',         'os_device_password',
    1.62 +    '/',                        'os_root'
    1.63 +)
    1.64 +
    1.65 +
    1.66 +# ------------------------------------------------------------
    1.67 +# code
    1.68 +
    1.69 +gvm_mgr = VMManager()
    1.70 +
    1.71 +
    1.72 +class os_application:
    1.73 +    
    1.74 +    """OpenSecurity '/application' handler.
    1.75 +    
    1.76 +    This is called on GET /application?vm=VM-ID&app=APP-ID
    1.77 +    This tries to access the vm identified with the label VM-ID
    1.78 +    and launched the application identified APP-ID
    1.79 +    """
    1.80 +    
    1.81 +    def GET(self):
    1.82 +        
    1.83 +        # pick the arguments
    1.84 +        args = web.input()
    1.85 +        
    1.86 +        # we _need_ a vm
    1.87 +        if not "vm" in args:
    1.88 +            raise web.badrequest()
    1.89 +        
    1.90 +        # we _need_ a app
    1.91 +        if not "app" in args:
    1.92 +            raise web.badrequest()
    1.93 +        
    1.94 +        ## TODO: HARD CODED STUFF HERE! THIS SHOULD BE FLEXIBLE!
    1.95 +        ssh_private_key = os.path.join(Environment("opensecurity").data_path, 'share', '192.168.56.15.ppk')
    1.96 +        putty_session = '192.168.56.15'
    1.97 +        process_command = ['plink.exe', '-i', ssh_private_key, putty_session, args.app]
    1.98 +        si = subprocess.STARTUPINFO()
    1.99 +        si.dwFlags = subprocess.STARTF_USESHOWWINDOW
   1.100 +        si.wShowWindow = subprocess.SW_HIDE
   1.101 +        print('tyring to launch: ' + ' '.join(process_command))
   1.102 +        process = subprocess.Popen(process_command, shell = True)
   1.103 +        return 'launched: ' + ' '.join(process_command)
   1.104 +
   1.105 +class os_device:
   1.106 +    
   1.107 +    """OpenSecurity '/device' handler"""
   1.108 +    
   1.109 +    def GET(self):
   1.110 +        return "os_device"
   1.111 +
   1.112 +class os_device_change:
   1.113 +    
   1.114 +    """OpenSecurity '/device_change' handler"""
   1.115 +    
   1.116 +    def GET(self):
   1.117 +        gvm_mgr.cygwin_path = 'c:\\cygwin64\\bin\\'
   1.118 +        #gvm_mgr.configureHostNetworking()
   1.119 +        print 'received device_change'
   1.120 +        return "os_device_change"
   1.121 +
   1.122 +
   1.123 +class os_device_credentials:
   1.124 +    
   1.125 +    """OpenSecurity '/device/credentials' handler.
   1.126 +    
   1.127 +    This is called on GET /device/credentials?id=DEVICE-ID.
   1.128 +    Ideally this should pop up a user dialog to insert his
   1.129 +    credentials based the DEVICE-ID
   1.130 +    """
   1.131 +    
   1.132 +    def GET(self):
   1.133 +        
   1.134 +        # pick the arguments
   1.135 +        args = web.input()
   1.136 +        
   1.137 +        # we _need_ a device id
   1.138 +        if not "id" in args:
   1.139 +            raise web.badrequest()
   1.140 +        
   1.141 +        # invoke the user dialog as a subprocess
   1.142 +        dlg_credentials_image = os.path.join(sys.path[0], 'opensecurity-dialog.py')
   1.143 +        process_command = [sys.executable, dlg_credentials_image, 'credentials', 'Please provide credentials for accessing \ndevice: "{0}".'.format(args.id)]
   1.144 +        process = subprocess.Popen(process_command, shell = False, stdout = subprocess.PIPE)
   1.145 +        result = process.communicate()[0]
   1.146 +        if process.returncode != 0:
   1.147 +            return 'Credentials request has been aborted.'
   1.148 +        
   1.149 +        return result
   1.150 +
   1.151 +
   1.152 +class os_device_password:
   1.153 +    
   1.154 +    """OpenSecurity '/device/password' handler.
   1.155 +    
   1.156 +    This is called on GET /device/password?id=DEVICE-ID.
   1.157 +    Ideally this should pop up a user dialog to insert his
   1.158 +    password based the DEVICE-ID
   1.159 +    """
   1.160 +    
   1.161 +    def GET(self):
   1.162 +        
   1.163 +        # pick the arguments
   1.164 +        args = web.input()
   1.165 +        
   1.166 +        # we _need_ a device id
   1.167 +        if not "id" in args:
   1.168 +            raise web.badrequest()
   1.169 +            
   1.170 +        # invoke the user dialog as a subprocess
   1.171 +        dlg_credentials_image = os.path.join(sys.path[0], 'opensecurity-dialog.py')
   1.172 +        process_command = [sys.executable, dlg_credentials_image, 'password', 'Please provide a password for accessing \ndevice: "{0}".'.format(args.id)]
   1.173 +        process = subprocess.Popen(process_command, shell = False, stdout = subprocess.PIPE)
   1.174 +        result = process.communicate()[0]
   1.175 +        if process.returncode != 0:
   1.176 +            return 'Credentials request has been aborted.'
   1.177 +        
   1.178 +        return result
   1.179 +
   1.180 +
   1.181 +class os_root:
   1.182 +    
   1.183 +    """OpenSecurity '/' handler"""
   1.184 +    
   1.185 +    def GET(self):
   1.186 +        return "OpenSecurity-Server { \"version\": \"%s\" }" % __version__
   1.187 +
   1.188 +
   1.189 +# start
   1.190 +if __name__ == "__main__":
   1.191 +    server = web.application(opensecurity_urls, globals())
   1.192 +    server.run()
   1.193 +
     2.1 Binary file server/opensecurityd.pyc has changed
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/server/vmmanager/PKG-INFO	Tue Dec 03 18:04:46 2013 +0100
     3.3 @@ -0,0 +1,10 @@
     3.4 +Metadata-Version: 1.0
     3.5 +Name: vmmanager.py
     3.6 +Version: 0.1
     3.7 +Summary: vmmanager.py: manages GustVM's
     3.8 +Home-page:  http://webpy.org/
     3.9 +Author: Mihai Bartha
    3.10 +Author-email: mihai.bartha@ait.ac.at
    3.11 +License: Public domain
    3.12 +Description: Module to manage virtualbox guests and host
    3.13 +Platform: any
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/server/vmmanager/__init__.py	Tue Dec 03 18:04:46 2013 +0100
     4.3 @@ -0,0 +1,6 @@
     4.4 +__version__ = "0.1"
     4.5 +__author__ = [
     4.6 +    "Mihai Bartha <mihai.bartha@ait.ac.at>"
     4.7 +]
     4.8 +__license__ = "public domain"
     4.9 +__contributors__ = "OpenSecurity Consortium"
    4.10 \ No newline at end of file
     5.1 Binary file server/vmmanager/__init__.pyc has changed
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/server/vmmanager/vmmanager.py	Tue Dec 03 18:04:46 2013 +0100
     6.3 @@ -0,0 +1,299 @@
     6.4 +'''
     6.5 +Created on Nov 19, 2013
     6.6 +
     6.7 +@author: BarthaM
     6.8 +'''
     6.9 +import os
    6.10 +import os.path
    6.11 +from subprocess import Popen, PIPE, call
    6.12 +import subprocess
    6.13 +import sys
    6.14 +import re
    6.15 +
    6.16 +DEBUG = True
    6.17 +
    6.18 +class USBFilter:
    6.19 +    vendorid = ""
    6.20 +    productid = ""
    6.21 +    revision = ""
    6.22 +    
    6.23 +    def __init__(self, vendorid, productid, revision):
    6.24 +        self.vendorid = vendorid.lower()
    6.25 +        self.productid = productid.lower()
    6.26 +        self.revision = revision.lower()
    6.27 +        return
    6.28 +    
    6.29 +    def __eq__(self, other):
    6.30 +        return self.vendorid == other.vendorid and self.productid == other.productid and self.revision == other.revision
    6.31 +    
    6.32 +    def __hash__(self):
    6.33 +        return hash(self.vendorid) ^ hash(self.productid) ^ hash(self.revision)
    6.34 +    
    6.35 +    def __repr__(self):
    6.36 +        return "VendorId = \'" + str(self.vendorid) + "\' ProductId = \'" + str(self.productid) + "\' Revision = \'" + str(self.revision) + "\'"
    6.37 +        
    6.38 +
    6.39 +class VMManager(object):
    6.40 +    vmRootName = "SecurityDVM"
    6.41 +    systemProperties = None
    6.42 +    cygwin_path = 'c:\\cygwin64\\bin\\'
    6.43 +    
    6.44 +    def __init__(self):
    6.45 +        self.systemProperties = self.getSystemProperties()
    6.46 +        #TODO: get cygwin path externally
    6.47 +        return
    6.48 +         
    6.49 +    def execute(self, cmd):
    6.50 +        if DEBUG:
    6.51 +            print('trying to launch: ' + cmd)
    6.52 +        process = Popen(cmd, stdout=PIPE, stderr=PIPE)
    6.53 +        if DEBUG:
    6.54 +            print('launched: ' + cmd)
    6.55 +        result = process.wait()
    6.56 +        res_stdout = process.stdout.read();
    6.57 +        res_stderr = process.stderr.read();
    6.58 +        if DEBUG:
    6.59 +            if res_stdout != "":
    6.60 +                print res_stdout
    6.61 +            if res_stderr != "":
    6.62 +                print res_stderr
    6.63 +        return result, res_stdout, res_stderr
    6.64 +    
    6.65 +    def getSystemProperties(self):
    6.66 +        cmd = 'VBoxManage list systemproperties'
    6.67 +        result = self.execute(cmd)
    6.68 +        if result[1]=='':
    6.69 +            return None
    6.70 +        props = dict((k.strip(),v.strip().strip('"')) for k,v in (line.split(':', 1) for line in result[1].strip().splitlines()))
    6.71 +        return props
    6.72 +        
    6.73 +    def getDefaultMachineFolder(self):
    6.74 +        return self.systemProperties["Default machine folder"]
    6.75 +    
    6.76 +    def createVM(self, vm_name):
    6.77 +        hostonly_if = self.getHostOnlyIFs()
    6.78 +        cmd = 'VBoxManage createvm --name ' + vm_name, ' --ostype Debian --register'
    6.79 +        self.execute(cmd)
    6.80 +        cmd = 'VBoxManage modifyvm ' + vm_name + ' --memory 512 --vram 10 --cpus 1 --usb on --usbehci on --nic1 hostonly --hostonlyadapter1 ' + hostonly_if['Name'] + ' --nic2 nat' 
    6.81 +        self.execute(cmd)
    6.82 +        cmd = 'VBoxManage storagectl ' + vm_name + ' --name contr1 --add sata --sataportcount 2'
    6.83 +        self.execute(cmd)
    6.84 +        cmd = 'VBoxManage storageattach ' + vm_name + ' --storagectl contr1 --port 0 --device 0 --type hdd --mtype normal --medium C:\Users\BarthaM\VirtualBox VMs\SecurityVM\SecurityVM.vdi'
    6.85 +        self.execute(cmd)
    6.86 +        return
    6.87 +    
    6.88 +    def attachRSD(self, vm_name, filter):
    6.89 +        cmd = 'VBoxManage usbfilter add 0 --target ' + vm_name + ' --name OpenSecurityRSD --vendorid ' + filter.vendorid + ' --productid ' + filter.productid + ' --revision ' + filter.revision
    6.90 +        print self.execute(cmd)
    6.91 +        
    6.92 +    def removeVM(self, vm_name):
    6.93 +        print('removing ' + vm_name)
    6.94 +        cmd = 'VBoxManage unregistervm', vm_name, '--delete'
    6.95 +        print self.execute(cmd)
    6.96 +        machineFolder = self.getDefaultMachineFolder()
    6.97 +        cmd = self.cygwin_path+'bash.exe --login -c \"rm -rf ' + machineFolder + '\\' + vm_name + '*\"'
    6.98 +        print self.execute(cmd)
    6.99 +    
   6.100 +    def startVM(self, vm_name):
   6.101 +        print('starting ' +  vm_name)
   6.102 +        cmd = 'VBoxManage startvm ' + vm_name + ' --type headless'
   6.103 +        print self.execute(cmd)
   6.104 +        
   6.105 +    def stopVM(self, vm_name):
   6.106 +        print('stopping ' + vm_name)
   6.107 +        cmd = 'VBoxManage controlvm ' + vm_name + ' poweroff'
   6.108 +        print self.execute(cmd)
   6.109 +    
   6.110 +    def getHostOnlyIFs(self):
   6.111 +        cmd = ['VBoxManage list hostonlyifs']
   6.112 +        result = self.execute(cmd)
   6.113 +        if result=='':
   6.114 +            return None
   6.115 +        props = dict((k.strip(),v.strip().strip('"')) for k,v in (line.split(':', 1) for line in result.strip().splitlines()))
   6.116 +        return props
   6.117 +        
   6.118 +    def getHostOnlyIP(self, vm_name):
   6.119 +        print('gettting hostOnly IP address ' + vm_name)
   6.120 +        cmd = 'VBoxManage guestproperty get ' + vm_name + ' /VirtualBox/GuestInfo/Net/0/V4/IP'
   6.121 +        result = self.execute(cmd)
   6.122 +        if result=='':
   6.123 +            return None
   6.124 +        result = result[1]
   6.125 +        return result[result.index(':')+1:].strip()
   6.126 +        
   6.127 +    def listRSDS(self):
   6.128 +        cmd = 'VBoxManage list usbhost'
   6.129 +        results = self.execute(cmd)
   6.130 +        results = results.split('Host USB Devices:')[1].strip()
   6.131 +        
   6.132 +        items = list( "UUID:"+result for result in results.split('UUID:') if result != '')
   6.133 +        rsds = dict()   
   6.134 +        for item in items:
   6.135 +            props = dict()
   6.136 +            for line in item.splitlines():
   6.137 +                if line != "":         
   6.138 +                    k,v = line[:line.index(':')].strip(), line[line.index(':')+1:].strip()
   6.139 +                    props[k] = v;
   6.140 +            
   6.141 +            if 'Product' in props.keys() and props['Product'] == 'Mass Storage':
   6.142 +                usb_filter = USBFilter( re.search(r"\((?P<vid>[0-9A-Fa-f]+)\)", props['VendorId']).groupdict()['vid'], 
   6.143 +                                        re.search(r"\((?P<pid>[0-9A-Fa-f]+)\)", props['ProductId']).groupdict()['pid'],
   6.144 +                                        re.search(r"\((?P<rev>[0-9A-Fa-f]+)\)", props['Revision']).groupdict()['rev'] )
   6.145 +                rsds[props['UUID']] = usb_filter;
   6.146 +                if DEBUG:
   6.147 +                    print filter
   6.148 +        return rsds
   6.149 +
   6.150 +    def listVM(self):
   6.151 +        cmd = 'VBoxManage list vms'
   6.152 +        result = self.execute(cmd)
   6.153 +        vms = list(k.strip().strip('"') for k,_ in (line.split(' ') for line in result.splitlines()))
   6.154 +        return vms
   6.155 +    
   6.156 +    def listSDVM(self):
   6.157 +        vms = self.listVM()
   6.158 +        svdms = []
   6.159 +        for vm in vms:
   6.160 +            if vm.startswith(self.vmRootName) and vm != self.vmRootName:
   6.161 +                svdms.append(vm)
   6.162 +        return svdms
   6.163 +    
   6.164 +    def generateSDVMName(self):
   6.165 +        vms = self.listVM()
   6.166 +        for i in range(0,999):
   6.167 +            if(not self.vmRootName+str(i) in vms):
   6.168 +                return self.vmRootName+str(i)
   6.169 +        return ''
   6.170 +    
   6.171 +    def getVMInfo(self, vm_name):
   6.172 +        cmd = 'VBoxManage showvminfo ' + vm_name + ' --machinereadable'
   6.173 +        results = self.execute(cmd)
   6.174 +        props = dict((k.strip(),v.strip().strip('"')) for k,v in (line.split('=', 1) for line in results.splitlines()))
   6.175 +        return props
   6.176 +    
   6.177 +    def getUSBFilter(self, vm_name):
   6.178 +        props = self.getVMInfo(vm_name)
   6.179 +        keys = set(['USBFilterVendorId1', 'USBFilterProductId1', 'USBFilterRevision1'])
   6.180 +        keyset = set(props.keys())
   6.181 +        usb_filter = None
   6.182 +        if keyset.issuperset(keys):
   6.183 +            usb_filter = USBFilter(props['USBFilterVendorId1'], props['USBFilterProductId1'], props['USBFilterRevision1'])
   6.184 +        return usb_filter
   6.185 +    
   6.186 +    def getAttachedRSDs(self):
   6.187 +        vms = self.listSDVM()
   6.188 +        attached_devices = dict()
   6.189 +        for vm in vms:
   6.190 +            filter = self.getUSBFilter(vm)
   6.191 +            if filter != None:
   6.192 +                attached_devices[vm] = filter
   6.193 +        return attached_devices
   6.194 +    
   6.195 +    #generates ISO containing authorized_keys for use with guest VM
   6.196 +    def genCertificateISO(self, vm_name):
   6.197 +        machineFolder = self.getDefaultMachineFolder()
   6.198 +        # create .ssh folder in vm_name
   6.199 +        cmd = self.cygwin_path+'bash.exe --login -c \"mkdir -p \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\\"\"'
   6.200 +        result = self.execute(cmd)
   6.201 +        # generate dvm_key pair in vm_name / .ssh     
   6.202 +        cmd = self.cygwin_path+'bash.exe --login -c \"ssh-keygen -q -t rsa -N \\"\\" -C \\\"' + vm_name + '\\\" -f \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\dvm_key\\\"\"'   #'echo -e "y\\n" |',
   6.203 +        result = self.execute(cmd)
   6.204 +        # set permissions for keys
   6.205 +        #TODO: test without chmod
   6.206 +        cmd = self.cygwin_path+'bash.exe --login -c \"chmod 500 \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\*\\\"\"'
   6.207 +        result = self.execute(cmd)
   6.208 +        # move out private key
   6.209 +        cmd = self.cygwin_path+'bash.exe --login -c \"mv \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\dvm_key\\\" \\\"' + machineFolder + '\\' + vm_name + '\\\"'
   6.210 +        result = self.execute(cmd)
   6.211 +        # rename public key to authorized_keys
   6.212 +        cmd = self.cygwin_path+'bash.exe --login -c \"mv \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\dvm_key.pub\\\" \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\authorized_keys\\\"'
   6.213 +        result = self.execute(cmd)
   6.214 +        # generate iso image with .ssh/authorized keys
   6.215 +        cmd = self.cygwin_path+'bash.exe --login -c \"/usr/bin/genisoimage -J -R -o \\\"' + machineFolder + '\\' + vm_name + '\\'+ vm_name + '.iso\\\" \\\"' + machineFolder + '\\' + vm_name + '\\.ssh\\\"\"'
   6.216 +        result = self.execute(cmd)
   6.217 +    
   6.218 +    # attaches generated ssh public cert to guest vm
   6.219 +    def attachCertificateISO(self, vm_name):
   6.220 +        machineFolder = self.getDefaultMachineFolder()
   6.221 +        cmd = 'vboxmanage storageattach ' + vm_name + ' --storagectl contr1 --port 1 --device 0 --type dvddrive --mtype readonly --medium \"' + machineFolder + '\\' + vm_name + '\\'+ vm_name + '.iso\"'
   6.222 +        result = self.execute(cmd)
   6.223 +        return result
   6.224 +    
   6.225 +    # handles device change events
   6.226 +    def handleDeviceChange(self):
   6.227 +        attached_devices = self.getAttachedRSDs()
   6.228 +        connected_devices = self.listRSDS()
   6.229 +        for vm_name in attached_devices.keys():
   6.230 +            if attached_devices[vm_name] not in connected_devices.values():
   6.231 +                self.stopVM(vm_name)
   6.232 +                self.removeVM(vm_name)
   6.233 +        
   6.234 +        attached_devices = self.getAttachedRSDs()
   6.235 +        for connected_device in connected_devices.values():
   6.236 +            if connected_device not in attached_devices.values():
   6.237 +                new_sdvm = self.generateSDVMName()
   6.238 +                self.createVM(new_sdvm)
   6.239 +                self.genCertificateISO(new_sdvm)
   6.240 +                self.attachCertificateISO(new_sdvm)
   6.241 +                self.attachRSD(new_sdvm, connected_device)
   6.242 +                self.startVM(new_sdvm)
   6.243 +    
   6.244 +    # executes command over ssh on guest vm
   6.245 +    def sshGuestExecute(self, vm_name, prog):
   6.246 +        # get vm ip
   6.247 +        address = self.getHostOnlyIP(vm_name)
   6.248 +        machineFolder = self.getDefaultMachineFolder()
   6.249 +        # run command
   6.250 +        cmd = self.cygwin_path+'bash.exe --login -c \"ssh -i \\\"' + machineFolder + '\\' + vm_name + '\\dvm_key\\\"  bartham@' + address + ' ' + prog + '\"'
   6.251 +        return self.execute(cmd)
   6.252 +    
   6.253 +    # executes command over ssh on guest vm with X forwarding
   6.254 +    def sshGuestX11Execute(self, vm_name, prog):
   6.255 +        #TODO: verify if X server is running on user account 
   6.256 +        #TODO: set DISPLAY accordingly
   6.257 +        address = self.getHostOnlyIP(vm_name)
   6.258 +        machineFolder = self.getDefaultMachineFolder()
   6.259 +        # run command
   6.260 +        cmd = self.cygwin_path+'bash.exe --login -c \"DISPLAY=:0 ssh -Y -i \\\"' + machineFolder + '\\' + vm_name + '\\dvm_key\\\"  bartham@' + address + ' ' + prog + '\"'
   6.261 +        return self.execute(cmd)    
   6.262 +    
   6.263 +    # configures hostonly networking and DHCP server
   6.264 +    # requires admin rights
   6.265 +    def configureHostNetworking(self):
   6.266 +        #cmd = 'vboxmanage list hostonlyifs'
   6.267 +        #self.execute(cmd)
   6.268 +        #cmd = 'vboxmanage hostonlyif remove \"VirtualBox Host-Only Ethernet Adapter\"'
   6.269 +        #self.execute(cmd)
   6.270 +        #cmd = 'vboxmanage hostonlyif create'
   6.271 +        #self.execute(cmd)
   6.272 +        cmd = 'vboxmanage hostonlyif ipconfig \"VirtualBox Host-Only Ethernet Adapter\" --ip 192.168.56.1 --netmask 255.255.255.0'
   6.273 +        self.execute(cmd)
   6.274 +        #cmd = 'vboxmanage dhcpserver add'
   6.275 +        #self.execute(cmd)
   6.276 +        cmd = 'vboxmanage dhcpserver modify --ifname \"VirtualBox Host-Only Ethernet Adapter\" --ip 192.168.56.1 --netmask 255.255.255.0 --lowerip 192.168.56.100 --upperip 192.168.56.255'
   6.277 +        self.execute(cmd)
   6.278 +        
   6.279 +    # executes NET USE and connects to samba share on guestos 
   6.280 +    def netUse(self, vm_name):
   6.281 +        ip = self.getHostOnlyIP(vm_name)
   6.282 +        cmd = 'net use H: \\' + ip + '\RSD_Device'
   6.283 +        return self.execute(cmd)
   6.284 +        
   6.285 +    
   6.286 +if __name__ == '__main__':
   6.287 +    man = VMManager()
   6.288 +    man.cygwin_path = 'c:\\cygwin64\\bin\\'
   6.289 +    #man.handleDeviceChange()
   6.290 +    #print man.listSDVM()
   6.291 +    man.configureHostNetworking()
   6.292 +    vm_name = "SecurityDVM0"
   6.293 +    man.genCertificateISO(vm_name)
   6.294 +    #man.attachCertificateISO(vm_name)
   6.295 +    #man.sshGuestExecute(vm_name, "ls")
   6.296 +    #man.sshGuestX11Execute(vm_name, "iceweasel")
   6.297 +    #cmd = "c:\\cygwin64\\bin\\bash.exe --login -c \"/bin/ls\""
   6.298 +    #man.execute(cmd)
   6.299 +    
   6.300 +    
   6.301 +
   6.302 +    
     7.1 Binary file server/vmmanager/vmmanager.pyc has changed
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.Build.CppClean.log	Tue Dec 03 18:04:46 2013 +0100
     8.3 @@ -0,0 +1,14 @@
     8.4 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecusbeventsvc.pch
     8.5 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\vc120.pdb
     8.6 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\vc120.idb
     8.7 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\stdafx.obj
     8.8 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecusbeventsvc.obj
     8.9 +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvc.ilk
    8.10 +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvc.exe
    8.11 +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvc.pdb
    8.12 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\cl.command.1.tlog
    8.13 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\cl.read.1.tlog
    8.14 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\cl.write.1.tlog
    8.15 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\link.command.1.tlog
    8.16 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\link.read.1.tlog
    8.17 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\debug\opensecu.b54f4a89.tlog\link.write.1.tlog
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Debug/OpenSecUSBEventSvc.log	Tue Dec 03 18:04:46 2013 +0100
     9.3 @@ -0,0 +1,5 @@
     9.4 +Build started 12/3/2013 6:03:54 PM.
     9.5 +
     9.6 +Build succeeded.
     9.7 +
     9.8 +Time Elapsed 00:00:00.03
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.cpp	Tue Dec 03 18:04:46 2013 +0100
    10.3 @@ -0,0 +1,399 @@
    10.4 +#include <InitGuid.h>
    10.5 +#include <Windows.h>
    10.6 +#include <SetupApi.h>
    10.7 +
    10.8 +#include <tchar.h>
    10.9 +#include <strsafe.h>
   10.10 +#include <dbt.h>
   10.11 +#include <usbiodef.h>
   10.12 +#include <Winhttp.h>
   10.13 +#include "OpenSecUSBEventSvcLog.h"
   10.14 +
   10.15 +#pragma comment(lib, "advapi32.lib")
   10.16 +
   10.17 +#define SVCNAME TEXT("OpenSecUSBEventSvc")
   10.18 +
   10.19 +//sc create "USBEventSvc" binPath= "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\USBEventSvc\Debug\USBEventSvc.exe"
   10.20 +//sc delete "USBEventSvc"
   10.21 +
   10.22 +// USB Raw Device Interface Class GUID
   10.23 +//{ 0xa5dcbf10, 0x6530, 0x11d2, { 0x90, 0x1f, 0x00, 0xc0, 0x4f, 0xb9, 0x51,0xed } }
   10.24 +// Disk Device Interface Class GUID
   10.25 +//{ 0x53f56307, 0xb6bf, 0x11d0, { 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b } }
   10.26 +
   10.27 +// This GUID is for all USB serial host PnP drivers
   10.28 +//GUID WceusbshGUID = { 0x25dbce51, 0x6c8f, 0x4a72, 0x8a, 0x6d, 0xb5, 0x4c, 0x2b, 0x4f, 0xc8, 0x35 };
   10.29 +
   10.30 +GUID WceusbshGUID = { 0x88bae032, 0x5a81, 0x49f0, 0xbc, 0x3d, 0xa4, 0xff, 0x13, 0x82, 0x16, 0xd6 };
   10.31 +//DEFINE_GUID(GUID_CLASS_STORAGE_VOLUME, 0x53F5630DL, 0xB6BF, 0x11D0, 0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B);
   10.32 +
   10.33 +
   10.34 +SERVICE_STATUS          gSvcStatus;
   10.35 +SERVICE_STATUS_HANDLE   gSvcStatusHandle = NULL;
   10.36 +HANDLE                  ghSvcStopEvent = NULL;
   10.37 +HDEVNOTIFY				ghDeviceNotify;
   10.38 +
   10.39 +DWORD WINAPI ServiceWorkerThread(LPVOID lpParam);
   10.40 +
   10.41 +VOID SvcInstall(void);
   10.42 +VOID WINAPI SvcCtrlHandler(DWORD);
   10.43 +VOID WINAPI SvcMain(DWORD, LPTSTR *);
   10.44 +
   10.45 +VOID ReportSvcStatus(DWORD, DWORD, DWORD);
   10.46 +VOID SvcInit(DWORD, LPTSTR *);
   10.47 +VOID SvcReportEvent(WORD, LPTSTR);
   10.48 +
   10.49 +
   10.50 +// DoRegisterDeviceInterfaceToHwnd
   10.51 +//     Registers an HWND for notification of changes in the device interfaces
   10.52 +//     for the specified interface class GUID. 
   10.53 +// Parameters:
   10.54 +//     InterfaceClassGuid - The interface class GUID for the device 
   10.55 +//         interfaces. 
   10.56 +//     hWnd - Window handle to receive notifications.
   10.57 +//     hDeviceNotify - Receives the device notification handle. On failure, 
   10.58 +//         this value is NULL.
   10.59 +// Return Value:
   10.60 +//     If the function succeeds, the return value is TRUE.
   10.61 +//     If the function fails, the return value is FALSE.
   10.62 +// Note:
   10.63 +//     RegisterDeviceNotification also allows a service handle be used,
   10.64 +//     so a similar wrapper function to this one supporting that scenario
   10.65 +//     could be made from this template.
   10.66 +
   10.67 +BOOL DoRegisterDeviceInterfaceToHwnd(void) {
   10.68 +	DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;
   10.69 +	ZeroMemory(&NotificationFilter, sizeof (NotificationFilter));
   10.70 +	NotificationFilter.dbcc_size = sizeof (DEV_BROADCAST_DEVICEINTERFACE);
   10.71 +	NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
   10.72 +	NotificationFilter.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE;
   10.73 +	memcpy(&(NotificationFilter.dbcc_classguid), &(GUID_DEVINTERFACE_USB_DEVICE), sizeof(struct _GUID));
   10.74 +
   10.75 +	ghDeviceNotify = RegisterDeviceNotification(gSvcStatusHandle,
   10.76 +		&NotificationFilter, 
   10.77 +		DEVICE_NOTIFY_SERVICE_HANDLE | DEVICE_NOTIFY_ALL_INTERFACE_CLASSES);
   10.78 +
   10.79 +	if (NULL == ghDeviceNotify) {
   10.80 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, _T("RegisterDeviceNotification failed!"));
   10.81 +		return FALSE;
   10.82 +	}
   10.83 +	return TRUE;
   10.84 +}
   10.85 +
   10.86 +//
   10.87 +// Purpose: 
   10.88 +//   Entry point for the process
   10.89 +//
   10.90 +// Parameters:
   10.91 +//   None
   10.92 +// 
   10.93 +// Return value:
   10.94 +//   None
   10.95 +//
   10.96 +void __cdecl _tmain(int argc, TCHAR *argv[]) {
   10.97 +	// If command-line parameter is "install", install the service. 
   10.98 +	// Otherwise, the service is probably being started by the SCM.
   10.99 +	if (lstrcmpi(argv[1], TEXT("install")) == 0){
  10.100 +		SvcInstall();
  10.101 +		return;
  10.102 +	}
  10.103 +
  10.104 +	// TO_DO: Add any additional services for the process to this table.
  10.105 +	SERVICE_TABLE_ENTRY DispatchTable[] = {
  10.106 +		{ SVCNAME, (LPSERVICE_MAIN_FUNCTION)SvcMain },
  10.107 +		{ NULL, NULL }
  10.108 +	};
  10.109 +
  10.110 +	// This call returns when the service has stopped. 
  10.111 +	// The process should simply terminate when the call returns.
  10.112 +	if (!StartServiceCtrlDispatcher(DispatchTable)) {
  10.113 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("StartServiceCtrlDispatcher"));
  10.114 +	}
  10.115 +}
  10.116 +
  10.117 +// Purpose: 
  10.118 +//   Installs a service in the SCM database
  10.119 +//
  10.120 +// Parameters:
  10.121 +//   None
  10.122 +// 
  10.123 +// Return value:
  10.124 +//   None
  10.125 +//
  10.126 +VOID SvcInstall() {
  10.127 +	SC_HANDLE schSCManager;
  10.128 +	SC_HANDLE schService;
  10.129 +	TCHAR szPath[MAX_PATH];
  10.130 +
  10.131 +	if (!GetModuleFileName(NULL, szPath, MAX_PATH)) {
  10.132 +		printf("Cannot install service (%d)\n", GetLastError());
  10.133 +		return;
  10.134 +	}
  10.135 +
  10.136 +	// Get a handle to the SCM database. local computer, ServicesActive database, full access rights 
  10.137 +	schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
  10.138 +	if (NULL == schSCManager) {
  10.139 +		printf("Open SCManager failed (%d)\n", GetLastError());
  10.140 +		return;
  10.141 +	}
  10.142 +
  10.143 +	// Create the service
  10.144 +	schService = CreateService(
  10.145 +		schSCManager,              // SCM database 
  10.146 +		SVCNAME,                   // name of service 
  10.147 +		SVCNAME,                   // service name to display 
  10.148 +		SERVICE_ALL_ACCESS,        // desired access 
  10.149 +		SERVICE_WIN32_OWN_PROCESS, // service type 
  10.150 +		SERVICE_DEMAND_START,      // start type 
  10.151 +		SERVICE_ERROR_NORMAL,      // error control type 
  10.152 +		szPath,                    // path to service's binary 
  10.153 +		NULL,                      // no load ordering group 
  10.154 +		NULL,                      // no tag identifier 
  10.155 +		NULL,                      // no dependencies 
  10.156 +		NULL,                      // LocalSystem account 
  10.157 +		NULL);                     // no password 
  10.158 +
  10.159 +	if (schService == NULL) {
  10.160 +		printf("CreateService failed (%d)\n", GetLastError());
  10.161 +		CloseServiceHandle(schSCManager);
  10.162 +		return;
  10.163 +	}
  10.164 +	else printf("Service installed successfully\n");
  10.165 +
  10.166 +	CloseServiceHandle(schService);
  10.167 +	CloseServiceHandle(schSCManager);
  10.168 +}
  10.169 +
  10.170 +//
  10.171 +// Purpose: 
  10.172 +//   Entry point for the service
  10.173 +//
  10.174 +// Parameters:
  10.175 +//   dwArgc - Number of arguments in the lpszArgv array
  10.176 +//   lpszArgv - Array of strings. The first string is the name of
  10.177 +//     the service and subsequent strings are passed by the process
  10.178 +//     that called the StartService function to start the service.
  10.179 +// 
  10.180 +// Return value:
  10.181 +//   None.
  10.182 +//
  10.183 +VOID WINAPI SvcMain(DWORD dwArgc, LPTSTR *lpszArgv) {
  10.184 +	// Register the handler function for the service
  10.185 +	gSvcStatusHandle = RegisterServiceCtrlHandlerEx(SVCNAME, (LPHANDLER_FUNCTION_EX)SvcCtrlHandler, 0);
  10.186 +	if (!gSvcStatusHandle) {
  10.187 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("RegisterServiceCtrlHandler"));
  10.188 +		return;
  10.189 +	}
  10.190 +
  10.191 +	// These SERVICE_STATUS members remain as set here
  10.192 +	gSvcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
  10.193 +	gSvcStatus.dwServiceSpecificExitCode = 0;
  10.194 +
  10.195 +	// Report initial status to the SCM
  10.196 +	ReportSvcStatus(SERVICE_START_PENDING, NO_ERROR, 3000);
  10.197 +
  10.198 +	if (!DoRegisterDeviceInterfaceToHwnd()) {
  10.199 +		// Terminate on failure.
  10.200 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("DoRegisterDeviceInterfaceToHwnd"));
  10.201 +		ExitProcess(1);
  10.202 +	}
  10.203 +	
  10.204 +	// default security attributes, manual reset, not signaled, no name
  10.205 +	ghSvcStopEvent = CreateEvent(NULL, TRUE, FALSE,	NULL);
  10.206 +	if (ghSvcStopEvent == NULL) {
  10.207 +		ReportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0);
  10.208 +		return;
  10.209 +	}
  10.210 +
  10.211 +	// Report running status when initialization is complete.
  10.212 +	ReportSvcStatus(SERVICE_RUNNING, NO_ERROR, 0);
  10.213 +	SvcReportEvent(EVENTLOG_INFORMATION_TYPE, TEXT("OpenSecUSBEventSvc is running"));
  10.214 +
  10.215 +	// Wait until our worker thread exits signaling that the service needs to stop
  10.216 +	WaitForSingleObject(ghSvcStopEvent, INFINITE);
  10.217 +	
  10.218 +	SvcReportEvent(EVENTLOG_INFORMATION_TYPE, TEXT("OpenSecUSBEventSvc is exiting"));
  10.219 +	// Perform any cleanup tasks
  10.220 +	CloseHandle(ghSvcStopEvent);
  10.221 +
  10.222 +	// Report running status when initialization is complete.
  10.223 +	ReportSvcStatus(SERVICE_STOPPED, NO_ERROR, 0);
  10.224 +}
  10.225 +
  10.226 +void NotifyOpenSecManager (void) {
  10.227 +	HINTERNET	hSession = NULL,
  10.228 +				hConnect = NULL,
  10.229 +				hRequest = NULL;
  10.230 +	BOOL		bResults = FALSE;
  10.231 +
  10.232 +	//devices_json = url_encode(devices_json);
  10.233 +	// Use WinHttpOpen to obtain a session handle.
  10.234 +	hSession = WinHttpOpen(L"OpenSecUSBEventSvc", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0);
  10.235 +	if (!hSession) {
  10.236 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpOpen failed! "));
  10.237 +		return;
  10.238 +	}
  10.239 +	// Specify an HTTP server.
  10.240 +	hConnect = WinHttpConnect(hSession, L"localhost", 8080, 0);
  10.241 +	if (!hConnect) {
  10.242 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpConnect failed! "));
  10.243 +		return;
  10.244 +	}
  10.245 +
  10.246 +	// Create an HTTP request handle.
  10.247 +	hRequest = WinHttpOpenRequest(hConnect, L"GET", L"/device_change", NULL, WINHTTP_NO_REFERER, NULL, NULL);
  10.248 +	if(!hRequest) {
  10.249 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpOpenRequest failed! "));
  10.250 +		return;
  10.251 +	}
  10.252 +
  10.253 +	// Send a request.
  10.254 +	bResults = WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0);
  10.255 +	if (!bResults) {
  10.256 +		SvcReportEvent(EVENTLOG_ERROR_TYPE, TEXT("Error notifying the OpenSec manager. WinHttpSendRequest failed! "));
  10.257 +		return;
  10.258 +	}
  10.259 +
  10.260 +	// End the request.
  10.261 +	//if (bResults)
  10.262 +	//	bResults = WinHttpReceiveResponse(hRequest, NULL);
  10.263 +
  10.264 +	//DWORD dwSize = 0;
  10.265 +	//LPVOID lpOutBuffer = NULL;
  10.266 +	//if (bResults) {
  10.267 +	//	WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, NULL, &dwSize, WINHTTP_NO_HEADER_INDEX);
  10.268 +	//	// Allocate memory for the buffer.
  10.269 +	//	if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
  10.270 +	//		lpOutBuffer = new WCHAR[dwSize / sizeof(WCHAR)];
  10.271 +	//		// Now, use WinHttpQueryHeaders to retrieve the header.
  10.272 +	//		bResults = WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, lpOutBuffer, &dwSize, WINHTTP_NO_HEADER_INDEX);
  10.273 +	//	}
  10.274 +	//}
  10.275 +	//// Print the header contents.
  10.276 +	//if (bResults)
  10.277 +	//	printf("Header contents: \n%S", lpOutBuffer);
  10.278 +	//// Free the allocated memory.
  10.279 +	//delete [] lpOutBuffer;
  10.280 +
  10.281 +}
  10.282 +
  10.283 +//
  10.284 +// Purpose: 
  10.285 +//   Sets the current service status and reports it to the SCM.
  10.286 +//
  10.287 +// Parameters:
  10.288 +//   dwCurrentState - The current state (see SERVICE_STATUS)
  10.289 +//   dwWin32ExitCode - The system error code
  10.290 +//   dwWaitHint - Estimated time for pending operation, 
  10.291 +//     in milliseconds
  10.292 +// 
  10.293 +// Return value:
  10.294 +//   None
  10.295 +//
  10.296 +VOID ReportSvcStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint) {
  10.297 +	static DWORD dwCheckPoint = 1;
  10.298 +	// Fill in the SERVICE_STATUS structure.
  10.299 +	gSvcStatus.dwCurrentState = dwCurrentState;
  10.300 +	gSvcStatus.dwWin32ExitCode = dwWin32ExitCode;
  10.301 +	gSvcStatus.dwWaitHint = dwWaitHint;
  10.302 +
  10.303 +	if (dwCurrentState == SERVICE_START_PENDING)
  10.304 +		gSvcStatus.dwControlsAccepted = 0;
  10.305 +	else gSvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
  10.306 +
  10.307 +	if ((dwCurrentState == SERVICE_RUNNING) ||
  10.308 +		(dwCurrentState == SERVICE_STOPPED))
  10.309 +		gSvcStatus.dwCheckPoint = 0;
  10.310 +	else gSvcStatus.dwCheckPoint = dwCheckPoint++;
  10.311 +
  10.312 +	// Report the status of the service to the SCM.
  10.313 +	SetServiceStatus(gSvcStatusHandle, &gSvcStatus);
  10.314 +}
  10.315 +
  10.316 +// Purpose: 
  10.317 +//   Called by SCM whenever a control code is sent to the service
  10.318 +//   using the ControlService function.
  10.319 +//
  10.320 +// Parameters:
  10.321 +//   dwCtrl - control code
  10.322 +// 
  10.323 +// Return value:
  10.324 +//   None
  10.325 +//
  10.326 +VOID WINAPI SvcCtrlHandler(DWORD dwCtrl) {
  10.327 +	// Handle the requested control code. 
  10.328 +	switch (dwCtrl) {
  10.329 +		case SERVICE_CONTROL_STOP:
  10.330 +			UnregisterDeviceNotification(ghDeviceNotify);
  10.331 +			ReportSvcStatus(SERVICE_STOP_PENDING, NO_ERROR, 0);
  10.332 +			// Signal the service to stop.
  10.333 +			SetEvent(ghSvcStopEvent);
  10.334 +			ReportSvcStatus(gSvcStatus.dwCurrentState, NO_ERROR, 0);
  10.335 +			return;
  10.336 +
  10.337 +		case SERVICE_CONTROL_INTERROGATE:
  10.338 +			break;
  10.339 +
  10.340 +		case SERVICE_CONTROL_DEVICEEVENT:
  10.341 +			SvcReportEvent(EVENTLOG_INFORMATION_TYPE, _T("Received SERVICE_CONTROL_DEVICEEVENT"));
  10.342 +			//NotifyOpenSecManager();
  10.343 +			break;
  10.344 +
  10.345 +		default:
  10.346 +			break;
  10.347 +	}
  10.348 +}
  10.349 +
  10.350 +//
  10.351 +// Purpose: 
  10.352 +//   Logs messages to the event log
  10.353 +//
  10.354 +// Parameters:
  10.355 +//   szFunction - name of function that failed
  10.356 +// 
  10.357 +// Return value:
  10.358 +//   None
  10.359 +//
  10.360 +// Remarks:
  10.361 +//   The service must have an entry in the Application event log.
  10.362 +//
  10.363 +VOID SvcReportEvent(WORD type, LPTSTR szFunction) {
  10.364 +	HANDLE hEventSource;
  10.365 +	LPCTSTR lpszStrings[2];
  10.366 +	TCHAR Buffer[80];
  10.367 +
  10.368 +	hEventSource = RegisterEventSource(NULL, SVCNAME);
  10.369 +
  10.370 +	if (NULL != hEventSource) {
  10.371 +		if (type == EVENTLOG_ERROR_TYPE)
  10.372 +			StringCchPrintf(Buffer, 80, TEXT("Error has occured. %s failed with %d"), szFunction, GetLastError());
  10.373 +		else
  10.374 +			StringCchPrintf(Buffer, 80, TEXT("%s"), szFunction);
  10.375 +
  10.376 +		lpszStrings[0] = SVCNAME;
  10.377 +		lpszStrings[1] = Buffer;
  10.378 +
  10.379 +		if (type == EVENTLOG_ERROR_TYPE)
  10.380 +			ReportEvent(hEventSource,       
  10.381 +				type, // event type
  10.382 +				0,                   // event category
  10.383 +				SVC_ERROR,           // event identifier
  10.384 +				NULL,                // no security identifier
  10.385 +				2,                   // size of lpszStrings array
  10.386 +				0,                   // no binary data
  10.387 +				lpszStrings,         // array of strings
  10.388 +				NULL);               // no binary data
  10.389 +		else
  10.390 +			ReportEvent(hEventSource,
  10.391 +				type, // event type
  10.392 +				0,                   // event category
  10.393 +				SVC_ERROR,		     // event identifier
  10.394 +				NULL,                // no security identifier
  10.395 +				2,                   // size of lpszStrings array
  10.396 +				0,                   // no binary data
  10.397 +				lpszStrings,         // array of strings
  10.398 +				NULL);               // no binary data
  10.399 +
  10.400 +		DeregisterEventSource(hEventSource);
  10.401 +	}
  10.402 +}
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.h	Tue Dec 03 18:04:46 2013 +0100
    11.3 @@ -0,0 +1,3 @@
    11.4 +#pragma once
    11.5 +
    11.6 +#include "resource.h"
    12.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.ico has changed
    13.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.rc has changed
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj	Tue Dec 03 18:04:46 2013 +0100
    14.3 @@ -0,0 +1,102 @@
    14.4 +<?xml version="1.0" encoding="utf-8"?>
    14.5 +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    14.6 +  <ItemGroup Label="ProjectConfigurations">
    14.7 +    <ProjectConfiguration Include="Debug|Win32">
    14.8 +      <Configuration>Debug</Configuration>
    14.9 +      <Platform>Win32</Platform>
   14.10 +    </ProjectConfiguration>
   14.11 +    <ProjectConfiguration Include="Release|Win32">
   14.12 +      <Configuration>Release</Configuration>
   14.13 +      <Platform>Win32</Platform>
   14.14 +    </ProjectConfiguration>
   14.15 +  </ItemGroup>
   14.16 +  <PropertyGroup Label="Globals">
   14.17 +    <ProjectGuid>{B54F4A89-7357-4879-AE62-0825AD3E5974}</ProjectGuid>
   14.18 +    <Keyword>Win32Proj</Keyword>
   14.19 +    <RootNamespace>OpenSecUSBEventSvc</RootNamespace>
   14.20 +  </PropertyGroup>
   14.21 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   14.22 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
   14.23 +    <ConfigurationType>Application</ConfigurationType>
   14.24 +    <UseDebugLibraries>true</UseDebugLibraries>
   14.25 +    <PlatformToolset>v120</PlatformToolset>
   14.26 +    <CharacterSet>Unicode</CharacterSet>
   14.27 +  </PropertyGroup>
   14.28 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
   14.29 +    <ConfigurationType>Application</ConfigurationType>
   14.30 +    <UseDebugLibraries>false</UseDebugLibraries>
   14.31 +    <PlatformToolset>v120</PlatformToolset>
   14.32 +    <WholeProgramOptimization>true</WholeProgramOptimization>
   14.33 +    <CharacterSet>Unicode</CharacterSet>
   14.34 +  </PropertyGroup>
   14.35 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   14.36 +  <ImportGroup Label="ExtensionSettings">
   14.37 +  </ImportGroup>
   14.38 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   14.39 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   14.40 +  </ImportGroup>
   14.41 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   14.42 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   14.43 +  </ImportGroup>
   14.44 +  <PropertyGroup Label="UserMacros" />
   14.45 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   14.46 +    <LinkIncremental>true</LinkIncremental>
   14.47 +  </PropertyGroup>
   14.48 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   14.49 +    <LinkIncremental>false</LinkIncremental>
   14.50 +  </PropertyGroup>
   14.51 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   14.52 +    <ClCompile>
   14.53 +      <PrecompiledHeader>
   14.54 +      </PrecompiledHeader>
   14.55 +      <WarningLevel>Level3</WarningLevel>
   14.56 +      <Optimization>Disabled</Optimization>
   14.57 +      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   14.58 +      <SDLCheck>true</SDLCheck>
   14.59 +      <AdditionalIncludeDirectories>..\OpenSecUSBEventSvcLog;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   14.60 +    </ClCompile>
   14.61 +    <Link>
   14.62 +      <SubSystem>Console</SubSystem>
   14.63 +      <GenerateDebugInformation>true</GenerateDebugInformation>
   14.64 +      <AdditionalDependencies>winhttp.lib;setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
   14.65 +    </Link>
   14.66 +  </ItemDefinitionGroup>
   14.67 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   14.68 +    <ClCompile>
   14.69 +      <WarningLevel>Level3</WarningLevel>
   14.70 +      <PrecompiledHeader>
   14.71 +      </PrecompiledHeader>
   14.72 +      <Optimization>MaxSpeed</Optimization>
   14.73 +      <FunctionLevelLinking>true</FunctionLevelLinking>
   14.74 +      <IntrinsicFunctions>true</IntrinsicFunctions>
   14.75 +      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   14.76 +      <SDLCheck>true</SDLCheck>
   14.77 +      <AdditionalIncludeDirectories>..\OpenSecUSBEventSvcLog;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
   14.78 +    </ClCompile>
   14.79 +    <Link>
   14.80 +      <SubSystem>Console</SubSystem>
   14.81 +      <GenerateDebugInformation>true</GenerateDebugInformation>
   14.82 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
   14.83 +      <OptimizeReferences>true</OptimizeReferences>
   14.84 +      <AdditionalDependencies>winhttp.lib;setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
   14.85 +    </Link>
   14.86 +  </ItemDefinitionGroup>
   14.87 +  <ItemGroup>
   14.88 +    <Text Include="ReadMe.txt" />
   14.89 +  </ItemGroup>
   14.90 +  <ItemGroup>
   14.91 +    <ClInclude Include="OpenSecUSBEventSvc.h" />
   14.92 +    <ClInclude Include="stdafx.h" />
   14.93 +    <ClInclude Include="targetver.h" />
   14.94 +  </ItemGroup>
   14.95 +  <ItemGroup>
   14.96 +    <ClCompile Include="OpenSecUSBEventSvc.cpp" />
   14.97 +    <ClCompile Include="stdafx.cpp">
   14.98 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
   14.99 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
  14.100 +    </ClCompile>
  14.101 +  </ItemGroup>
  14.102 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  14.103 +  <ImportGroup Label="ExtensionTargets">
  14.104 +  </ImportGroup>
  14.105 +</Project>
  14.106 \ No newline at end of file
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.filters	Tue Dec 03 18:04:46 2013 +0100
    15.3 @@ -0,0 +1,39 @@
    15.4 +<?xml version="1.0" encoding="utf-8"?>
    15.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    15.6 +  <ItemGroup>
    15.7 +    <Filter Include="Source Files">
    15.8 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
    15.9 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
   15.10 +    </Filter>
   15.11 +    <Filter Include="Header Files">
   15.12 +      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
   15.13 +      <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
   15.14 +    </Filter>
   15.15 +    <Filter Include="Resource Files">
   15.16 +      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
   15.17 +      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
   15.18 +    </Filter>
   15.19 +  </ItemGroup>
   15.20 +  <ItemGroup>
   15.21 +    <Text Include="ReadMe.txt" />
   15.22 +  </ItemGroup>
   15.23 +  <ItemGroup>
   15.24 +    <ClInclude Include="stdafx.h">
   15.25 +      <Filter>Header Files</Filter>
   15.26 +    </ClInclude>
   15.27 +    <ClInclude Include="targetver.h">
   15.28 +      <Filter>Header Files</Filter>
   15.29 +    </ClInclude>
   15.30 +    <ClInclude Include="OpenSecUSBEventSvc.h">
   15.31 +      <Filter>Header Files</Filter>
   15.32 +    </ClInclude>
   15.33 +  </ItemGroup>
   15.34 +  <ItemGroup>
   15.35 +    <ClCompile Include="stdafx.cpp">
   15.36 +      <Filter>Source Files</Filter>
   15.37 +    </ClCompile>
   15.38 +    <ClCompile Include="OpenSecUSBEventSvc.cpp">
   15.39 +      <Filter>Source Files</Filter>
   15.40 +    </ClCompile>
   15.41 +  </ItemGroup>
   15.42 +</Project>
   15.43 \ No newline at end of file
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/OpenSecUSBEventSvc.vcxproj.user	Tue Dec 03 18:04:46 2013 +0100
    16.3 @@ -0,0 +1,4 @@
    16.4 +<?xml version="1.0" encoding="utf-8"?>
    16.5 +<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    16.6 +  <PropertyGroup />
    16.7 +</Project>
    16.8 \ No newline at end of file
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/ReadMe.txt	Tue Dec 03 18:04:46 2013 +0100
    17.3 @@ -0,0 +1,62 @@
    17.4 +========================================================================
    17.5 +    WIN32 APPLICATION : OpenSecUSBEventSvc Project Overview
    17.6 +========================================================================
    17.7 +
    17.8 +AppWizard has created this OpenSecUSBEventSvc application for you.
    17.9 +
   17.10 +This file contains a summary of what you will find in each of the files that
   17.11 +make up your OpenSecUSBEventSvc application.
   17.12 +
   17.13 +
   17.14 +OpenSecUSBEventSvc.vcxproj
   17.15 +    This is the main project file for VC++ projects generated using an Application Wizard.
   17.16 +    It contains information about the version of Visual C++ that generated the file, and
   17.17 +    information about the platforms, configurations, and project features selected with the
   17.18 +    Application Wizard.
   17.19 +
   17.20 +OpenSecUSBEventSvc.vcxproj.filters
   17.21 +    This is the filters file for VC++ projects generated using an Application Wizard. 
   17.22 +    It contains information about the association between the files in your project 
   17.23 +    and the filters. This association is used in the IDE to show grouping of files with
   17.24 +    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
   17.25 +    "Source Files" filter).
   17.26 +
   17.27 +OpenSecUSBEventSvc.cpp
   17.28 +    This is the main application source file.
   17.29 +
   17.30 +/////////////////////////////////////////////////////////////////////////////
   17.31 +AppWizard has created the following resources:
   17.32 +
   17.33 +OpenSecUSBEventSvc.rc
   17.34 +    This is a listing of all of the Microsoft Windows resources that the
   17.35 +    program uses.  It includes the icons, bitmaps, and cursors that are stored
   17.36 +    in the RES subdirectory.  This file can be directly edited in Microsoft
   17.37 +    Visual C++.
   17.38 +
   17.39 +Resource.h
   17.40 +    This is the standard header file, which defines new resource IDs.
   17.41 +    Microsoft Visual C++ reads and updates this file.
   17.42 +
   17.43 +OpenSecUSBEventSvc.ico
   17.44 +    This is an icon file, which is used as the application's icon (32x32).
   17.45 +    This icon is included by the main resource file OpenSecUSBEventSvc.rc.
   17.46 +
   17.47 +small.ico
   17.48 +    This is an icon file, which contains a smaller version (16x16)
   17.49 +    of the application's icon. This icon is included by the main resource
   17.50 +    file OpenSecUSBEventSvc.rc.
   17.51 +
   17.52 +/////////////////////////////////////////////////////////////////////////////
   17.53 +Other standard files:
   17.54 +
   17.55 +StdAfx.h, StdAfx.cpp
   17.56 +    These files are used to build a precompiled header (PCH) file
   17.57 +    named OpenSecUSBEventSvc.pch and a precompiled types file named StdAfx.obj.
   17.58 +
   17.59 +/////////////////////////////////////////////////////////////////////////////
   17.60 +Other notes:
   17.61 +
   17.62 +AppWizard uses "TODO:" comments to indicate parts of the source code you
   17.63 +should add to or customize.
   17.64 +
   17.65 +/////////////////////////////////////////////////////////////////////////////
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.Build.CppClean.log	Tue Dec 03 18:04:46 2013 +0100
    18.3 @@ -0,0 +1,12 @@
    18.4 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecusbeventsvc.pch
    18.5 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\vc120.pdb
    18.6 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\stdafx.obj
    18.7 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecusbeventsvc.obj
    18.8 +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvc.exe
    18.9 +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvc.pdb
   18.10 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\cl.command.1.tlog
   18.11 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\cl.read.1.tlog
   18.12 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\cl.write.1.tlog
   18.13 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\link.command.1.tlog
   18.14 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\link.read.1.tlog
   18.15 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvc\release\opensecu.b54f4a89.tlog\link.write.1.tlog
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Release/OpenSecUSBEventSvc.log	Tue Dec 03 18:04:46 2013 +0100
    19.3 @@ -0,0 +1,5 @@
    19.4 +Build started 12/3/2013 6:03:15 PM.
    19.5 +
    19.6 +Build succeeded.
    19.7 +
    19.8 +Time Elapsed 00:00:00.05
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/Resource.h	Tue Dec 03 18:04:46 2013 +0100
    20.3 @@ -0,0 +1,31 @@
    20.4 +//{{NO_DEPENDENCIES}}
    20.5 +// Microsoft Visual C++ generated include file.
    20.6 +// Used by OpenSecUSBEventSvc.rc
    20.7 +//
    20.8 +
    20.9 +#define IDS_APP_TITLE			103
   20.10 +
   20.11 +#define IDR_MAINFRAME			128
   20.12 +#define IDD_OPENSECUSBEVENTSVC_DIALOG	102
   20.13 +#define IDD_ABOUTBOX			103
   20.14 +#define IDM_ABOUT				104
   20.15 +#define IDM_EXIT				105
   20.16 +#define IDI_OPENSECUSBEVENTSVC			107
   20.17 +#define IDI_SMALL				108
   20.18 +#define IDC_OPENSECUSBEVENTSVC			109
   20.19 +#define IDC_MYICON				2
   20.20 +#ifndef IDC_STATIC
   20.21 +#define IDC_STATIC				-1
   20.22 +#endif
   20.23 +// Next default values for new objects
   20.24 +//
   20.25 +#ifdef APSTUDIO_INVOKED
   20.26 +#ifndef APSTUDIO_READONLY_SYMBOLS
   20.27 +
   20.28 +#define _APS_NO_MFC					130
   20.29 +#define _APS_NEXT_RESOURCE_VALUE	129
   20.30 +#define _APS_NEXT_COMMAND_VALUE		32771
   20.31 +#define _APS_NEXT_CONTROL_VALUE		1000
   20.32 +#define _APS_NEXT_SYMED_VALUE		110
   20.33 +#endif
   20.34 +#endif
    21.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvc/small.ico has changed
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.cpp	Tue Dec 03 18:04:46 2013 +0100
    22.3 @@ -0,0 +1,8 @@
    22.4 +// stdafx.cpp : source file that includes just the standard includes
    22.5 +// OpenSecUSBEventSvc.pch will be the pre-compiled header
    22.6 +// stdafx.obj will contain the pre-compiled type information
    22.7 +
    22.8 +#include "stdafx.h"
    22.9 +
   22.10 +// TODO: reference any additional headers you need in STDAFX.H
   22.11 +// and not in this file
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/stdafx.h	Tue Dec 03 18:04:46 2013 +0100
    23.3 @@ -0,0 +1,21 @@
    23.4 +// stdafx.h : include file for standard system include files,
    23.5 +// or project specific include files that are used frequently, but
    23.6 +// are changed infrequently
    23.7 +//
    23.8 +
    23.9 +#pragma once
   23.10 +
   23.11 +#include "targetver.h"
   23.12 +
   23.13 +#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
   23.14 +// Windows Header Files:
   23.15 +#include <windows.h>
   23.16 +
   23.17 +// C RunTime Header Files
   23.18 +#include <stdlib.h>
   23.19 +#include <malloc.h>
   23.20 +#include <memory.h>
   23.21 +#include <tchar.h>
   23.22 +
   23.23 +
   23.24 +// TODO: reference additional headers your program requires here
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvc/targetver.h	Tue Dec 03 18:04:46 2013 +0100
    24.3 @@ -0,0 +1,8 @@
    24.4 +#pragma once
    24.5 +
    24.6 +// Including SDKDDKVer.h defines the highest available Windows platform.
    24.7 +
    24.8 +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
    24.9 +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
   24.10 +
   24.11 +#include <SDKDDKVer.h>
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Build.txt	Tue Dec 03 18:04:46 2013 +0100
    25.3 @@ -0,0 +1,7 @@
    25.4 +mc.exe OpenSecUSBEventSvcLog.mc
    25.5 +rc.exe /r OpenSecUSBEventSvcLog.rc
    25.6 +link -dll -noentry -out: ..\Release\OpenSecUSBEventSvcLog.dll OpenSecUSBEventSvcLog.res
    25.7 +
    25.8 +add to registry and make sure the path in .reg points to you actuall log.dll
    25.9 +
   25.10 +OpenSecUSBEventSvcLog.reg
   25.11 \ No newline at end of file
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.Build.CppClean.log	Tue Dec 03 18:04:46 2013 +0100
    26.3 @@ -0,0 +1,30 @@
    26.4 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.pch
    26.5 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\stdafx.obj
    26.6 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\vc100.pdb
    26.7 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\dllmain.obj
    26.8 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\debug\opensecmgrlog.ilk
    26.9 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\debug\opensecmgrlog.dll
   26.10 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.dll.intermediate.manifest
   26.11 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\debug\opensecmgrlog.pdb
   26.12 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.dll.embed.manifest
   26.13 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog.dll.embed.manifest.res
   26.14 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\cl.command.1.tlog
   26.15 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\cl.read.1.tlog
   26.16 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\cl.write.1.tlog
   26.17 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link-cvtres.read.1.tlog
   26.18 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link-cvtres.write.1.tlog
   26.19 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204-cvtres.read.1.tlog
   26.20 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204-cvtres.write.1.tlog
   26.21 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204.read.1.tlog
   26.22 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.5204.write.1.tlog
   26.23 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.command.1.tlog
   26.24 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.read.1.tlog
   26.25 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\link.write.1.tlog
   26.26 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\mt.command.1.tlog
   26.27 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\mt.read.1.tlog
   26.28 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\mt.write.1.tlog
   26.29 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\rc.command.1.tlog
   26.30 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\rc.read.1.tlog
   26.31 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\rc.write.1.tlog
   26.32 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\vc100.idb
   26.33 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\debug\opensecmgrlog_manifest.rc
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.lastbuildstate	Tue Dec 03 18:04:46 2013 +0100
    27.3 @@ -0,0 +1,2 @@
    27.4 +#v4.0:v100:false
    27.5 +Debug|Win32|c:\users\bartham\documents\visual studio 2010\Projects\OpenSecMgr\|
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecMgrLog.log	Tue Dec 03 18:04:46 2013 +0100
    28.3 @@ -0,0 +1,8 @@
    28.4 +Build started 12/3/2013 2:02:13 PM.
    28.5 +     1>Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" on node 2 (Rebuild target(s)).
    28.6 +     1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".
    28.7 +     1>Done Building Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" (Rebuild target(s)) -- FAILED.
    28.8 +
    28.9 +Build FAILED.
   28.10 +
   28.11 +Time Elapsed 00:00:00.06
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log	Tue Dec 03 18:04:46 2013 +0100
    29.3 @@ -0,0 +1,14 @@
    29.4 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecusbeventsvclog.pch
    29.5 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\vc120.pdb
    29.6 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\vc120.idb
    29.7 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\stdafx.obj
    29.8 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\dllmain.obj
    29.9 +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvclog.ilk
   29.10 +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvclog.dll
   29.11 +c:\program files\opensecurity\server\windows\usbeventsvc\debug\opensecusbeventsvclog.pdb
   29.12 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\cl.command.1.tlog
   29.13 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\cl.read.1.tlog
   29.14 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\cl.write.1.tlog
   29.15 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\link.command.1.tlog
   29.16 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\link.read.1.tlog
   29.17 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\debug\opensecu.8a2fcdf0.tlog\link.write.1.tlog
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Debug/OpenSecUSBEventSvcLog.log	Tue Dec 03 18:04:46 2013 +0100
    30.3 @@ -0,0 +1,5 @@
    30.4 +Build started 12/3/2013 6:03:49 PM.
    30.5 +
    30.6 +Build succeeded.
    30.7 +
    30.8 +Time Elapsed 00:00:00.03
    31.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/MSG00409.bin has changed
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.h	Tue Dec 03 18:04:46 2013 +0100
    32.3 @@ -0,0 +1,56 @@
    32.4 + // The following are message definitions.
    32.5 +//
    32.6 +//  Values are 32 bit values laid out as follows:
    32.7 +//
    32.8 +//   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
    32.9 +//   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
   32.10 +//  +---+-+-+-----------------------+-------------------------------+
   32.11 +//  |Sev|C|R|     Facility          |               Code            |
   32.12 +//  +---+-+-+-----------------------+-------------------------------+
   32.13 +//
   32.14 +//  where
   32.15 +//
   32.16 +//      Sev - is the severity code
   32.17 +//
   32.18 +//          00 - Success
   32.19 +//          01 - Informational
   32.20 +//          10 - Warning
   32.21 +//          11 - Error
   32.22 +//
   32.23 +//      C - is the Customer code flag
   32.24 +//
   32.25 +//      R - is a reserved bit
   32.26 +//
   32.27 +//      Facility - is the facility code
   32.28 +//
   32.29 +//      Code - is the facility's status code
   32.30 +//
   32.31 +//
   32.32 +// Define the facility codes
   32.33 +//
   32.34 +#define FACILITY_SYSTEM                  0x0
   32.35 +#define FACILITY_STUBS                   0x3
   32.36 +#define FACILITY_RUNTIME                 0x2
   32.37 +#define FACILITY_IO_ERROR_CODE           0x4
   32.38 +
   32.39 +
   32.40 +//
   32.41 +// Define the severity codes
   32.42 +//
   32.43 +#define STATUS_SEVERITY_WARNING          0x2
   32.44 +#define STATUS_SEVERITY_SUCCESS          0x0
   32.45 +#define STATUS_SEVERITY_INFORMATIONAL    0x1
   32.46 +#define STATUS_SEVERITY_ERROR            0x3
   32.47 +
   32.48 +
   32.49 +//
   32.50 +// MessageId: SVC_ERROR
   32.51 +//
   32.52 +// MessageText:
   32.53 +//
   32.54 +// An error has occurred (%2).
   32.55 +//
   32.56 +#define SVC_ERROR                        ((DWORD)0xC0020001L)
   32.57 +
   32.58 + // A message file must end with a period on its own line
   32.59 + // followed by a blank line.
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.mc	Tue Dec 03 18:04:46 2013 +0100
    33.3 @@ -0,0 +1,30 @@
    33.4 +MessageIdTypedef=DWORD
    33.5 +
    33.6 +SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
    33.7 +    Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
    33.8 +    Warning=0x2:STATUS_SEVERITY_WARNING
    33.9 +    Error=0x3:STATUS_SEVERITY_ERROR
   33.10 +    )
   33.11 +
   33.12 +
   33.13 +FacilityNames=(System=0x0:FACILITY_SYSTEM
   33.14 +    Runtime=0x2:FACILITY_RUNTIME
   33.15 +    Stubs=0x3:FACILITY_STUBS
   33.16 +    Io=0x4:FACILITY_IO_ERROR_CODE
   33.17 +)
   33.18 +
   33.19 +LanguageNames=(English=0x409:MSG00409)
   33.20 +
   33.21 +; // The following are message definitions.
   33.22 +
   33.23 +MessageId=0x1
   33.24 +Severity=Error
   33.25 +Facility=Runtime
   33.26 +SymbolicName=SVC_ERROR
   33.27 +Language=English
   33.28 +%2.
   33.29 +.
   33.30 +
   33.31 +; // A message file must end with a period on its own line
   33.32 +; // followed by a blank line.
   33.33 +
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.reg	Tue Dec 03 18:04:46 2013 +0100
    34.3 @@ -0,0 +1,5 @@
    34.4 +Windows Registry Editor Version 5.00
    34.5 +
    34.6 +[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\OpenSecUSBEventSvc]
    34.7 +"EventMessageFile"="C:\\Program Files\\OpenSecurity\\server\\windows\\USBEventSvc\\Release\\OpenSecUSBEventSvcLog.dll"
    34.8 +"TypesSupported"=dword:00000007
    35.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.sdf has changed
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj	Tue Dec 03 18:04:46 2013 +0100
    36.3 @@ -0,0 +1,173 @@
    36.4 +<?xml version="1.0" encoding="utf-8"?>
    36.5 +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    36.6 +  <ItemGroup Label="ProjectConfigurations">
    36.7 +    <ProjectConfiguration Include="Debug|Win32">
    36.8 +      <Configuration>Debug</Configuration>
    36.9 +      <Platform>Win32</Platform>
   36.10 +    </ProjectConfiguration>
   36.11 +    <ProjectConfiguration Include="Debug|x64">
   36.12 +      <Configuration>Debug</Configuration>
   36.13 +      <Platform>x64</Platform>
   36.14 +    </ProjectConfiguration>
   36.15 +    <ProjectConfiguration Include="Release|Win32">
   36.16 +      <Configuration>Release</Configuration>
   36.17 +      <Platform>Win32</Platform>
   36.18 +    </ProjectConfiguration>
   36.19 +    <ProjectConfiguration Include="Release|x64">
   36.20 +      <Configuration>Release</Configuration>
   36.21 +      <Platform>x64</Platform>
   36.22 +    </ProjectConfiguration>
   36.23 +  </ItemGroup>
   36.24 +  <PropertyGroup Label="Globals">
   36.25 +    <ProjectGuid>{8A2FCDF0-77C7-4423-926D-B36872648B32}</ProjectGuid>
   36.26 +    <Keyword>Win32Proj</Keyword>
   36.27 +    <RootNamespace>OpenSecUSBEventSvcLog</RootNamespace>
   36.28 +    <ProjectName>OpenSecUSBEventSvcLog</ProjectName>
   36.29 +  </PropertyGroup>
   36.30 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   36.31 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
   36.32 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   36.33 +    <UseDebugLibraries>true</UseDebugLibraries>
   36.34 +    <CharacterSet>Unicode</CharacterSet>
   36.35 +    <PlatformToolset>v120</PlatformToolset>
   36.36 +  </PropertyGroup>
   36.37 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
   36.38 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   36.39 +    <UseDebugLibraries>true</UseDebugLibraries>
   36.40 +    <CharacterSet>Unicode</CharacterSet>
   36.41 +    <PlatformToolset>v120</PlatformToolset>
   36.42 +  </PropertyGroup>
   36.43 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
   36.44 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   36.45 +    <UseDebugLibraries>false</UseDebugLibraries>
   36.46 +    <WholeProgramOptimization>true</WholeProgramOptimization>
   36.47 +    <CharacterSet>Unicode</CharacterSet>
   36.48 +    <PlatformToolset>v120</PlatformToolset>
   36.49 +  </PropertyGroup>
   36.50 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
   36.51 +    <ConfigurationType>DynamicLibrary</ConfigurationType>
   36.52 +    <UseDebugLibraries>false</UseDebugLibraries>
   36.53 +    <WholeProgramOptimization>true</WholeProgramOptimization>
   36.54 +    <CharacterSet>Unicode</CharacterSet>
   36.55 +    <PlatformToolset>v120</PlatformToolset>
   36.56 +  </PropertyGroup>
   36.57 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   36.58 +  <ImportGroup Label="ExtensionSettings">
   36.59 +  </ImportGroup>
   36.60 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   36.61 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   36.62 +  </ImportGroup>
   36.63 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
   36.64 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   36.65 +  </ImportGroup>
   36.66 +  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   36.67 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   36.68 +  </ImportGroup>
   36.69 +  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
   36.70 +    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
   36.71 +  </ImportGroup>
   36.72 +  <PropertyGroup Label="UserMacros" />
   36.73 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   36.74 +    <LinkIncremental>true</LinkIncremental>
   36.75 +  </PropertyGroup>
   36.76 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
   36.77 +    <LinkIncremental>true</LinkIncremental>
   36.78 +  </PropertyGroup>
   36.79 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
   36.80 +    <LinkIncremental>false</LinkIncremental>
   36.81 +  </PropertyGroup>
   36.82 +  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
   36.83 +    <LinkIncremental>false</LinkIncremental>
   36.84 +  </PropertyGroup>
   36.85 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
   36.86 +    <ClCompile>
   36.87 +      <PrecompiledHeader>Use</PrecompiledHeader>
   36.88 +      <WarningLevel>Level3</WarningLevel>
   36.89 +      <Optimization>Disabled</Optimization>
   36.90 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
   36.91 +    </ClCompile>
   36.92 +    <Link>
   36.93 +      <SubSystem>Windows</SubSystem>
   36.94 +      <GenerateDebugInformation>true</GenerateDebugInformation>
   36.95 +      <TargetMachine>MachineX86</TargetMachine>
   36.96 +    </Link>
   36.97 +  </ItemDefinitionGroup>
   36.98 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
   36.99 +    <ClCompile>
  36.100 +      <PrecompiledHeader>Use</PrecompiledHeader>
  36.101 +      <WarningLevel>Level3</WarningLevel>
  36.102 +      <Optimization>Disabled</Optimization>
  36.103 +      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  36.104 +    </ClCompile>
  36.105 +    <Link>
  36.106 +      <SubSystem>Windows</SubSystem>
  36.107 +      <GenerateDebugInformation>true</GenerateDebugInformation>
  36.108 +    </Link>
  36.109 +  </ItemDefinitionGroup>
  36.110 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  36.111 +    <ClCompile>
  36.112 +      <WarningLevel>Level3</WarningLevel>
  36.113 +      <PrecompiledHeader>Use</PrecompiledHeader>
  36.114 +      <Optimization>MaxSpeed</Optimization>
  36.115 +      <FunctionLevelLinking>true</FunctionLevelLinking>
  36.116 +      <IntrinsicFunctions>true</IntrinsicFunctions>
  36.117 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  36.118 +    </ClCompile>
  36.119 +    <Link>
  36.120 +      <SubSystem>Windows</SubSystem>
  36.121 +      <GenerateDebugInformation>true</GenerateDebugInformation>
  36.122 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
  36.123 +      <OptimizeReferences>true</OptimizeReferences>
  36.124 +    </Link>
  36.125 +  </ItemDefinitionGroup>
  36.126 +  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
  36.127 +    <ClCompile>
  36.128 +      <WarningLevel>Level3</WarningLevel>
  36.129 +      <PrecompiledHeader>Use</PrecompiledHeader>
  36.130 +      <Optimization>MaxSpeed</Optimization>
  36.131 +      <FunctionLevelLinking>true</FunctionLevelLinking>
  36.132 +      <IntrinsicFunctions>true</IntrinsicFunctions>
  36.133 +      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;OPENSECMGRLOG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  36.134 +    </ClCompile>
  36.135 +    <Link>
  36.136 +      <SubSystem>Windows</SubSystem>
  36.137 +      <GenerateDebugInformation>true</GenerateDebugInformation>
  36.138 +      <EnableCOMDATFolding>true</EnableCOMDATFolding>
  36.139 +      <OptimizeReferences>true</OptimizeReferences>
  36.140 +    </Link>
  36.141 +  </ItemDefinitionGroup>
  36.142 +  <ItemGroup>
  36.143 +    <None Include="OpenSecUSBEventSvcLog.mc" />
  36.144 +    <None Include="ReadMe.txt" />
  36.145 +  </ItemGroup>
  36.146 +  <ItemGroup>
  36.147 +    <ClInclude Include="OpenSecUSBEventSvcLog.h" />
  36.148 +    <ClInclude Include="stdafx.h" />
  36.149 +    <ClInclude Include="targetver.h" />
  36.150 +  </ItemGroup>
  36.151 +  <ItemGroup>
  36.152 +    <ClCompile Include="dllmain.cpp">
  36.153 +      <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
  36.154 +      <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
  36.155 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  36.156 +      </PrecompiledHeader>
  36.157 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
  36.158 +      </PrecompiledHeader>
  36.159 +      <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
  36.160 +      <CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
  36.161 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  36.162 +      </PrecompiledHeader>
  36.163 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
  36.164 +      </PrecompiledHeader>
  36.165 +    </ClCompile>
  36.166 +    <ClCompile Include="stdafx.cpp">
  36.167 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
  36.168 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
  36.169 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
  36.170 +      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
  36.171 +    </ClCompile>
  36.172 +  </ItemGroup>
  36.173 +  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  36.174 +  <ImportGroup Label="ExtensionTargets">
  36.175 +  </ImportGroup>
  36.176 +</Project>
  36.177 \ No newline at end of file
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.filters	Tue Dec 03 18:04:46 2013 +0100
    37.3 @@ -0,0 +1,42 @@
    37.4 +<?xml version="1.0" encoding="utf-8"?>
    37.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    37.6 +  <ItemGroup>
    37.7 +    <Filter Include="Source Files">
    37.8 +      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
    37.9 +      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
   37.10 +    </Filter>
   37.11 +    <Filter Include="Header Files">
   37.12 +      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
   37.13 +      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
   37.14 +    </Filter>
   37.15 +    <Filter Include="Resource Files">
   37.16 +      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
   37.17 +      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
   37.18 +    </Filter>
   37.19 +  </ItemGroup>
   37.20 +  <ItemGroup>
   37.21 +    <None Include="ReadMe.txt" />
   37.22 +    <None Include="OpenSecUSBEventSvcLog.mc">
   37.23 +      <Filter>Resource Files</Filter>
   37.24 +    </None>
   37.25 +  </ItemGroup>
   37.26 +  <ItemGroup>
   37.27 +    <ClInclude Include="stdafx.h">
   37.28 +      <Filter>Header Files</Filter>
   37.29 +    </ClInclude>
   37.30 +    <ClInclude Include="targetver.h">
   37.31 +      <Filter>Header Files</Filter>
   37.32 +    </ClInclude>
   37.33 +    <ClInclude Include="OpenSecUSBEventSvcLog.h">
   37.34 +      <Filter>Header Files</Filter>
   37.35 +    </ClInclude>
   37.36 +  </ItemGroup>
   37.37 +  <ItemGroup>
   37.38 +    <ClCompile Include="stdafx.cpp">
   37.39 +      <Filter>Source Files</Filter>
   37.40 +    </ClCompile>
   37.41 +    <ClCompile Include="dllmain.cpp">
   37.42 +      <Filter>Source Files</Filter>
   37.43 +    </ClCompile>
   37.44 +  </ItemGroup>
   37.45 +</Project>
   37.46 \ No newline at end of file
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/OpenSecUSBEventSvcLog.vcxproj.user	Tue Dec 03 18:04:46 2013 +0100
    38.3 @@ -0,0 +1,3 @@
    38.4 +<?xml version="1.0" encoding="utf-8"?>
    38.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    38.6 +</Project>
    38.7 \ No newline at end of file
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/ReadMe.txt	Tue Dec 03 18:04:46 2013 +0100
    39.3 @@ -0,0 +1,48 @@
    39.4 +========================================================================
    39.5 +    DYNAMIC LINK LIBRARY : OpenSecMgrLog Project Overview
    39.6 +========================================================================
    39.7 +
    39.8 +AppWizard has created this OpenSecMgrLog DLL for you.
    39.9 +
   39.10 +This file contains a summary of what you will find in each of the files that
   39.11 +make up your OpenSecMgrLog application.
   39.12 +
   39.13 +
   39.14 +OpenSecMgrLog.vcxproj
   39.15 +    This is the main project file for VC++ projects generated using an Application Wizard.
   39.16 +    It contains information about the version of Visual C++ that generated the file, and
   39.17 +    information about the platforms, configurations, and project features selected with the
   39.18 +    Application Wizard.
   39.19 +
   39.20 +OpenSecMgrLog.vcxproj.filters
   39.21 +    This is the filters file for VC++ projects generated using an Application Wizard. 
   39.22 +    It contains information about the association between the files in your project 
   39.23 +    and the filters. This association is used in the IDE to show grouping of files with
   39.24 +    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
   39.25 +    "Source Files" filter).
   39.26 +
   39.27 +OpenSecMgrLog.cpp
   39.28 +    This is the main DLL source file.
   39.29 +
   39.30 +	When created, this DLL does not export any symbols. As a result, it
   39.31 +	will not produce a .lib file when it is built. If you wish this project
   39.32 +	to be a project dependency of some other project, you will either need to
   39.33 +	add code to export some symbols from the DLL so that an export library
   39.34 +	will be produced, or you can set the Ignore Input Library property to Yes
   39.35 +	on the General propert page of the Linker folder in the project's Property
   39.36 +	Pages dialog box.
   39.37 +
   39.38 +/////////////////////////////////////////////////////////////////////////////
   39.39 +Other standard files:
   39.40 +
   39.41 +StdAfx.h, StdAfx.cpp
   39.42 +    These files are used to build a precompiled header (PCH) file
   39.43 +    named OpenSecMgrLog.pch and a precompiled types file named StdAfx.obj.
   39.44 +
   39.45 +/////////////////////////////////////////////////////////////////////////////
   39.46 +Other notes:
   39.47 +
   39.48 +AppWizard uses "TODO:" comments to indicate parts of the source code you
   39.49 +should add to or customize.
   39.50 +
   39.51 +/////////////////////////////////////////////////////////////////////////////
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.Build.CppClean.log	Tue Dec 03 18:04:46 2013 +0100
    40.3 @@ -0,0 +1,12 @@
    40.4 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecusbeventsvclog.pch
    40.5 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\vc120.pdb
    40.6 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\stdafx.obj
    40.7 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\dllmain.obj
    40.8 +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvclog.dll
    40.9 +c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvclog.pdb
   40.10 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\cl.command.1.tlog
   40.11 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\cl.read.1.tlog
   40.12 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\cl.write.1.tlog
   40.13 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\link.command.1.tlog
   40.14 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\link.read.1.tlog
   40.15 +c:\program files\opensecurity\server\windows\usbeventsvc\opensecusbeventsvclog\release\opensecu.8a2fcdf0.tlog\link.write.1.tlog
    41.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/Release/OpenSecUSBEventSvcLog.log	Tue Dec 03 18:04:46 2013 +0100
    41.3 @@ -0,0 +1,8 @@
    41.4 +Build started 12/3/2013 6:03:36 PM.
    41.5 +     1>Project "C:\Program Files\OpenSecurity\server\windows\USBEventSvc\OpenSecUSBEventSvcLog\OpenSecUSBEventSvcLog.vcxproj" on node 2 (Clean target(s)).
    41.6 +     1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppClean.targets(76,5): warning : Access to the path 'c:\program files\opensecurity\server\windows\usbeventsvc\release\opensecusbeventsvclog.dll' is denied.
    41.7 +     1>Done Building Project "C:\Program Files\OpenSecurity\server\windows\USBEventSvc\OpenSecUSBEventSvcLog\OpenSecUSBEventSvcLog.vcxproj" (Clean target(s)).
    41.8 +
    41.9 +Build succeeded.
   41.10 +
   41.11 +Time Elapsed 00:00:00.03
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/dllmain.cpp	Tue Dec 03 18:04:46 2013 +0100
    42.3 @@ -0,0 +1,19 @@
    42.4 +// dllmain.cpp : Defines the entry point for the DLL application.
    42.5 +#include "stdafx.h"
    42.6 +
    42.7 +BOOL APIENTRY DllMain( HMODULE hModule,
    42.8 +                       DWORD  ul_reason_for_call,
    42.9 +                       LPVOID lpReserved
   42.10 +					 )
   42.11 +{
   42.12 +	switch (ul_reason_for_call)
   42.13 +	{
   42.14 +	case DLL_PROCESS_ATTACH:
   42.15 +	case DLL_THREAD_ATTACH:
   42.16 +	case DLL_THREAD_DETACH:
   42.17 +	case DLL_PROCESS_DETACH:
   42.18 +		break;
   42.19 +	}
   42.20 +	return TRUE;
   42.21 +}
   42.22 +
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.cpp	Tue Dec 03 18:04:46 2013 +0100
    43.3 @@ -0,0 +1,8 @@
    43.4 +// stdafx.cpp : source file that includes just the standard includes
    43.5 +// OpenSecMgrLog.pch will be the pre-compiled header
    43.6 +// stdafx.obj will contain the pre-compiled type information
    43.7 +
    43.8 +#include "stdafx.h"
    43.9 +
   43.10 +// TODO: reference any additional headers you need in STDAFX.H
   43.11 +// and not in this file
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/stdafx.h	Tue Dec 03 18:04:46 2013 +0100
    44.3 @@ -0,0 +1,16 @@
    44.4 +// stdafx.h : include file for standard system include files,
    44.5 +// or project specific include files that are used frequently, but
    44.6 +// are changed infrequently
    44.7 +//
    44.8 +
    44.9 +#pragma once
   44.10 +
   44.11 +#include "targetver.h"
   44.12 +
   44.13 +#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
   44.14 +// Windows Header Files:
   44.15 +#include <windows.h>
   44.16 +
   44.17 +
   44.18 +
   44.19 +// TODO: reference additional headers your program requires here
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/targetver.h	Tue Dec 03 18:04:46 2013 +0100
    45.3 @@ -0,0 +1,8 @@
    45.4 +#pragma once
    45.5 +
    45.6 +// Including SDKDDKVer.h defines the highest available Windows platform.
    45.7 +
    45.8 +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
    45.9 +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
   45.10 +
   45.11 +#include <SDKDDKVer.h>
    46.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.dll has changed
    47.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.log	Tue Dec 03 18:04:46 2013 +0100
    47.3 @@ -0,0 +1,17 @@
    47.4 +Build started 12/3/2013 2:05:52 PM.
    47.5 +     1>Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" on node 2 (Rebuild target(s)).
    47.6 +     1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(381,5): warning MSB8028: The intermediate directory (x64\Debug\) contains files shared from another project (OpenSecMgrLog.vcxproj).  This can lead to incorrect clean and rebuild behavior.
    47.7 +     1>ClCompile:
    47.8 +         C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D OPENSECMGRLOG_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"x64\Debug\OpenSecUSBEventSvcLog.pch" /Fo"x64\Debug\\" /Fd"x64\Debug\vc120.pdb" /Gd /TP /errorReport:prompt stdafx.cpp
    47.9 +         stdafx.cpp
   47.10 +         C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /Zi /nologo /W3 /WX- /Od /D WIN32 /D _DEBUG /D _WINDOWS /D _USRDLL /D OPENSECMGRLOG_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"x64\Debug\\" /Fd"x64\Debug\vc120.pdb" /Gd /TP /errorReport:prompt dllmain.cpp
   47.11 +         dllmain.cpp
   47.12 +       Link:
   47.13 +         C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.dll" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.lib" /MACHINE:X64 /DLL x64\Debug\dllmain.obj
   47.14 +         x64\Debug\stdafx.obj
   47.15 +         OpenSecMgrLog.vcxproj -> C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\x64\Debug\OpenSecUSBEventSvcLog.dll
   47.16 +     1>Done Building Project "C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\OpenSecMgrLog.vcxproj" (Rebuild target(s)).
   47.17 +
   47.18 +Build succeeded.
   47.19 +
   47.20 +Time Elapsed 00:00:00.95
    48.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.read.1.tlog has changed
    49.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/CL.write.1.tlog has changed
    50.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/OpenSecMgrLog.lastbuildstate	Tue Dec 03 18:04:46 2013 +0100
    50.3 @@ -0,0 +1,2 @@
    50.4 +#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
    50.5 +Debug|x64|C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\|
    51.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/cl.command.1.tlog has changed
    52.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.command.1.tlog has changed
    53.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.read.1.tlog has changed
    54.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecMgrLog.tlog/link.write.1.tlog has changed
    55.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.read.1.tlog has changed
    56.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/CL.write.1.tlog has changed
    57.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/OpenSecUSBEventSvcLog.lastbuildstate	Tue Dec 03 18:04:46 2013 +0100
    57.3 @@ -0,0 +1,2 @@
    57.4 +#TargetFrameworkVersion=v4.0:PlatformToolSet=v120:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit
    57.5 +Debug|x64|C:\Users\BarthaM\Documents\Visual Studio 2010\Projects\OpenSecMgr\OpenSecMgrLog\|
    58.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/cl.command.1.tlog has changed
    59.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.command.1.tlog has changed
    60.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.read.1.tlog has changed
    61.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecU.8A2FCDF0.tlog/link.write.1.tlog has changed
    62.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.2 +++ b/server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.Build.CppClean.log	Tue Dec 03 18:04:46 2013 +0100
    62.3 @@ -0,0 +1,7 @@
    62.4 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\dllmain.obj
    62.5 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\stdafx.obj
    62.6 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\opensecmgrlog.ilk
    62.7 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\opensecmgrlog.pch
    62.8 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\vc120.idb
    62.9 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\opensecmgrlog.pdb
   62.10 +c:\users\bartham\documents\visual studio 2010\projects\opensecmgr\opensecmgrlog\x64\debug\vc120.pdb
    63.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.dll has changed
    64.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.ilk has changed
    65.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pch has changed
    66.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/OpenSecUSBEventSvcLog.pdb has changed
    67.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/dllmain.obj has changed
    68.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/stdafx.obj has changed
    69.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.idb has changed
    70.1 Binary file server/windows/USBEventSvc/OpenSecUSBEventSvcLog/x64/Debug/vc120.pdb has changed
    71.1 Binary file server/windows/USBEventSvc/Release/OpenSecUSBEventSvcLog.dll has changed
    72.1 Binary file server/windows/USBEventSvc/USBEventSvc.opensdf has changed
    73.1 Binary file server/windows/USBEventSvc/USBEventSvc.sdf has changed
    74.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.2 +++ b/server/windows/USBEventSvc/USBEventSvc.sln	Tue Dec 03 18:04:46 2013 +0100
    74.3 @@ -0,0 +1,36 @@
    74.4 +
    74.5 +Microsoft Visual Studio Solution File, Format Version 12.00
    74.6 +# Visual Studio Express 2013 for Windows Desktop
    74.7 +VisualStudioVersion = 12.0.21005.1
    74.8 +MinimumVisualStudioVersion = 10.0.40219.1
    74.9 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenSecUSBEventSvcLog", "OpenSecUSBEventSvcLog\OpenSecUSBEventSvcLog.vcxproj", "{8A2FCDF0-77C7-4423-926D-B36872648B32}"
   74.10 +EndProject
   74.11 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenSecUSBEventSvc", "OpenSecUSBEventSvc\OpenSecUSBEventSvc.vcxproj", "{B54F4A89-7357-4879-AE62-0825AD3E5974}"
   74.12 +EndProject
   74.13 +Global
   74.14 +	GlobalSection(SolutionConfigurationPlatforms) = preSolution
   74.15 +		Debug|Win32 = Debug|Win32
   74.16 +		Debug|x64 = Debug|x64
   74.17 +		Release|Win32 = Release|Win32
   74.18 +		Release|x64 = Release|x64
   74.19 +	EndGlobalSection
   74.20 +	GlobalSection(ProjectConfigurationPlatforms) = postSolution
   74.21 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|Win32.ActiveCfg = Debug|Win32
   74.22 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|Win32.Build.0 = Debug|Win32
   74.23 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|x64.ActiveCfg = Debug|x64
   74.24 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Debug|x64.Build.0 = Debug|x64
   74.25 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|Win32.ActiveCfg = Release|Win32
   74.26 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|Win32.Build.0 = Release|Win32
   74.27 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|x64.ActiveCfg = Release|x64
   74.28 +		{8A2FCDF0-77C7-4423-926D-B36872648B32}.Release|x64.Build.0 = Release|x64
   74.29 +		{B54F4A89-7357-4879-AE62-0825AD3E5974}.Debug|Win32.ActiveCfg = Debug|Win32
   74.30 +		{B54F4A89-7357-4879-AE62-0825AD3E5974}.Debug|Win32.Build.0 = Debug|Win32
   74.31 +		{B54F4A89-7357-4879-AE62-0825AD3E5974}.Debug|x64.ActiveCfg = Debug|Win32
   74.32 +		{B54F4A89-7357-4879-AE62-0825AD3E5974}.Release|Win32.ActiveCfg = Release|Win32
   74.33 +		{B54F4A89-7357-4879-AE62-0825AD3E5974}.Release|Win32.Build.0 = Release|Win32
   74.34 +		{B54F4A89-7357-4879-AE62-0825AD3E5974}.Release|x64.ActiveCfg = Release|Win32
   74.35 +	EndGlobalSection
   74.36 +	GlobalSection(SolutionProperties) = preSolution
   74.37 +		HideSolutionNode = FALSE
   74.38 +	EndGlobalSection
   74.39 +EndGlobal
    75.1 Binary file server/windows/USBEventSvc/USBEventSvc.v12.suo has changed