コード例 #1
0
ファイル: ec_sniff_unified.c プロジェクト: ASSmodeus/dsploit
/*
 * kill the capturing threads, but leave untouched the others
 */
void stop_unified_sniff(void)
{
   pthread_t pid;
   
   DEBUG_MSG("stop_unified_sniff");
   
   if (GBL_SNIFF->active == 0) {
      USER_MSG("Unified sniffing is not running...\n");
      return;
   }
  
   /* get the pid and kill it */
   pid = ec_thread_getpid("capture");
   if (!pthread_equal(pid, EC_PTHREAD_NULL))
      ec_thread_destroy(pid);
   
   pid = ec_thread_getpid("sslwrap");
   if (!pthread_equal(pid, EC_PTHREAD_NULL))
      ec_thread_destroy(pid);

   USER_MSG("Unified sniffing was stopped.\n");

   GBL_SNIFF->active = 0;
}
コード例 #2
0
ファイル: dos_attack.c プロジェクト: devlicious/ettercap
static int dos_attack_fini(void *dummy) 
{
   pthread_t pid;

   /* Remove the hooks */
   hook_del(HOOK_PACKET_ARP_RQ, &parse_arp);
   hook_del(HOOK_PACKET_TCP, &parse_tcp);
   
   pid = ec_thread_getpid("golem");
   
   /* the thread is active or not ? */
   if (!pthread_equal(pid, EC_PTHREAD_NULL))
      ec_thread_destroy(pid);

   INSTANT_USER_MSG("dos_attack: plugin terminated...\n");

   return PLUGIN_FINISHED;   
}