Example #1
0
 public static function import($location)
 {
     $instance = new self();
     $instance->connectToDatabase();
     $instance->location = $location;
     // Fix pcap file if it needs to be repaired
     $instance->fixCap();
     // Analyze pcap file and extract info from it
     $instance->analyzeCap();
     // Insert record into DB
     $instance->addToDB();
     // Generate attack records
     $instance->generateAttackRecords();
     return $instance;
 }