Example #1
0
 public static void AnalyzeReceived(Packet packet, ConnectionClientEx client)
 {
     _client = client;
     switch (packet.Type)
     {
         case PacketType.ANS_VM_START:       OnReceiveVmStart(packet.GetParameters()); break;
         case PacketType.ANS_VM_STOP:        OnReceiveVmStop(packet.GetParameters()); break;
         case PacketType.ANS_VM_STATUS:      OnReceiveVmStatus(packet.GetParameters()); break;
         case PacketType.ANS_VM_CREATE:      OnReceiveVmCreate(packet.GetParameters()); break;
         case PacketType.ANS_LOAD_MALWARE:   OnReceiveMalwareLoad(packet.GetParameters()); break;
         case PacketType.ANS_SET_TARGET:     OnReceiveSetTarget(packet.GetParameters()); break;
         case PacketType.ANS_REPORT:         OnReceiveReport(packet.GetParameters()); break;
         case PacketType.ANS_SET_OBJECT:     OnReceiveSetObject(packet.GetParameters()); break;
         case PacketType.ANS_VM_READY:       OnReceiveVmReady(packet.GetParameters()); break;
         case PacketType.ANS_VM_COMPLETE:    OnReceiveVmComplete(packet.GetParameters()); break;
         case PacketType.ANS_LOAD_TRAFFIC:   OnReceiveLoadTraffic(packet.GetParameters()); break;
         case PacketType.ANS_VM_NEWCREATE: OnReceiveVmCreateEvent(packet.GetParameters()); break;
     }
 }