Changeset 1816 for capture-mod/trunk
- Timestamp:
- 09/20/08 17:13:06 (2 months ago)
- Files:
-
- capture-mod/trunk/CaptureSoapServer.cpp (modified) (8 diffs)
- capture-mod/trunk/CaptureSoapServer.h (modified) (1 diff)
- capture-mod/trunk/capture.wsdl (modified) (5 diffs)
- capture-mod/trunk/captureGSOAP.h (modified) (2 diffs)
- capture-mod/trunk/install/CaptureClient.exe (modified) (previous)
- capture-mod/trunk/install/CaptureFileMonitor.sys (modified) (previous)
- capture-mod/trunk/install/CaptureProcessMonitor.sys (modified) (previous)
- capture-mod/trunk/install/CaptureRegistryMonitor.sys (modified) (previous)
- capture-mod/trunk/install/plugins/Application_ClientConfigManager.dll (modified) (previous)
- capture-mod/trunk/install/plugins/Application_InternetExplorer.dll (modified) (previous)
- capture-mod/trunk/soapC.cpp (modified) (74 diffs)
- capture-mod/trunk/soapClient.cpp (modified) (3 diffs)
- capture-mod/trunk/soapH.h (modified) (26 diffs)
- capture-mod/trunk/soapServer.cpp (modified) (4 diffs)
- capture-mod/trunk/soapStub.h (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
capture-mod/trunk/CaptureSoapServer.cpp
r1778 r1816 14 14 struct soap soap; 15 15 16 std::list<struct ns__reg Event> regList;17 std::list<struct ns__reg Event> regDeallocList;18 std::list<struct ns__ fileEvent> fileList;19 std::list<struct ns__ fileEvent> fileDeallocList;20 std::list<struct ns__ procEvent> procList;21 std::list<struct ns__ procEvent> procDeallocList;16 std::list<struct ns__regkey> regList; 17 std::list<struct ns__regkey> regDeallocList; 18 std::list<struct ns__processFile> fileList; 19 std::list<struct ns__processFile> fileDeallocList; 20 std::list<struct ns__osProcess> procList; 21 std::list<struct ns__osProcess> procDeallocList; 22 22 void dealloc_events(); //For cleaning up when we're done with them 23 23 … … 89 89 90 90 //now begins the arduous process of converting the values into char *s 91 ns__reg Event_t r;92 r. time= (char *)malloc(time.length()+1);93 sprintf(r. time, "%ls", time.c_str());94 95 r.event Type = (char *)malloc(registryEventType.length()+1);96 sprintf(r.event Type, "%ls", registryEventType.c_str());91 ns__regkey_t r; 92 r.created_at = (char *)malloc(time.length()+1); 93 sprintf(r.created_at, "%ls", time.c_str()); 94 95 r.event_type = (char *)malloc(registryEventType.length()+1); 96 sprintf(r.event_type, "%ls", registryEventType.c_str()); 97 97 98 98 char * tmp = (char *)malloc(extra.at(0).length()+1); 99 99 sprintf(tmp, "%ls", extra.at(0).c_str()); 100 r.p rocPID= atoi(tmp);100 r.pid = atoi(tmp); 101 101 free(tmp); 102 102 103 r.proc Name = (char *)malloc(processPath.length()+1);104 sprintf(r.proc Name, "%ls", processPath.c_str());105 106 r. keyName = (char *)malloc(registryEventPath.length()+1);107 sprintf(r. keyName, "%ls", registryEventPath.c_str());108 109 r.value Name = (char *)malloc(extra.at(1).length()+1);110 sprintf(r.value Name, "%ls", extra.at(1).c_str());111 112 r.value Type = (char *)malloc(extra.at(2).length()+1);113 sprintf(r.value Type, "%ls", extra.at(2).c_str());114 115 r.value Data= (char *)malloc(extra.at(3).length()+1);116 sprintf(r.value Data, "%ls", extra.at(3).c_str());103 r.proc_name = (char *)malloc(processPath.length()+1); 104 sprintf(r.proc_name, "%ls", processPath.c_str()); 105 106 r.name = (char *)malloc(registryEventPath.length()+1); 107 sprintf(r.name, "%ls", registryEventPath.c_str()); 108 109 r.value_name = (char *)malloc(extra.at(1).length()+1); 110 sprintf(r.value_name, "%ls", extra.at(1).c_str()); 111 112 r.value_type = (char *)malloc(extra.at(2).length()+1); 113 sprintf(r.value_type, "%ls", extra.at(2).c_str()); 114 115 r.value = (char *)malloc(extra.at(3).length()+1); 116 sprintf(r.value, "%ls", extra.at(3).c_str()); 117 117 118 118 if(debug){ … … 135 135 char debug = 0; 136 136 if(debug) printf("CaptureSoapServer::onFileEvent got an event for time = %ls\n", time.c_str()); 137 ns__ fileEvent_t f;138 f. time= (char *)malloc(time.length()+1);139 sprintf(f. time, "%ls", time.c_str());140 141 f.event Type = (char *)malloc(fileEventType.length()+1);142 sprintf(f.event Type, "%ls", fileEventType.c_str());137 ns__processFile_t f; 138 f.created_at = (char *)malloc(time.length()+1); 139 sprintf(f.created_at, "%ls", time.c_str()); 140 141 f.event_type = (char *)malloc(fileEventType.length()+1); 142 sprintf(f.event_type, "%ls", fileEventType.c_str()); 143 143 144 144 char * tmp = (char *)malloc(extra.at(0).length()+1); 145 145 sprintf(tmp, "%ls", extra.at(0).c_str()); 146 f.p rocPID= atoi(tmp);146 f.pid = atoi(tmp); 147 147 free(tmp); 148 148 149 f.proc Name = (char *)malloc(processPath.length()+1);150 sprintf(f.proc Name, "%ls", processPath.c_str());151 152 f. fileName = (char *)malloc(fileEventPath.length()+1);153 sprintf(f. fileName, "%ls", fileEventPath.c_str());149 f.proc_name = (char *)malloc(processPath.length()+1); 150 sprintf(f.proc_name, "%ls", processPath.c_str()); 151 152 f.name = (char *)malloc(fileEventPath.length()+1); 153 sprintf(f.name, "%ls", fileEventPath.c_str()); 154 154 155 155 if(debug){ … … 170 170 char debug = 0; 171 171 if(debug) printf("CaptureSoapServer::onProcessEvent got an event for time = %ls\n", time.c_str()); 172 ns__ procEvent_t p;173 p. time= (char *)malloc(time.length()+1);174 sprintf(p. time, "%ls", time.c_str());175 176 p.event Type = (char *)malloc(11); //11 == max length == "terminated"172 ns__osProcess_t p; 173 p.created_at = (char *)malloc(time.length()+1); 174 sprintf(p.created_at, "%ls", time.c_str()); 175 176 p.event_type = (char *)malloc(11); //11 == max length == "terminated" 177 177 if(created){ 178 sprintf(p.event Type, "created");178 sprintf(p.event_type, "created"); 179 179 } 180 180 else{ 181 sprintf(p.event Type, "terminated");182 } 183 184 p.parent PID= parentProcessId;185 186 p.parent Name = (char *)malloc(parentProcess.length()+1);187 sprintf(p.parent Name, "%ls", parentProcess.c_str());188 189 p.p rocPID= processId;190 191 p. procName = (char *)malloc(process.length()+1);192 sprintf(p. procName, "%ls", process.c_str());181 sprintf(p.event_type, "terminated"); 182 } 183 184 p.parent_pid = parentProcessId; 185 186 p.parent_name = (char *)malloc(parentProcess.length()+1); 187 sprintf(p.parent_name, "%ls", parentProcess.c_str()); 188 189 p.pid = processId; 190 191 p.name = (char *)malloc(process.length()+1); 192 sprintf(p.name, "%ls", process.c_str()); 193 193 194 194 procList.push_back(p); … … 406 406 407 407 //If maxEventsReturned == -1, then then send as many as possible. 408 int ns__return Events(struct soap *soap, int maxEventsToReturn, struct ns__allEvents &result){408 int ns__returnRegistryEvents(struct soap *soap, int maxEventsToReturn, struct ns__dynRegArray **result){ 409 409 char debug = 1; 410 410 411 struct ns__allEvents * all = soap_new_ns__allEvents(soap, 1);412 all->regEvents = NULL;413 all->fileEvents = NULL;414 all->procEvents = NULL;415 416 411 struct ns__dynRegArray * dRegArray; 412 //Set up a dynamic array for each of the event types 413 dRegArray = soap_new_ns__dynRegArray(soap,1); 414 dRegArray->__ptr = NULL; 415 dRegArray->__size = regList.size(); 416 417 //Figure out how many entries we will send back 418 if(maxEventsToReturn < dRegArray->__size && maxEventsToReturn != -1){ 419 dRegArray->__size = maxEventsToReturn; 420 } 421 if(debug) printf("Sending back %d registy events\n",dRegArray->__size); 422 423 //Allocate a flat array to hold our ns__regkeys in 424 //TODO: see if soap_new_ns__regkey(soap, dRegArray->__size) works 425 struct ns__regkey * ns__regkeyArray = (struct ns__regkey *)soap_malloc(soap, dRegArray->__size*sizeof(struct ns__regkey)); 426 dRegArray->__ptr = ns__regkeyArray; 427 428 for(unsigned int i = 0; i < dRegArray->__size; i++){ 429 if(debug){ 430 printf("i = %d\n", i); 431 // printf("regList.front().time %s, %#x\n", regList.front().time, regList.front().time); 432 // printf("regList.front().eventType %s, %#x\n", regList.front().eventType, regList.front().eventType); 433 // printf("regList.front().procPID %d, %#x\n", regList.front().procPID, regList.front().procPID); 434 // printf("regList.front().procName %s, %#x\n", regList.front().procName, regList.front().procName); 435 int * b = (int *)®List.front(); 436 for(int i = 0; i < 8; i++){ 437 printf("regEvent[%d] = %#x\n", i, b[i]); 438 } 439 } 440 memcpy(&ns__regkeyArray[i],®List.front(), sizeof(struct ns__regkey)); 441 regDeallocList.push_back(regList.front()); //Need to keep track of it to dealloc its elements later 442 regList.pop_front(); 443 } 444 *result = dRegArray; 445 return SOAP_OK; 446 } 447 int ns__returnFileEvents(struct soap *soap, int maxEventsToReturn, struct ns__dynFileArray **result){ 448 char debug = 1; 449 450 struct ns__dynFileArray * dFileArray; 451 dFileArray = soap_new_ns__dynFileArray(soap,1); 452 dFileArray->__ptr = NULL; 453 dFileArray->__size = fileList.size(); 454 printf("SIZE= %d",dFileArray->__size); 455 printf("MAX= %d",maxEventsToReturn); 456 457 //Figure out how many entries we will send back 458 if(maxEventsToReturn < dFileArray->__size && maxEventsToReturn != -1){ 459 dFileArray->__size = maxEventsToReturn; 460 } 461 if(debug) printf("Sending back %d file events\n",dFileArray->__size); 462 463 struct ns__processFile * ns__processFileArray = (struct ns__processFile *)soap_malloc(soap, dFileArray->__size*sizeof(struct ns__processFile)); 464 dFileArray->__ptr = ns__processFileArray; 465 466 for(unsigned int i = 0; i < dFileArray->__size; i++){ 467 memcpy(&ns__processFileArray[i],&fileList.front(), sizeof(struct ns__processFile)); 468 fileDeallocList.push_back(fileList.front()); 469 fileList.pop_front(); 470 } 471 472 *result = dFileArray; 473 return SOAP_OK; 474 } 475 int ns__returnProcessEvents(struct soap *soap, int maxEventsToReturn, struct ns__dynProcArray **result){ 476 char debug = 1; 477 478 struct ns__dynProcArray * dProcArray; 479 dProcArray = soap_new_ns__dynProcArray(soap,1); 480 dProcArray->__ptr = NULL; 481 dProcArray->__size = procList.size(); 482 483 if(maxEventsToReturn < dProcArray->__size && maxEventsToReturn != -1){ 484 dProcArray->__size = maxEventsToReturn; 485 } 486 if(debug) printf("Sending back %d process events\n",dProcArray->__size); 487 488 struct ns__osProcess * ns__osProcessArray = (struct ns__osProcess *)soap_malloc(soap, dProcArray->__size*sizeof(struct ns__osProcess)); 489 dProcArray->__ptr = ns__osProcessArray; 490 491 for(unsigned int i = 0; i < dProcArray->__size; i++){ 492 memcpy(&ns__osProcessArray[i],&procList.front(), sizeof(struct ns__osProcess)); 493 procDeallocList.push_back(procList.front()); 494 procList.pop_front(); 495 } 496 497 *result = dProcArray; 498 return SOAP_OK; 499 } 500 int ns__returnEvents(struct soap *soap, int maxEventsToReturn, ns__allEvents **result){ 501 char debug = 1; 502 503 ns__allEvents * all = soap_new_ns__allEvents(soap, 1); 504 all->regkeys = NULL; 505 all->process_files = NULL; 506 all->os_processes = NULL; 417 507 if(regList.empty() || maxEventsToReturn == 0){ 418 508 printf("No registry events to send back\n"); 419 509 } 420 510 else{ 421 //Set up a dynamic array for each of the event types 422 dRegArray = soap_new_ns__dynRegArray(soap,1); 423 dRegArray->__ptr = NULL; 424 dRegArray->__size = regList.size(); 425 all->regEvents = dRegArray; 426 427 //Figure out how many entries we will send back 428 if(maxEventsToReturn < dRegArray->__size && maxEventsToReturn != -1){ 429 dRegArray->__size = maxEventsToReturn; 430 } 431 if(debug) printf("Sending back %d registy events\n",dRegArray->__size); 432 433 //Allocate a flat array to hold our ns__regEvents in 434 //TODO: see if soap_new_ns__regEvent(soap, dRegArray->__size) works 435 struct ns__regEvent * ns__regEventArray = (struct ns__regEvent *)soap_malloc(soap, dRegArray->__size*sizeof(struct ns__regEvent)); 436 dRegArray->__ptr = ns__regEventArray; 437 438 for(unsigned int i = 0; i < dRegArray->__size; i++){ 439 if(debug){ 440 printf("i = %d\n", i); 441 // printf("regList.front().time %s, %#x\n", regList.front().time, regList.front().time); 442 // printf("regList.front().eventType %s, %#x\n", regList.front().eventType, regList.front().eventType); 443 // printf("regList.front().procPID %d, %#x\n", regList.front().procPID, regList.front().procPID); 444 // printf("regList.front().procName %s, %#x\n", regList.front().procName, regList.front().procName); 445 int * b = (int *)®List.front(); 446 for(int i = 0; i < 8; i++){ 447 printf("regEvent[%d] = %#x\n", i, b[i]); 448 } 449 } 450 memcpy(&ns__regEventArray[i],®List.front(), sizeof(struct ns__regEvent)); 451 regDeallocList.push_back(regList.front()); //Need to keep track of it to dealloc its elements later 452 regList.pop_front(); 453 } 454 } 455 456 struct ns__dynFileArray * dFileArray; 511 ns__returnRegistryEvents(soap,maxEventsToReturn,&all->regkeys); 512 } 457 513 if(fileList.empty() || maxEventsToReturn == 0){ 458 514 printf("No file events to send back\n"); 459 515 } 460 516 else{ 461 dFileArray = soap_new_ns__dynFileArray(soap,1); 462 dFileArray->__ptr = NULL; 463 dFileArray->__size = fileList.size(); 464 all->fileEvents = dFileArray; 465 466 //Figure out how many entries we will send back 467 if(maxEventsToReturn < dFileArray->__size && maxEventsToReturn != -1){ 468 dFileArray->__size = maxEventsToReturn; 469 } 470 if(debug) printf("Sending back %d file events\n",dFileArray->__size); 471 472 struct ns__fileEvent * ns__fileEventArray = (struct ns__fileEvent *)soap_malloc(soap, dFileArray->__size*sizeof(struct ns__fileEvent)); 473 dFileArray->__ptr = ns__fileEventArray; 474 475 for(unsigned int i = 0; i < dFileArray->__size; i++){ 476 memcpy(&ns__fileEventArray[i],&fileList.front(), sizeof(struct ns__fileEvent)); 477 fileDeallocList.push_back(fileList.front()); 478 fileList.pop_front(); 479 } 480 } 481 482 struct ns__dynProcArray * dProcArray; 517 ns__returnFileEvents(soap,maxEventsToReturn,&all->process_files); 518 } 483 519 if(procList.empty() || maxEventsToReturn == 0){ 484 520 printf("No process events to send back\n"); 485 521 } 486 522 else{ 487 dProcArray = soap_new_ns__dynProcArray(soap,1); 488 dProcArray->__ptr = NULL; 489 dProcArray->__size = procList.size(); 490 all->procEvents = dProcArray; 491 492 if(maxEventsToReturn < dProcArray->__size && maxEventsToReturn != -1){ 493 dProcArray->__size = maxEventsToReturn; 494 } 495 if(debug) printf("Sending back %d process events\n",dProcArray->__size); 496 497 struct ns__procEvent * ns__procEventArray = (struct ns__procEvent *)soap_malloc(soap, dProcArray->__size*sizeof(struct ns__procEvent)); 498 dProcArray->__ptr = ns__procEventArray; 499 500 for(unsigned int i = 0; i < dProcArray->__size; i++){ 501 memcpy(&ns__procEventArray[i],&procList.front(), sizeof(struct ns__procEvent)); 502 procDeallocList.push_back(procList.front()); 503 procList.pop_front(); 504 } 505 } 506 507 result = *all; 508 if(debug) printf("all->regEvents = %#x, all->fileEvents = %#x, all->procEvents = %#x\n", all->regEvents, all->fileEvents, all->procEvents); 523 ns__returnProcessEvents(soap,maxEventsToReturn,&all->os_processes); 524 } 525 526 *result = all; 527 if(debug) printf("all->regkeys = %#x, all->process_files = %#x, all->os_processes = %#x\n", all->regkeys, all->process_files, all->os_processes); 509 528 if(debug) printf("regList.size() = %d, fileList.size() = %d, procList.size() = %d\n", regList.size(), fileList.size(), procList.size()); 510 529 … … 517 536 if(!regDeallocList.empty()){ 518 537 for(int i = 0; i < regDeallocList.size(); i++){ 519 free(regDeallocList.front(). time);520 free(regDeallocList.front().event Type);521 free(regDeallocList.front().proc Name);522 free(regDeallocList.front(). keyName);523 free(regDeallocList.front().value Name);524 free(regDeallocList.front().value Type);525 free(regDeallocList.front().value Data);538 free(regDeallocList.front().created_at); 539 free(regDeallocList.front().event_type); 540 free(regDeallocList.front().proc_name); 541 free(regDeallocList.front().name); 542 free(regDeallocList.front().value_name); 543 free(regDeallocList.front().value_type); 544 free(regDeallocList.front().value); 526 545 regDeallocList.pop_front(); 527 546 } … … 530 549 if(!fileDeallocList.empty()){ 531 550 for(int i = 0; i < fileDeallocList.size(); i++){ 532 free(fileDeallocList.front(). time);533 free(fileDeallocList.front().event Type);534 free(fileDeallocList.front().proc Name);535 free(fileDeallocList.front(). fileName);551 free(fileDeallocList.front().created_at); 552 free(fileDeallocList.front().event_type); 553 free(fileDeallocList.front().proc_name); 554 free(fileDeallocList.front().name); 536 555 fileDeallocList.pop_front(); 537 556 } … … 540 559 if(!procDeallocList.empty()){ 541 560 for(int i = 0; i < procDeallocList.size(); i++){ 542 free(procDeallocList.front(). time);543 free(procDeallocList.front().event Type);544 free(procDeallocList.front().parent Name);545 free(procDeallocList.front(). procName);561 free(procDeallocList.front().created_at); 562 free(procDeallocList.front().event_type); 563 free(procDeallocList.front().parent_name); 564 free(procDeallocList.front().name); 546 565 procDeallocList.pop_front(); 547 566 } capture-mod/trunk/CaptureSoapServer.h
r1773 r1816 15 15 //While we could put typedefs in the definition, they don't follow through to the auto-generated 16 16 //soap files. Therefore you would have to include captureGSOAP.h, but that would cause double definitions 17 typedef struct ns__reg Event ns__regEvent_t;18 typedef struct ns__ fileEvent ns__fileEvent_t;19 typedef struct ns__ procEvent ns__procEvent_t;17 typedef struct ns__regkey ns__regkey_t; 18 typedef struct ns__processFile ns__processFile_t; 19 typedef struct ns__osProcess ns__osProcess_t; 20 20 21 21 class CaptureSoapServer : public Runnable capture-mod/trunk/capture.wsdl
r1778 r1816 26 26 attributeFormDefault="unqualified"> 27 27 <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> 28 <complexType name="allEvents"> 29 <complexContent> 30 <restriction base="ns:a1"> 31 </restriction> 32 </complexContent> 33 </complexType> 28 34 <complexType name="receiveFileStruct"> 29 35 <complexContent> … … 32 38 </complexContent> 33 39 </complexType> 34 <complexType name="reg Event">35 <sequence> 36 <element name=" time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>37 <element name="event Type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>38 <element name="p rocPID" type="xsd:int" minOccurs="1" maxOccurs="1"/>39 <element name="proc Name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>40 <element name=" keyName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>41 <element name="value Name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>42 <element name="value Type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>43 <element name="value Data" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>44 </sequence> 45 </complexType> 46 <complexType name=" fileEvent">47 <sequence> 48 <element name=" time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>49 <element name="event Type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>50 <element name="p rocPID" type="xsd:int" minOccurs="1" maxOccurs="1"/>51 <element name="proc Name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>52 <element name=" fileName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>53 </sequence> 54 </complexType> 55 <complexType name=" procEvent">56 <sequence> 57 <element name=" time" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>58 <element name="event Type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>59 <element name="parent PID" type="xsd:int" minOccurs="1" maxOccurs="1"/>60 <element name="parent Name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>61 <element name="p rocPID" type="xsd:int" minOccurs="1" maxOccurs="1"/>62 <element name=" procName" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>40 <complexType name="regkey"> 41 <sequence> 42 <element name="created-at" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 43 <element name="event-type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 44 <element name="pid" type="xsd:int" minOccurs="1" maxOccurs="1"/> 45 <element name="proc-name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 46 <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 47 <element name="value-name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 48 <element name="value-type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 49 <element name="value" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 50 </sequence> 51 </complexType> 52 <complexType name="processFile"> 53 <sequence> 54 <element name="created-at" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 55 <element name="event-type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 56 <element name="pid" type="xsd:int" minOccurs="1" maxOccurs="1"/> 57 <element name="proc-name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 58 <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 59 </sequence> 60 </complexType> 61 <complexType name="osProcess"> 62 <sequence> 63 <element name="created-at" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 64 <element name="event-type" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 65 <element name="parent-pid" type="xsd:int" minOccurs="1" maxOccurs="1"/> 66 <element name="parent-name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 67 <element name="pid" type="xsd:int" minOccurs="1" maxOccurs="1"/> 68 <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/> 63 69 </sequence> 64 70 </complexType> 65 71 <complexType name="dynRegArray"> 66 72 <sequence> 67 <element name="item" type="ns:reg Event" minOccurs="0" maxOccurs="unbounded" nillable="true"/>73 <element name="item" type="ns:regkey" minOccurs="0" maxOccurs="unbounded" nillable="true"/> 68 74 </sequence> 69 75 </complexType> 70 76 <complexType name="dynFileArray"> 71 77 <sequence> 72 <element name="item" type="ns: fileEvent" minOccurs="0" maxOccurs="unbounded" nillable="true"/>78 <element name="item" type="ns:processFile" minOccurs="0" maxOccurs="unbounded" nillable="true"/> 73 79 </sequence> 74 80 </complexType> 75 81 <complexType name="dynProcArray"> 76 82 <sequence> 77 <element name="item" type="ns:procEvent" minOccurs="0" maxOccurs="unbounded" nillable="true"/> 83 <element name="item" type="ns:osProcess" minOccurs="0" maxOccurs="unbounded" nillable="true"/> 84 </sequence> 85 </complexType> 86 <complexType name="a1"> 87 <sequence> 88 <element name="regkeys" type="ns:dynRegArray" minOccurs="0" maxOccurs="1" nillable="true"/> 89 <element name="process-files" type="ns:dynFileArray" minOccurs="0" maxOccurs="1" nillable="true"/> 90 <element name="os-processes" type="ns:dynProcArray" minOccurs="0" maxOccurs="1" nillable="true"/> 78 91 </sequence> 79 92 </complexType> … … 135 148 </message> 136 149 137 <message name="return Events">150 <message name="returnRegistryEventsRequest"> 138 151 <part name="maxEventsToReturn" type="xsd:int"/> 139 152 </message> 140 153 141 <message name="allEvents"> 142 <part name="regEvents" type="ns:dynRegArray"/> 143 <part name="fileEvents" type="ns:dynFileArray"/> 144 <part name="procEvents" type="ns:dynProcArray"/> 154 <message name="returnRegistryEventsResponse"> 155 <part name="result" type="ns:dynRegArray"/> 156 </message> 157 158 <message name="returnFileEventsRequest"> 159 <part name="maxEventsToReturn" type="xsd:int"/> 160 </message> 161 162 <message name="returnFileEventsResponse"> 163 <part name="result" type="ns:dynFileArray"/> 164 </message> 165 166 <message name="returnProcessEventsRequest"> 167 <part name="maxEventsToReturn" type="xsd:int"/> 168 </message> 169 170 <message name="returnProcessEventsResponse"> 171 <part name="result" type="ns:dynProcArray"/> 172 </message> 173 174 <message name="returnEventsRequest"> 175 <part name="maxEventsToReturn" type="xsd:int"/> 176 </message> 177 178 <message name="returnEventsResponse"> 179 <part name="result" type="ns:allEvents"/> 145 180 </message> 146 181 … … 179 214 <output message="tns:openDocumentResponse"/> 180 215 </operation> 216 <operation name="returnRegistryEvents"> 217 <documentation>Service definition of function ns__returnRegistryEvents</documentation> 218 <input message="tns:returnRegistryEventsRequest"/> 219 <output message="tns:returnRegistryEventsResponse"/> 220 </operation> 221 <operation name="returnFileEvents"> 222 <documentation>Service definition of function ns__returnFileEvents</documentation> 223 <input message="tns:returnFileEventsRequest"/> 224 <output message="tns:returnFileEventsResponse"/> 225 </operation> 226 <operation name="returnProcessEvents"> 227 <documentation>Service definition of function ns__returnProcessEvents</documentation> 228 <input message="tns:returnProcessEventsRequest"/> 229 <output message="tns:returnProcessEventsResponse"/> 230 </operation> 181 231 <operation name="returnEvents"> 182 232 <documentation>Service definition of function ns__returnEvents</documentation> 183 <input message="tns:returnEvents "/>184 <output message="tns: allEvents"/>233 <input message="tns:returnEventsRequest"/> 234 <output message="tns:returnEventsResponse"/> 185 235 </operation> 186 236 <operation name="sendMIME"> … … 230 280 </operation> 231 281 <operation name="openDocument"> 282 <SOAP:operation style="rpc" soapAction=""/> 283 <input> 284 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 285 </input> 286 <output> 287 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 288 </output> 289 </operation> 290 <operation name="returnRegistryEvents"> 291 <SOAP:operation style="rpc" soapAction=""/> 292 <input> 293 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 294 </input> 295 <output> 296 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 297 </output> 298 </operation> 299 <operation name="returnFileEvents"> 300 <SOAP:operation style="rpc" soapAction=""/> 301 <input> 302 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 303 </input> 304 <output> 305 <SOAP:body use="encoded" namespace="capture" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 306 </output> 307 </operation> 308 <operation name="returnProcessEvents"> 232 309 <SOAP:operation style="rpc" soapAction=""/> 233 310 <input> capture-mod/trunk/captureGSOAP.h
r1778 r1816 14 14 15 15 //Just using similar to previous perl names 16 struct ns__reg Event{17 char * time;18 char * event Type;19 int p rocPID;20 char * proc Name;21 char * keyName;22 char * value Name;23 char * value Type;24 char * value Data;16 struct ns__regkey{ 17 char * created_at; 18 char * event_type; 19 int pid; 20 char * proc_name; 21 char * name; 22 char * value_name; 23 char * value_type; 24 char * value; 25 25 }; 26 26 27 struct ns__ fileEvent{28 char * time;29 char * event Type;30 int p rocPID;31 char * proc Name;32 char * fileName;27 struct ns__processFile{ 28 char * created_at; 29 char * event_type; 30 int pid; 31 char * proc_name; 32 char * name; 33 33 }; 34 34 35 struct ns__ procEvent{36 char * time;37 char * event Type;38 int parent PID;39 char * parent Name;40 int p rocPID;41 char * procName;35 struct ns__osProcess{ 36 char * created_at; 37 char * event_type; 38 int parent_pid; 39 char * parent_name; 40 int pid; 41 char * name; 42 42 }; 43 43 44 44 45 45 struct ns__dynRegArray{ 46 struct ns__reg Event* __ptr;46 struct ns__regkey * __ptr; 47 47 int __size; //number of elements, not total size 48 48 }; 49 49 50 50 struct ns__dynFileArray{ 51 struct ns__ fileEvent* __ptr;51 struct ns__processFile * __ptr; 52 52 int __size; //number of elements, not total size 53 53 }; 54 54 55 55 struct ns__dynProcArray{ 56 struct ns__ procEvent* __ptr;56 struct ns__osProcess * __ptr; 57 57 int __size; //number of elements, not total size 58 58 }; 59 59 60 struct ns__allEvents{61 struct ns__dynRegArray * reg Events;62 struct ns__dynFileArray * fileEvents;63 struct ns__dynProcArray * procEvents;64 } ;60 typedef struct a1{ 61 struct ns__dynRegArray * regkeys; 62 struct ns__dynFileArray * process_files; 63 struct ns__dynProcArray * os_processes; 64 } ns__allEvents; 65 65 66 66 //A poor substitute for MIME, but it works … … 76 76 int ns__receiveFileBase64(char * fileName, ns__receiveFileStruct &result); 77 77 int ns__openDocument(char * fileName, int waitTimeMillisec, int &result); 78 int ns__returnEvents(int maxEventsToReturn, struct ns__allEvents &result); 78 int ns__returnRegistryEvents(int maxEventsToReturn, struct ns__dynRegArray **result); 79 int ns__returnFileEvents(int maxEventsToReturn, struct ns__dynFileArray **result); 80 int ns__returnProcessEvents(int maxEventsToReturn, struct ns__dynProcArray **result); 81 int ns__returnEvents(int maxEventsToReturn, ns__allEvents **result); 79 82 80 83 //Not working, see definition comments capture-mod/trunk/soapC.cpp
r1778 r1816 8 8 #include "soapH.h" 9 9 10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-0 8-29 08:41:22 GMT")10 SOAP_SOURCE_STAMP("@(#) soapC.cpp ver 2.7.10 2008-09-17 18:29:42 GMT") 11 11 12 12 … … 168 168 case SOAP_TYPE_ns__returnEvents: 169 169 return soap_in_ns__returnEvents(soap, NULL, NULL, "ns:returnEvents"); 170 case SOAP_TYPE_ns__returnEventsResponse: 171 return soap_in_ns__returnEventsResponse(soap, NULL, NULL, "ns:returnEventsResponse"); 172 case SOAP_TYPE_ns__returnProcessEvents: 173 return soap_in_ns__returnProcessEvents(soap, NULL, NULL, "ns:returnProcessEvents"); 174 case SOAP_TYPE_ns__returnProcessEventsResponse: 175 return soap_in_ns__returnProcessEventsResponse(soap, NULL, NULL, "ns:returnProcessEventsResponse"); 176 case SOAP_TYPE_ns__returnFileEvents: 177 return soap_in_ns__returnFileEvents(soap, NULL, NULL, "ns:returnFileEvents"); 178 case SOAP_TYPE_ns__returnFileEventsResponse: 179 return soap_in_ns__returnFileEventsResponse(soap, NULL, NULL, "ns:returnFileEventsResponse"); 180 case SOAP_TYPE_ns__returnRegistryEvents: 181 return soap_in_ns__returnRegistryEvents(soap, NULL, NULL, "ns:returnRegistryEvents"); 182 case SOAP_TYPE_ns__returnRegistryEventsResponse: 183 return soap_in_ns__returnRegistryEventsResponse(soap, NULL, NULL, "ns:returnRegistryEventsResponse"); 170 184 case SOAP_TYPE_ns__openDocument: 171 185 return soap_in_ns__openDocument(soap, NULL, NULL, "ns:openDocument"); … … 192 206 case SOAP_TYPE_ns__allEvents: 193 207 return soap_in_ns__allEvents(soap, NULL, NULL, "ns:allEvents"); 208 case SOAP_TYPE_a1: 209 return soap_in_a1(soap, NULL, NULL, "a1"); 194 210 case SOAP_TYPE_ns__dynProcArray: 195 211 return soap_in_ns__dynProcArray(soap, NULL, NULL, "ns:dynProcArray"); … … 198 214 case SOAP_TYPE_ns__dynRegArray: 199 215 return soap_in_ns__dynRegArray(soap, NULL, NULL, "ns:dynRegArray"); 200 case SOAP_TYPE_ns__procEvent: 201 return soap_in_ns__procEvent(soap, NULL, NULL, "ns:procEvent"); 202 case SOAP_TYPE_ns__fileEvent: 203 return soap_in_ns__fileEvent(soap, NULL, NULL, "ns:fileEvent"); 204 case SOAP_TYPE_ns__regEvent: 205 return soap_in_ns__regEvent(soap, NULL, NULL, "ns:regEvent"); 216 case SOAP_TYPE_ns__osProcess: 217 return soap_in_ns__osProcess(soap, NULL, NULL, "ns:osProcess"); 218 case SOAP_TYPE_ns__processFile: 219 return soap_in_ns__processFile(soap, NULL, NULL, "ns:processFile"); 220 case SOAP_TYPE_ns__regkey: 221 return soap_in_ns__regkey(soap, NULL, NULL, "ns:regkey"); 222 case SOAP_TYPE_PointerToPointerTons__allEvents: 223 return soap_in_PointerToPointerTons__allEvents(soap, NULL, NULL, "ns:allEvents"); 224 case SOAP_TYPE_PointerTons__allEvents: 225 return soap_in_PointerTons__allEvents(soap, NULL, NULL, "ns:allEvents"); 226 case SOAP_TYPE_PointerToPointerTons__dynProcArray: 227 return soap_in_PointerToPointerTons__dynProcArray(soap, NULL, NULL, "ns:dynProcArray"); 228 case SOAP_TYPE_PointerToPointerTons__dynFileArray: 229 return soap_in_PointerToPointerTons__dynFileArray(soap, NULL, NULL, "ns:dynFileArray"); 230 case SOAP_TYPE_PointerToPointerTons__dynRegArray: 231 return soap_in_PointerToPointerTons__dynRegArray(soap, NULL, NULL, "ns:dynRegArray"); 206 232 case SOAP_TYPE_PointerTostring: 207 233 return soap_in_PointerTostring(soap, NULL, NULL, "xsd:string"); … … 212 238 case SOAP_TYPE_PointerTons__dynRegArray: 213 239 return soap_in_PointerTons__dynRegArray(soap, NULL, NULL, "ns:dynRegArray"); 214 case SOAP_TYPE_PointerTons__ procEvent:215 return soap_in_PointerTons__ procEvent(soap, NULL, NULL, "ns:procEvent");216 case SOAP_TYPE_PointerTons__ fileEvent:217 return soap_in_PointerTons__ fileEvent(soap, NULL, NULL, "ns:fileEvent");218 case SOAP_TYPE_PointerTons__reg Event:219 return soap_in_PointerTons__reg Event(soap, NULL, NULL, "ns:regEvent");240 case SOAP_TYPE_PointerTons__osProcess: 241 return soap_in_PointerTons__osProcess(soap, NULL, NULL, "ns:osProcess"); 242 case SOAP_TYPE_PointerTons__processFile: 243 return soap_in_PointerTons__processFile(soap, NULL, NULL, "ns:processFile"); 244 case SOAP_TYPE_PointerTons__regkey: 245 return soap_in_PointerTons__regkey(soap, NULL, NULL, "ns:regkey"); 220 246 case SOAP_TYPE_string: 221 247 { char **s; … … 251 277 return soap_in_ns__returnEvents(soap, NULL, NULL, NULL); 252 278 } 279 if (!soap_match_tag(soap, t, "ns:returnEventsResponse")) 280 { *type = SOAP_TYPE_ns__returnEventsResponse; 281 return soap_in_ns__returnEventsResponse(soap, NULL, NULL, NULL); 282 } 283 if (!soap_match_tag(soap, t, "ns:returnProcessEvents")) 284 { *type = SOAP_TYPE_ns__returnProcessEvents; 285 return soap_in_ns__returnProcessEvents(soap, NULL, NULL, NULL); 286 } 287 if (!soap_match_tag(soap, t, "ns:returnProcessEventsResponse")) 288 { *type = SOAP_TYPE_ns__returnProcessEventsResponse; 289 return soap_in_ns__returnProcessEventsResponse(soap, NULL, NULL, NULL); 290 } 291 if (!soap_match_tag(soap, t, "ns:returnFileEvents")) 292 { *type = SOAP_TYPE_ns__returnFileEvents; 293 return soap_in_ns__returnFileEvents(soap, NULL, NULL, NULL); 294 } 295 if (!soap_match_tag(soap, t, "ns:returnFileEventsResponse")) 296 { *type = SOAP_TYPE_ns__returnFileEventsResponse; 297 return soap_in_ns__returnFileEventsResponse(soap, NULL, NULL, NULL); 298 } 299 if (!soap_match_tag(soap, t, "ns:returnRegistryEvents")) 300 { *type = SOAP_TYPE_ns__returnRegistryEvents; 301 return soap_in_ns__returnRegistryEvents(soap, NULL, NULL, NULL); 302 } 303 if (!soap_match_tag(soap, t, "ns:returnRegistryEventsResponse")) 304 { *type = SOAP_TYPE_ns__returnRegistryEventsResponse; 305 return soap_in_ns__returnRegistryEventsResponse(soap, NULL, NULL, NULL); 306 } 253 307 if (!soap_match_tag(soap, t, "ns:openDocument")) 254 308 { *type = SOAP_TYPE_ns__openDocument; … … 299 353 return soap_in_ns__allEvents(soap, NULL, NULL, NULL); 300 354 } 355 if (!soap_match_tag(soap, t, "a1")) 356 { *type = SOAP_TYPE_a1; 357 return soap_in_a1(soap, NULL, NULL, NULL); 358 } 301 359 if (!soap_match_tag(soap, t, "ns:dynProcArray")) 302 360 { *type = SOAP_TYPE_ns__dynProcArray; … … 311 369 return soap_in_ns__dynRegArray(soap, NULL, NULL, NULL); 312 370 } 313 if (!soap_match_tag(soap, t, "ns: procEvent"))314 { *type = SOAP_TYPE_ns__ procEvent;315 return soap_in_ns__ procEvent(soap, NULL, NULL, NULL);316 } 317 if (!soap_match_tag(soap, t, "ns: fileEvent"))318 { *type = SOAP_TYPE_ns__ fileEvent;319 return soap_in_ns__ fileEvent(soap, NULL, NULL, NULL);320 } 321 if (!soap_match_tag(soap, t, "ns:reg Event"))322 { *type = SOAP_TYPE_ns__reg Event;323 return soap_in_ns__reg Event(soap, NULL, NULL, NULL);371 if (!soap_match_tag(soap, t, "ns:osProcess")) 372 { *type = SOAP_TYPE_ns__osProcess; 373 return soap_in_ns__osProcess(soap, NULL, NULL, NULL); 374 } 375 if (!soap_match_tag(soap, t, "ns:processFile")) 376 { *type = SOAP_TYPE_ns__processFile; 377 return soap_in_ns__processFile(soap, NULL, NULL, NULL); 378 } 379 if (!soap_match_tag(soap, t, "ns:regkey")) 380 { *type = SOAP_TYPE_ns__regkey; 381 return soap_in_ns__regkey(soap, NULL, NULL, NULL); 324 382 } 325 383 if (!soap_match_tag(soap, t, "xsd:string")) … … 413 471 case SOAP_TYPE_ns__returnEvents: 414 472 return soap_out_ns__returnEvents(soap, tag, id, (const struct ns__returnEvents *)ptr, "ns:returnEvents"); 473 case SOAP_TYPE_ns__returnEventsResponse: 474 return soap_out_ns__returnEventsResponse(soap, tag, id, (const struct ns__returnEventsResponse *)ptr, "ns:returnEventsResponse"); 475 case SOAP_TYPE_ns__returnProcessEvents: 476 return soap_out_ns__returnProcessEvents(soap, tag, id, (const struct ns__returnProcessEvents *)ptr, "ns:returnProcessEvents"); 477 case SOAP_TYPE_ns__returnProcessEventsResponse: 478 return soap_out_ns__returnProcessEventsResponse(soap, tag, id, (const struct ns__returnProcessEventsResponse *)ptr, "ns:returnProcessEventsResponse"); 479 case SOAP_TYPE_ns__returnFileEvents: 480 return soap_out_ns__returnFileEvents(soap, tag, id, (const struct ns__returnFileEvents *)ptr, "ns:returnFileEvents"); 481 case SOAP_TYPE_ns__returnFileEventsResponse: 482 return soap_out_ns__returnFileEventsResponse(soap, tag, id, (const struct ns__returnFileEventsResponse *)ptr, "ns:returnFileEventsResponse"); 483 case SOAP_TYPE_ns__returnRegistryEvents: 484 return soap_out_ns__returnRegistryEvents(soap, tag, id, (const struct ns__returnRegistryEvents *)ptr, "ns:returnRegistryEvents"); 485 case SOAP_TYPE_ns__returnRegistryEventsResponse: 486 return soap_out_ns__returnRegistryEventsResponse(soap, tag, id, (const struct ns__returnRegistryEventsResponse *)ptr, "ns:returnRegistryEventsResponse"); 415 487 case SOAP_TYPE_ns__openDocument: 416 488 return soap_out_ns__openDocument(soap, tag, id, (const struct ns__openDocument *)ptr, "ns:openDocument"); … … 436 508 return soap_out_s1(soap, tag, id, (const struct s1 *)ptr, "s1"); 437 509 case SOAP_TYPE_ns__allEvents: 438 return soap_out_ns__allEvents(soap, tag, id, (const struct ns__allEvents *)ptr, "ns:allEvents"); 510 return soap_out_ns__allEvents(soap, tag, id, (const struct a1 *)ptr, "ns:allEvents"); 511 case SOAP_TYPE_a1: 512 return soap_out_a1(soap, tag, id, (const struct a1 *)ptr, "a1"); 439 513 case SOAP_TYPE_ns__dynProcArray: 440 514 return soap_out_ns__dynProcArray(soap, tag, id, (const struct ns__dynProcArray *)ptr, "ns:dynProcArray"); … … 443 517 case SOAP_TYPE_ns__dynRegArray: 444 518 return soap_out_ns__dynRegArray(soap, tag, id, (const struct ns__dynRegArray *)ptr, "ns:dynRegArray"); 445 case SOAP_TYPE_ns__procEvent: 446 return soap_out_ns__procEvent(soap, tag, id, (const struct ns__procEvent *)ptr, "ns:procEvent"); 447 case SOAP_TYPE_ns__fileEvent: 448 return soap_out_ns__fileEvent(soap, tag, id, (const struct ns__fileEvent *)ptr, "ns:fileEvent"); 449 case SOAP_TYPE_ns__regEvent: 450 return soap_out_ns__regEvent(soap, tag, id, (const struct ns__regEvent *)ptr, "ns:regEvent"); 519 case SOAP_TYPE_ns__osProcess: 520 return soap_out_ns__osProcess(soap, tag, id, (const struct ns__osProcess *)ptr, "ns:osProcess"); 521 case SOAP_TYPE_ns__processFile: 522 return soap_out_ns__processFile(soap, tag, id, (const struct ns__processFile *)ptr, "ns:processFile"); 523 case SOAP_TYPE_ns__regkey: 524 return soap_out_ns__regkey(soap, tag, id, (const struct ns__regkey *)ptr, "ns:regkey"); 525 case SOAP_TYPE_PointerToPointerTons__
