Changeset 1766
- Timestamp:
- 08/25/08 17:12:22 (3 months ago)
- Files:
-
- capture-mod/trunk/Analyzer.cpp (modified) (1 diff)
- capture-mod/trunk/Analyzer.h (modified) (1 diff)
- capture-mod/trunk/CaptureClient.cpp (modified) (1 diff)
- capture-mod/trunk/CaptureSoapServer.cpp (modified) (4 diffs)
- capture-mod/trunk/CaptureSoapServer.h (modified) (2 diffs)
- capture-mod/trunk/install/CaptureBAT.exe (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
capture-mod/trunk/Analyzer.cpp
r1765 r1766 1 1 #include "Analyzer.h" 2 2 3 Analyzer::Analyzer(Visitor* v, Server* s, ProcessMonitor * p, RegistryMonitor * r, FileMonitor * f)3 Analyzer::Analyzer(Visitor* v, Server* s, RegistryMonitor * r, FileMonitor * f, ProcessMonitor * p) 4 4 { 5 5 processMonitor = p; capture-mod/trunk/Analyzer.h
r1765 r1766 56 56 { 57 57 public: 58 Analyzer(Visitor* v, Server* s, ProcessMonitor * p, RegistryMonitor * r, FileMonitor * f);58 Analyzer(Visitor* v, Server* s, RegistryMonitor * r, FileMonitor * f, ProcessMonitor * p); 59 59 ~Analyzer(void); 60 60 capture-mod/trunk/CaptureClient.cpp
r1765 r1766 66 66 FileMonitor * f = new FileMonitor(); 67 67 //Set up the standalone SOAP server 68 soapSrv = new CaptureSoapServer(visitor, r );69 analyzer = new Analyzer(visitor, server, p, r, f);68 soapSrv = new CaptureSoapServer(visitor, r, f, p); 69 analyzer = new Analyzer(visitor, server, r, f, p); 70 70 Thread* captureClientThread = new Thread(this); 71 71 captureClientThread->start("CaptureClient"); capture-mod/trunk/CaptureSoapServer.cpp
r1765 r1766 11 11 struct soap soap; 12 12 13 CaptureSoapServer::CaptureSoapServer(Visitor* v, RegistryMonitor * r){13 CaptureSoapServer::CaptureSoapServer(Visitor* v, RegistryMonitor * r, FileMonitor * f, ProcessMonitor * p){ 14 14 registryMonitor = r; 15 fileMonitor = f; 16 processMonitor = p; 15 17 CaptureSoapServerThread = new Thread(this); 16 18 CaptureSoapServerThread->start("CaptureSoapServer"); … … 18 20 19 21 CaptureSoapServer::~CaptureSoapServer(){ 20 //FIXME: I have no idea if these are appropriate here 22 //FIXME: I have no idea if these are appropriate here. Also need to find the correct way to cleanly shut down 23 //so that it doesn't output a connection error at the end. 21 24 soap_destroy(&soap); 22 25 soap_end(&soap); … … 30 33 SOCKET m, s; // master and slave sockets 31 34 32 onRegistryEventConnection = registryMonitor->connect_onRegistryEvent(boost::bind(&CaptureSoapServer::onRegistryEvent, this, _1, _2, _3, _4, _5)); 35 onProcessEventConnection = processMonitor->connect_onProcessEvent(boost::bind(&CaptureSoapServer::onProcessEvent, this, _1, _2, _3, _4, _5, _6)); 36 onRegistryEventConnection = registryMonitor->connect_onRegistryEvent(boost::bind(&CaptureSoapServer::onRegistryEvent, this, _1, _2, _3, _4, _5)); 37 onFileEventConnection = fileMonitor->connect_onFileEvent(boost::bind(&CaptureSoapServer::onFileEvent, this, _1, _2, _3, _4, _5)); 33 38 34 39 //The below code is taken mostly from the gsoap standalone server example page … … 61 66 } 62 67 68 void CaptureSoapServer::onProcessEvent(BOOLEAN created, wstring time, 69 DWORD parentProcessId, wstring parentProcess, 70 DWORD processId, wstring process) 71 { 72 printf("CaptureSoapServer::onProcessEvent got an event for time = %ls\n", time.c_str()); 73 } 74 63 75 void CaptureSoapServer::onRegistryEvent (wstring registryEventType, wstring time, 64 76 wstring processPath, wstring registryEventPath, 65 77 vector<wstring> extra) 66 78 { 67 wprintf(L"CaptureSoapServer::onRegistryEvent got an event for time = %hs\n", time); 68 } 69 79 printf("CaptureSoapServer::onRegistryEvent got an event for time = %ls\n", time.c_str()); 80 } 81 82 void CaptureSoapServer::onFileEvent(wstring fileEventType, wstring time, 83 wstring processPath, wstring fileEventPath, 84 vector<wstring> extra) 85 { 86 printf("CaptureSoapServer::onFileEvent got an event for time = %ls\n", time.c_str()); 87 } 70 88 71 89 int ns__ping(struct soap *soap, char * a, char ** result) capture-mod/trunk/CaptureSoapServer.h
r1765 r1766 7 7 #include "Visitor.h" 8 8 #include "RegistryMonitor.h" 9 #include "FileMonitor.h" 10 #include "ProcessMonitor.h" 9 11 10 12 using namespace std; … … 16 18 typedef boost::signal<void (DWORD, DWORD, wstring, wstring)> signal_visitEvent; 17 19 boost::signals::connection onRegistryEventConnection; 20 boost::signals::connection onFileEventConnection; 21 boost::signals::connection onProcessEventConnection; 18 22 19 CaptureSoapServer(Visitor *, RegistryMonitor * );23 CaptureSoapServer(Visitor *, RegistryMonitor * r, FileMonitor * f, ProcessMonitor * p); 20 24 ~CaptureSoapServer(); 21 25 void run(); 22 void onRegistryEvent (wstring registryEventType, wstring time, wstring processPath,26 void onRegistryEvent(wstring registryEventType, wstring time, wstring processPath, 23 27 wstring registryEventPath, vector<wstring> extra); 28 void onFileEvent(wstring fileEventType, wstring time, wstring processPath, wstring fileEventPath, 29 vector<wstring> extra); 30 void onProcessEvent(BOOLEAN created, wstring time, DWORD parentProcessId, wstring parentProcess, 31 DWORD processId, wstring process); 24 32 25 33 Thread * CaptureSoapServerThread; 26 34 static Visitor * myVisitor; 27 35 RegistryMonitor* registryMonitor; 36 FileMonitor * fileMonitor; 37 ProcessMonitor * processMonitor; 28 38 };
