ec_parser.c (ettercap-0.8.3) | : | ec_parser.c (ettercap-0.8.3.1) | ||
---|---|---|---|---|
skipping to change at line 113 | skipping to change at line 113 | |||
fprintf(stdout, " --lua-script <script1>,[<script2>,...] comma-separ ted list of LUA scripts\n"); | fprintf(stdout, " --lua-script <script1>,[<script2>,...] comma-separ ted list of LUA scripts\n"); | |||
fprintf(stdout, " --lua-args n1=v1,[n2=v2,...] comma-separ ated arguments to LUA script(s)\n"); | fprintf(stdout, " --lua-args n1=v1,[n2=v2,...] comma-separ ated arguments to LUA script(s)\n"); | |||
#endif | #endif | |||
fprintf(stdout, "\nGeneral options:\n"); | fprintf(stdout, "\nGeneral options:\n"); | |||
fprintf(stdout, " -i, --iface <iface> use this network interface\n") ; | fprintf(stdout, " -i, --iface <iface> use this network interface\n") ; | |||
fprintf(stdout, " -I, --liface show all the network interface s\n"); | fprintf(stdout, " -I, --liface show all the network interface s\n"); | |||
fprintf(stdout, " -Y, --secondary <ifaces> list of secondary network inte rfaces\n"); | fprintf(stdout, " -Y, --secondary <ifaces> list of secondary network inte rfaces\n"); | |||
fprintf(stdout, " -n, --netmask <netmask> force this <netmask> on iface\ n"); | fprintf(stdout, " -n, --netmask <netmask> force this <netmask> on iface\ n"); | |||
fprintf(stdout, " -A, --address <address> force this local <address> on iface\n"); | fprintf(stdout, " -A, --address <address> force this local <address> on iface\n"); | |||
fprintf(stdout, " -P, --plugin <plugin> launch this <plugin>\n"); | fprintf(stdout, " -P, --plugin <plugin> launch this <plugin> - multipl | |||
e occurance allowed\n"); | ||||
fprintf(stdout, " --plugin-list <plugin1>,[<plugin2>,...] comma-se | ||||
parated list of plugins\n"); | ||||
fprintf(stdout, " -F, --filter <file> load the filter <file> (conten t filter)\n"); | fprintf(stdout, " -F, --filter <file> load the filter <file> (conten t filter)\n"); | |||
fprintf(stdout, " -z, --silent do not perform the initial ARP scan\n"); | fprintf(stdout, " -z, --silent do not perform the initial ARP scan\n"); | |||
#ifdef WITH_IPV6 | #ifdef WITH_IPV6 | |||
fprintf(stdout, " -6, --ip6scan send ICMPv6 probes to discover IPv6 nodes on the link\n"); | fprintf(stdout, " -6, --ip6scan send ICMPv6 probes to discover IPv6 nodes on the link\n"); | |||
#endif | #endif | |||
fprintf(stdout, " -j, --load-hosts <file> load the hosts list from <file >\n"); | fprintf(stdout, " -j, --load-hosts <file> load the hosts list from <file >\n"); | |||
fprintf(stdout, " -k, --save-hosts <file> save the hosts list to <file>\ n"); | fprintf(stdout, " -k, --save-hosts <file> save the hosts list to <file>\ n"); | |||
fprintf(stdout, " -W, --wifi-key <wkey> use this key to decrypt wifi p ackets (wep or wpa)\n"); | fprintf(stdout, " -W, --wifi-key <wkey> use this key to decrypt wifi p ackets (wep or wpa)\n"); | |||
fprintf(stdout, " -a, --config <config> use the alternative config fil e <config>\n"); | fprintf(stdout, " -a, --config <config> use the alternative config fil e <config>\n"); | |||
skipping to change at line 154 | skipping to change at line 155 | |||
{ "netmask", required_argument, NULL, 'n' }, | { "netmask", required_argument, NULL, 'n' }, | |||
{ "address", required_argument, NULL, 'A' }, | { "address", required_argument, NULL, 'A' }, | |||
{ "write", required_argument, NULL, 'w' }, | { "write", required_argument, NULL, 'w' }, | |||
{ "read", required_argument, NULL, 'r' }, | { "read", required_argument, NULL, 'r' }, | |||
{ "pcapfilter", required_argument, NULL, 'f' }, | { "pcapfilter", required_argument, NULL, 'f' }, | |||
{ "reversed", no_argument, NULL, 'R' }, | { "reversed", no_argument, NULL, 'R' }, | |||
{ "proto", required_argument, NULL, 't' }, | { "proto", required_argument, NULL, 't' }, | |||
{ "plugin", required_argument, NULL, 'P' }, | { "plugin", required_argument, NULL, 'P' }, | |||
{ "plugin-list", required_argument, NULL, 0 }, | ||||
{ "filter", required_argument, NULL, 'F' }, | { "filter", required_argument, NULL, 'F' }, | |||
#ifdef HAVE_EC_LUA | #ifdef HAVE_EC_LUA | |||
{ "lua-script", required_argument, NULL, 0 }, | { "lua-script", required_argument, NULL, 0 }, | |||
{ "lua-args", required_argument, NULL, 0 }, | { "lua-args", required_argument, NULL, 0 }, | |||
#endif | #endif | |||
{ "superquiet", no_argument, NULL, 'Q' }, | { "superquiet", no_argument, NULL, 'Q' }, | |||
{ "quiet", no_argument, NULL, 'q' }, | { "quiet", no_argument, NULL, 'q' }, | |||
{ "script", required_argument, NULL, 's' }, | { "script", required_argument, NULL, 's' }, | |||
skipping to change at line 228 | skipping to change at line 230 | |||
while ((c = getopt_long (argc, argv, "A:a:bB:CchDdEe:F:f:GhIi:j:k:L:l:M:m:n:o P:pQqiRr:s:STt:uV:vW:w:Y:z6", long_options, &option_index)) != EOF) { | while ((c = getopt_long (argc, argv, "A:a:bB:CchDdEe:F:f:GhIi:j:k:L:l:M:m:n:o P:pQqiRr:s:STt:uV:vW:w:Y:z6", long_options, &option_index)) != EOF) { | |||
/* used for parsing arguments */ | /* used for parsing arguments */ | |||
char *opt_end = optarg; | char *opt_end = optarg; | |||
while (opt_end && *opt_end) opt_end++; | while (opt_end && *opt_end) opt_end++; | |||
/* enable a loaded filter script? */ | /* enable a loaded filter script? */ | |||
switch (c) { | switch (c) { | |||
case 'M': | case 'M': | |||
set_mitm(optarg); | set_mitm(optarg); | |||
break; | break; | |||
case 'o': | case 'o': | |||
set_onlymitm(); | set_onlymitm(); | |||
//select_text_interface(); | //select_text_interface(); | |||
break; | break; | |||
case 'b': | case 'b': | |||
set_broadcast(); | set_broadcast(); | |||
break; | break; | |||
case 'B': | case 'B': | |||
set_iface_bridge(optarg); | set_iface_bridge(optarg); | |||
break; | break; | |||
case 'p': | case 'p': | |||
set_promisc(); | set_promisc(); | |||
break; | break; | |||
#ifndef JUST_LIBRARY | #ifndef JUST_LIBRARY | |||
case 'T': | case 'T': | |||
select_text_interface(); | select_text_interface(); | |||
break; | break; | |||
case 'C': | case 'C': | |||
select_curses_interface(); | select_curses_interface(); | |||
break; | break; | |||
case 'G': | case 'G': | |||
select_gtk_interface(); | select_gtk_interface(); | |||
break; | break; | |||
case 'D': | case 'D': | |||
select_daemon_interface(); | select_daemon_interface(); | |||
break; | break; | |||
#endif | #endif | |||
case 'R': | case 'R': | |||
set_reversed(); | set_reversed(); | |||
break; | break; | |||
case 't': | case 't': | |||
set_proto(optarg); | set_proto(optarg); | |||
break; | break; | |||
case 'P': | case 'P': | |||
set_plugin(optarg); | set_plugin(optarg); | |||
break; | break; | |||
case 'i': | case 'i': | |||
set_iface(optarg); | set_iface(optarg); | |||
break; | break; | |||
case 'I': | case 'I': | |||
/* this option is only useful in the text interface */ | /* this option is only useful in the text interface */ | |||
set_lifaces(); | set_lifaces(); | |||
select_text_interface(); | select_text_interface(); | |||
break; | break; | |||
case 'Y': | case 'Y': | |||
set_secondary(optarg); | set_secondary(optarg); | |||
break; | break; | |||
case 'n': | case 'n': | |||
set_netmask(optarg); | set_netmask(optarg); | |||
break; | break; | |||
case 'A': | case 'A': | |||
set_address(optarg); | set_address(optarg); | |||
break; | break; | |||
case 'r': | case 'r': | |||
set_read_pcap(optarg); | set_read_pcap(optarg); | |||
break; | break; | |||
case 'w': | case 'w': | |||
set_write_pcap(optarg); | set_write_pcap(optarg); | |||
break; | break; | |||
case 'f': | case 'f': | |||
set_pcap_filter(optarg); | set_pcap_filter(optarg); | |||
break; | break; | |||
case 'F': | case 'F': | |||
set_filter(opt_end, optarg); | set_filter(opt_end, optarg); | |||
break; | break; | |||
case 'L': | case 'L': | |||
set_loglevel_packet(optarg); | set_loglevel_packet(optarg); | |||
break; | break; | |||
case 'l': | case 'l': | |||
set_loglevel_info(optarg); | set_loglevel_info(optarg); | |||
break; | break; | |||
case 'm': | case 'm': | |||
set_loglevel_true(optarg); | set_loglevel_true(optarg); | |||
break; | break; | |||
case 'c': | case 'c': | |||
set_compress(); | set_compress(); | |||
break; | break; | |||
case 'e': | case 'e': | |||
opt_set_regex(optarg); | opt_set_regex(optarg); | |||
break; | break; | |||
case 'Q': | case 'Q': | |||
set_superquiet(); | set_superquiet(); | |||
/* no break, quiet must be enabled */ | /* no break, quiet must be enabled */ | |||
/* fall through */ | /* fall through */ | |||
case 'q': | case 'q': | |||
set_quiet(); | set_quiet(); | |||
break; | break; | |||
case 's': | case 's': | |||
set_script(optarg); | set_script(optarg); | |||
break; | break; | |||
case 'z': | case 'z': | |||
set_silent(); | set_silent(); | |||
break; | break; | |||
#ifdef WITH_IPV6 | #ifdef WITH_IPV6 | |||
case '6': | case '6': | |||
set_ip6scan(); | set_ip6scan(); | |||
break; | break; | |||
#endif | #endif | |||
case 'u': | case 'u': | |||
set_unoffensive(); | set_unoffensive(); | |||
break; | break; | |||
case 'S': | case 'S': | |||
disable_sslmitm(); | disable_sslmitm(); | |||
break; | break; | |||
case 'd': | case 'd': | |||
set_resolve(); | set_resolve(); | |||
break; | break; | |||
case 'j': | case 'j': | |||
set_load_hosts(optarg); | set_load_hosts(optarg); | |||
break; | break; | |||
case 'k': | case 'k': | |||
set_save_hosts(optarg); | set_save_hosts(optarg); | |||
break; | break; | |||
case 'V': | case 'V': | |||
opt_set_format(optarg); | opt_set_format(optarg); | |||
break; | break; | |||
case 'E': | case 'E': | |||
set_ext_headers(); | set_ext_headers(); | |||
break; | break; | |||
case 'W': | case 'W': | |||
set_wifi_key(optarg); | set_wifi_key(optarg); | |||
break; | break; | |||
case 'a': | case 'a': | |||
set_conf_file(optarg); | set_conf_file(optarg); | |||
break; | break; | |||
case 'h': | case 'h': | |||
ec_usage(); | ec_usage(); | |||
break; | break; | |||
case 'v': | case 'v': | |||
printf("%s %s\n", EC_GBL_PROGRAM, EC_GBL_VERSION); | printf("%s %s\n", EC_GBL_PROGRAM, EC_GBL_VERSION); | |||
clean_exit(0); | clean_exit(0); | |||
break; | break; | |||
/* Certificate and private key options */ | /* Certificate and private key options */ | |||
case 0: | case 0: | |||
if (!strcmp(long_options[option_index].name, "certificate")) { | if (!strcmp(long_options[option_index].name, "certificate")) { | |||
EC_GBL_OPTIONS->ssl_cert = strdup(optarg); | EC_GBL_OPTIONS->ssl_cert = strdup(optarg); | |||
} else if (!strcmp(long_options[option_index].name, "private-key" | } | |||
)) { | else if (!strcmp(long_options[option_index].name, "private-key")) { | |||
EC_GBL_OPTIONS->ssl_pkey = strdup(optarg); | EC_GBL_OPTIONS->ssl_pkey = strdup(optarg); | |||
#ifdef HAVE_EC_LUA | #ifdef HAVE_EC_LUA | |||
} else if (!strcmp(long_options[option_index].name,"lua-args")) | } | |||
{ | else if (!strcmp(long_options[option_index].name,"lua-args")) { | |||
ec_lua_cli_add_args(strdup(optarg)); | ec_lua_cli_add_args(strdup(optarg)); | |||
} | } | |||
else if (!strcmp(long_options[option_index].name,"lua-script")) | else if (!strcmp(long_options[option_index].name,"lua-script")) { | |||
{ | ec_lua_cli_add_script(strdup(optarg)); | |||
ec_lua_cli_add_script(strdup(optarg)); | break; | |||
break; | ||||
#endif | #endif | |||
} else { | } | |||
fprintf(stdout, "\nTry `%s --help' for more options.\n\n" | else if (!strcmp(long_options[option_index].name, "plugin-list")) { | |||
, EC_GBL_PROGRAM); | set_plugin_list(strdup(optarg)); | |||
clean_exit(-1); | } | |||
} | else { | |||
fprintf(stdout, "\nTry `%s --help' for more options.\n\n", EC_GBL | ||||
_PROGRAM); | ||||
clean_exit(-1); | ||||
} | ||||
break; | break; | |||
case ':': // missing parameter | case ':': // missing parameter | |||
fprintf(stdout, "\nTry `%s --help' for more options.\n\n", EC_GBL_PR OGRAM); | fprintf(stdout, "\nTry `%s --help' for more options.\n\n", EC_GBL_PR OGRAM); | |||
clean_exit(-1); | clean_exit(-1); | |||
break; | break; | |||
case '?': // unknown option | case '?': // unknown option | |||
fprintf(stdout, "\nTry `%s --help' for more options.\n\n", EC_GBL_PR OGRAM); | fprintf(stdout, "\nTry `%s --help' for more options.\n\n", EC_GBL_PR OGRAM); | |||
clean_exit(-1); | clean_exit(-1); | |||
break; | break; | |||
End of changes. 48 change blocks. | ||||
109 lines changed or deleted | 116 lines changed or added |