Ejemplo n.º 1
0
void dump_active() {
   if ( inpacket == 0 && intr_flag == 2 ) {
      end_all_sessions();
      cxtbuffer_write();
      intr_flag = 0;
   } else {
      intr_flag = 2;
   }
}
Ejemplo n.º 2
0
void game_over() {
   if ( inpacket == 0 ) {
      end_all_sessions();
      cxtbuffer_write();
      if (dev != NULL && strlen(dev) > 0)
          free(dev);
      //printf("    cxt_alloc: %lu\n",cxt_alloc);
      //printf("    cxt_free : %lu\n",cxt_free);
      exit_clean(0);
   }
   intr_flag = 1;
}
Ejemplo n.º 3
0
void game_over()
{
    if (config.inpacket == 0) {
        expire_all_dns_records();
        print_pdns_stats();
        if (config.handle != NULL) pcap_close(config.handle);
        config.handle = NULL;
        end_all_sessions();
        free_config();
        olog("\n[*] passivedns ended.\n");
        exit(0);
    }
    config.intr_flag |= INTERRUPT_END;
}
Ejemplo n.º 4
0
void game_over()
{
    if (config.inpacket == 0) {
        expire_all_dns_records();
        print_pdns_stats();
        if (config.handle != NULL) pcap_close(config.handle);
        config.handle = NULL;
#ifdef HAVE_PFRING
        if (config.use_pfring && config.pfhandle != NULL) {
            pfring_breakloop(config.pfhandle);
            pfring_close(config.pfhandle);
        }
#endif /* HAVE_PFRING */
        end_all_sessions();
        if (config.logfile_fd != NULL && config.logfile_fd != stdout)
            fclose(config.logfile_fd);
        if (config.logfile_nxd_fd != NULL && config.logfile_nxd_fd != stdout)
            fclose(config.logfile_nxd_fd);
        free_config();
        olog("\n[*] passivedns ended.\n");
        exit(0);
    }
    config.intr_flag |= INTERRUPT_END;
}