Skip to content

Instantly share code, notes, and snippets.

@hylong
hylong / arp_joke.c
Created September 29, 2017 07:39 — forked from fireflyc/arp_joke.c
arp欺骗
#include <pcap.h>
#include <stdlib.h>
#include <libnet.h>
#define log_error(...) fprintf(stderr, __VA_ARGS__)
#define log_info(...) fprintf(stdout, __VA_ARGS__)
#define FALSE (0==1)
#define TRUE (1==1)
typedef struct arp_joke {
// 译者注:来自 Nettuts+ 的一段代码,生动的阐述了 JavaScript 中变量声明提升规则
var myvar = 'my value';  
(function() {
     alert(myvar);// undefined     
     var myvar = 'local value';  
})();