void usage(char **argv) { int i; struct tx80211_cardlist *cardlist; printf("Usage: %s [interface] [drivername]\n", argv[0]); cardlist = tx80211_getcardlist(); if (cardlist == NULL) { printf("Error accessing supported cardlist.\n"); } else { printf("\nSupported drivers are: "); for (i = 1; i < cardlist->num_cards; i++) { printf("%s ", cardlist->cardnames[i]); } printf("\n"); } tx80211_freecardlist(cardlist); }
/* * Function for printing usage information * */ void usage(){ struct tx80211_cardlist *cardlist = NULL; int i; printf("usage: airpwn -c <conf file> -d <driver name> [interface options] " "[options]\n"); printf("\t<conf file> : configuration file\n"); printf("\t<driver name> : supported wireless driver name\n"); printf("\nInterface options:\n"); printf("\tYou can use -i to set all 3 interfaces at once, or use the\n"); printf("\tother options to set each interface individually.\n"); printf("\t-i <iface> : sets the listen/control/inject interface\n"); printf("\t-M <iface> : sets the listen (monitor) interface\n"); printf("\t-C <iface> : sets the control interface\n"); printf("\t-I <iface> : sets the injection interface\n"); printf("\nOptional arguments:\n"); printf("\t-l <logfile> : log verbose data to a file\n"); printf("\t-f <filter> : bpf filter for libpcap\n"); printf("\t-F : assume no FCS values from the monitored interface\n"); printf("\t-m <max> : Specify the maximum data chunk size (MTU - headers)\n"); printf("\t-k <WEP key>: key to use to de/encrypt WEP packets. You can\n"); printf("\t\tuse this option multiple times to specify multiple WEP keys.\n"); printf("\t-v : increase verbosity (can be used multiple times)\n"); printf("\t-h : get help (this stuff)\n"); printf("\n"); cardlist = tx80211_getcardlist(); if (cardlist == NULL) { fprintf(stderr, "Error accessing supported driver list.\n"); } else { printf("Supported drivers are: "); for (i = 1; i < cardlist->num_cards; i++) { printf("%s ", cardlist->cardnames[i]); } printf("\n"); } }
static VALUE lorcon_driver_list(VALUE self) { VALUE list; VALUE hash; struct tx80211_cardlist *cards = NULL; int i; list = rb_hash_new(); cards = tx80211_getcardlist(); if (cards == NULL) { return(Qnil); } for (i = 1; i < cards->num_cards; i++) { hash = rb_hash_new(); rb_hash_aset(hash, rb_str_new2("name"), rb_str_new2(cards->cardnames[i])); rb_hash_aset(hash, rb_str_new2("description"), rb_str_new2(cards->descriptions[i])); rb_hash_aset(hash, rb_str_new2("capabilities"), lorcon_cap_to_list(cards->capabilities[i])); rb_hash_aset(list, rb_str_new2(cards->cardnames[i]), hash); } tx80211_freecardlist(cards); return(list); }
void usage() { struct tx80211_cardlist *cardlist = NULL; int i; cardlist = tx80211_getcardlist(); printf("txtun (c) 2005 Joshua Wright and dragorn\n" "Usage : txtun [options]\n" " -i <interface> specify the interface name\n" " -t <interface> specify the tuntap interface name\n" " -c <channel> channel to transmit packets on.\n" " -d <drivername> string indicating driver used on interface\n"); if (cardlist == NULL) { fprintf(stderr, "Error accessing supported cardlist.\n"); } else { printf("\nSupported drivers are: "); for (i = 1; i < cardlist->num_cards; i++) { printf("%s ", cardlist->cardnames[i]); } printf("\n"); } }