Projects
Extra
aircrack-ng
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
aircrack-ng.changes
Changed
@@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Sun Jan 12 18:40:00 UTC 2014 - chris@computersalat.de + +- update to 1.2-beta2 + * Airbase-ng: Fixed order of IE when creating soft Access Point. + * Airbase-ng: Fixed Caffe Latte Attack not working for all clients. + * Aircrack-ng: Improved PTW speed thanks to Ramiro Polla. + * Airmon-zc: Fixed improper use of the interface. + * Airdecap-ng: Fixed decoding captures with WMM enabled. + * Various: Fixed memory leaks in Aircrack-ng, Aireplay-ng, OSdep. + * Added support for static analysis using Coverity Scan. + * Fixed compilation due to PIC unfriendly assembly on Gentoo hardened. + * Fixed running tests using 'make check'. + * Fixed building aircrack-ng with recent version of gcc and also on cygwin. + * Various other small fixes. + +------------------------------------------------------------------- Sat Aug 31 07:30:22 UTC 2013 - i@margueirte.su - update version 1.2-beta1
View file
aircrack-ng.spec
Changed
@@ -19,10 +19,10 @@ %bcond_without unstable %bcond_without sqlite -%define pkg_version 1.2-beta1 +%define pkg_version 1.2-beta2 Name: aircrack-ng -Version: 1.2.beta1 +Version: 1.2.beta2 Release: 0 License: GPL-2.0 Summary: Aircrack-ng is the next generation of aircrack
View file
aircrack-ng-1.2-beta1.tar.gz/contrib
Deleted
-(directory)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/airpcap
Deleted
-(directory)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/airpcap/Makefile
Deleted
@@ -1,19 +0,0 @@ -ROOT = ../.. -include $(ROOT)/common.mak - -CFLAGS = -g -I$(ROOT)/../developers/Airpcap_Devpack/include -I$(ROOT)/src/osdep -#LIBS = -L $(ROOT)/../developers/Airpcap_Devpack/lib -lairpcap -L $(ROOT)/src/osdep -losdep -LIBS = -L $(ROOT)/../developers/Airpcap_Devpack/lib -lairpcap - - -CFLAGS += $(PIC) -OBJS = airpcap.o -DLL = airpcap.dll - -all: $(DLL) - -$(DLL): $(OBJS) - $(CC) ${CFLAGS} -shared -o $(DLL) $(OBJS) ${LIBS} - -clean: - rm -f $(DLL) $(OBJS)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/airpcap/airpcap.c
Deleted
@@ -1,274 +0,0 @@ -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <windows.h> - -#include <airpcap.h> - -#include "osdep.h" -#include "tap-win32/common.h" - -static const char * DEFAULT_ADAPT_NAME = "\\\\.\\airpcap00"; -static const char * DEVICE_HEADER = "\\\\.\\"; - - -//pcap_t *winpcap_adapter; -static PAirpcapHandle airpcap_handle; - - -// Use PPI later -#define PPH_PH_VERSION ((u_int8_t)0x00) -#define PPI_FIELD_TYPE_802_11_COMMON ((u_int16_t)0x02) - -typedef struct _PPI_PACKET_HEADER -{ - u_int8_t PphVersion; - u_int8_t PphFlags; - u_int16_t PphLength; - u_int32_t PphDlt; -} -PPI_PACKET_HEADER, *PPPI_PACKET_HEADER; - -typedef struct _PPI_FIELD_HEADER -{ - u_int16_t PfhType; - u_int16_t PfhLength; -} -PPI_FIELD_HEADER, *PPPI_FIELD_HEADER; - -typedef struct _PPI_FIELD_802_11_COMMON -{ - u_int64_t TsfTimer; - u_int16_t Flags; - u_int16_t Rate; - u_int16_t ChannelFrequency; - u_int16_t ChannelFlags; - u_int8_t FhssHopset; - u_int8_t FhssPattern; - int8_t DbmAntSignal; - int8_t DbmAntNoise; -} -PPI_FIELD_802_11_COMMON, *PPPI_FIELD_802_11_COMMON; - - - -static int ppi_decode(const u_char *p, int caplen, int *hdrlen, int *power) -{ - PPPI_PACKET_HEADER pPpiPacketHeader; - PPPI_FIELD_HEADER pFieldHeader; - ULONG position = 0; - - // Sanity checks - if (caplen < sizeof(*pPpiPacketHeader)) - { - // Packet smaller than the PPI fixed header - return( 1 ); - } - - pPpiPacketHeader = (PPPI_PACKET_HEADER)p; - - *hdrlen = pPpiPacketHeader->PphLength; - - if(caplen < *hdrlen) - { - // Packet smaller than the PPI fixed header - return( 1 ); - } - - position = sizeof(*pPpiPacketHeader); - - if (pPpiPacketHeader->PphVersion != PPH_PH_VERSION) - { - fprintf( stderr, "Unknown PPI packet header version (%u)\n", pPpiPacketHeader->PphVersion); - return( 1 ); - } - - do - { - // now we suppose to have an 802.11-Common header - if (*hdrlen < sizeof(*pFieldHeader) + position) - { - break; - } - - pFieldHeader = (PPPI_FIELD_HEADER)(p + position); - position += sizeof(*pFieldHeader); - - switch(pFieldHeader->PfhType) - { - case PPI_FIELD_TYPE_802_11_COMMON: - if (pFieldHeader->PfhLength != sizeof(PPI_FIELD_802_11_COMMON) || caplen - position < sizeof(PPI_FIELD_802_11_COMMON)) - { - // the header is bogus, just skip it - fprintf( stderr, "Bogus 802.11-Common Field. Skipping it.\n"); - } - else - { - PPPI_FIELD_802_11_COMMON pField = (PPPI_FIELD_802_11_COMMON)(p + position); - - if (pField->DbmAntSignal != -128) - { - *power = (int)pField->DbmAntSignal; - } - else - { - *power = 0; - } - } - break; - - default: - // we do not know this field. Just print type and length and skip - break; - } - - position += pFieldHeader->PfhLength; - } - while(TRUE); - - return( 0 ); -} - - -int cygwin_set_mac(unsigned char *mac) -{ - if (*mac) {} - return 0; -} - -void cygwin_close(void) -{ - // By default, when plugged in, the adapter is set in monitor mode; - // Application may assume it's already in monitor mode and forget to set it - // So, do not remove monitor mode. - if (airpcap_handle != NULL) - { - AirpcapClose(airpcap_handle); - } -} - -int cygwin_get_mac(unsigned char *mac) -{ - // Don't use the function from Airpcap - if (*mac) {} - - return 0; -} - -// Use PPI headers to obtain the different information for ri -// Use AirpcapConvertFrequencyToChannel() to get channel -// Add an option to give frequency instead of channel -int cygwin_sniff(void *buf, int len, struct rx_info *ri) -{ - UINT BytesReceived = 0; - - // Wait for the next packet - // Maybe add an event packets to read - // WaitForSingleObject(ReadEvent, INFINITE); - - // Read a packet - if(AirpcapRead(airpcap_handle, buf, len, &BytesReceived)) - return (int)BytesReceived; - - return -1; -} - -int cygwin_inject(void *buf, int len, struct tx_info *ti) -{ - if (AirpcapWrite (airpcap_handle, buf, len) != 1) - return -1; - - return len; -} - -static int printErrorCloseAndReturn(const char * err, int retValue) -{ - if (err && airpcap_handle) - { - if (strlen(err)) - { - if (airpcap_handle) - fprintf( stderr, err, AirpcapGetLastError(airpcap_handle)); - else - fprintf( stderr, err); - } - } - - cygwin_close(); - - return retValue;
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/commview
Deleted
-(directory)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/commview/Makefile
Deleted
@@ -1,15 +0,0 @@ -ROOT = ../.. -include $(ROOT)/common.mak - -CFLAGS += $(PIC) -I$(ROOT)/src/osdep -OBJS = commview.o -DLL = commview.dll -LIBS = -liphlpapi -lsetupapi -luuid -lpthread - -all: $(DLL) - -$(DLL): $(OBJS) - $(CC) -shared -o $(DLL) $(OBJS) $(LIBS) - -clean: - rm -f $(DLL) $(OBJS)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/commview/commview.c
Deleted
@@ -1,618 +0,0 @@ -#include <net/if.h> -#include <sys/ioctl.h> -#include <string.h> -#include <dlfcn.h> -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <unistd.h> -#include <fcntl.h> -#include <wchar.h> - -#include <windows.h> -#include <iphlpapi.h> -#include <setupapi.h> -#include <devguid.h> -#include <pthread.h> - -#include "osdep.h" -#include "tap-win32/common.h" - -#define BUFSIZE 0x3E8000 - -struct CV_Header { - unsigned int TickCount; // GetTickCount() / 1000 at time of packet - unsigned int Micros; // Microsecond counter at time of packet - /* The following might be backwards, unsure */ - int PacketSize; // Full packet size? - int SliceSize; // Truncated packet size? - int Unknown; // Not sure what this is. -}; - -struct CV_Header2 { - char ErrorFlag; // ErrorFlag & 1 = CRC error - char Unknown2[6]; // Unknown - char Power; // Power - char Unknown3[6]; // Unknown -}; - -struct cstate { - char cs_param[256]; - int cs_ioctls; - struct ifreq cs_ifreq; - char cs_guid[256]; - HKEY cs_key; - int cs_chan; - volatile int cs_restarting; - void *cs_lib; - pthread_mutex_t cs_mtx; - int cs_debug; - - char (__cdecl *cs_F1)(int Code); - char (__cdecl *cs_F2)(void); - char (__cdecl *cs_T1)(int Size, unsigned char *Buffer); - char (__cdecl *cs_CC)(int Channel); - char (__cdecl *cs_S1)(int Channel); - int (__cdecl *cs_S5)(unsigned char *Buffer, int Length); - int (__cdecl *cs_GN)(wchar_t *); - int (*cs_SC)(int band); -} _cs; - -static struct cstate *get_cs(void) -{ - return &_cs; -} - -static int print_error(char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - printf("\n"); - - return -1; -} - -static void print_debug(char *fmt, ...) -{ - struct cstate *cs = get_cs(); - va_list ap; - - if (!cs->cs_debug) - return; - - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - printf("\n"); -} - -static int do_init_lib(struct cstate *cs) -{ - /* init */ - if (!cs->cs_F1(BUFSIZE)) - return print_error("F1"); - - /* start monitor */ - if (!cs->cs_S1(cs->cs_chan)) - return print_error("S1"); - - /* change chan */ - if (!cs->cs_CC(cs->cs_chan)) - return print_error("CC"); - - return 0; -} - -static int init_lib(struct cstate *cs) -{ - char *lib = "ca2k.dll"; - void *ca2k_dll; - - ca2k_dll = dlopen(lib, RTLD_LAZY); - if (!ca2k_dll) - return print_error("dlopen(%s)", lib); - cs->cs_lib = ca2k_dll; - - // Initialise - cs->cs_F1 = dlsym(ca2k_dll, "F1"); - // Transmit - cs->cs_T1 = dlsym(ca2k_dll, "T1"); - // Change monitoring channel - cs->cs_CC = dlsym(ca2k_dll, "CC"); - // Start monitoring - cs->cs_S1 = dlsym(ca2k_dll, "S1"); - // Read packets - cs->cs_S5 = dlsym(ca2k_dll, "S5"); - // Finalize - cs->cs_F2 = dlsym(ca2k_dll, "F2"); - // Get Adapter Name - cs->cs_GN = dlsym(ca2k_dll, "GN"); - - if (!(cs->cs_F1 && cs->cs_T1 && cs->cs_CC && cs->cs_S1 && cs->cs_S5 - && cs->cs_F2 && cs->cs_GN)) - return print_error("Can't find syms"); - - return do_init_lib(cs); -} - -static int get_name(struct cstate *cs, char *name) -{ - wchar_t wname[1024]; - unsigned int i; - - if (!(cs->cs_GN(wname) & 1)) - return print_error("GN()"); - - /* XXX */ - for (i = 0; i < (sizeof(wname)/sizeof(wchar_t)); i++) { - if (wname[i] == 0) - break; - - *name++ = (char) ((unsigned char) wname[i]); - } - *name = 0; - - return 0; -} - -static int get_guid(struct cstate *cs, char *param) -{ - IP_ADAPTER_INFO ai[16]; - DWORD len = sizeof(ai); - PIP_ADAPTER_INFO p; - char name[1024]; - int found; - - if (get_name(cs, name) == -1) - return print_error("get_name()"); - - print_debug("Name: %s", name); - - if (GetAdaptersInfo(ai, &len) != ERROR_SUCCESS) - return print_error("GetAdaptersInfo()"); - - p = ai; - while (p) { - print_debug("get_guid: name: %s desc: %s", - p->AdapterName, p->Description); - - found = (param && strcmp(p->AdapterName, param) == 0) - || strstr(p->Description, name); - - /* XXX */ - if (cs->cs_debug) { - char yea[512]; - - printf("Does this look like your card? [y/n]\n"); - yea[0] = 0; - fgets(yea, sizeof(yea), stdin); - if (yea[0] == 'y') - found = 1; - else - found = 0; - } - - if (found) { - snprintf(cs->cs_guid, sizeof(cs->cs_guid)-1, "%s",
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/peek
Deleted
-(directory)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/peek/Makefile
Deleted
@@ -1,16 +0,0 @@ -ROOT = ../.. -include $(ROOT)/common.mak - -CFLAGS += $(PIC) -I$(ROOT)/src/osdep -NAME = omnipeek -OBJS = $(NAME).o -DLL = $(NAME).dll -LIBS = - -all: $(DLL) - -$(DLL): $(OBJS) - $(CC) -shared -o $(DLL) $(OBJS) $(LIBS) - -clean: - rm -f $(DLL) $(OBJS)
View file
aircrack-ng-1.2-beta1.tar.gz/contrib/peek/omnipeek.c
Deleted
@@ -1,292 +0,0 @@ -/* ripped from devine's windows airodump */ - -#include <string.h> -#include <dlfcn.h> -#include <windows.h> -#include <pthread.h> -#include <assert.h> -#include <err.h> - -#include "osdep.h" -#include "cygwin.h" - -#ifdef UNUSED -#elif defined(__GNUC__) -# define UNUSED(x) UNUSED_ ## x __attribute__((unused)) -#elif defined(__LCLINT__) -# define UNUSED(x) /*@unused@*/ x -#else -# define UNUSED(x) x -#endif - -#define MAGIC1 0x3E8000 -#define MAGIC2 0x21 -#define MAGICCHAN 0xFF636713 - -struct pstate -{ - void *ps_lib; - HANDLE ps_adapter; - HANDLE ps_ctx; - pthread_cond_t ps_sem; - pthread_mutex_t ps_mtx; - unsigned char ps_data[4096]; - int ps_len; - - int (*ps_peek_initialize_library)(void); - HANDLE (*ps_peek_open_adapter)(LPSTR); - int (*ps_peek_start_capture)(HANDLE); - int (*ps_peek_request)(HANDLE, void*, void*); - int (*ps_peek_stop_capture)(HANDLE); - int (*ps_peek_close_adapter)(HANDLE); - int (*ps_peek_packet_send)(HANDLE, void*, int, int*, LPOVERLAPPED, - int); - HANDLE (*ps_peek_create_capture_context)(HANDLE, void*, int, - int, void*); -} _pstate; - -static struct pstate *get_ps(void) -{ - return &_pstate; -} - -static int init_lib(struct pstate *ps) -{ - char *libname = "Peek.dll"; - void *lib; - - if (!(lib = dlopen(libname, RTLD_LAZY))) - return -1; - - ps->ps_lib = lib; - - ps->ps_peek_open_adapter = dlsym(lib, "PeekOpenAdapter"); - ps->ps_peek_start_capture = dlsym(lib, "PeekStartCapture"); - ps->ps_peek_request = dlsym(lib, "PeekRequest"); - ps->ps_peek_stop_capture = dlsym(lib, "PeekStopCapture"); - ps->ps_peek_close_adapter = dlsym(lib, "PeekCloseAdapter"); - ps->ps_peek_packet_send = dlsym(lib, "PeekPacketSend"); - ps->ps_peek_create_capture_context = - dlsym(lib, "PeekCreateCaptureContext"); - ps->ps_peek_initialize_library = - dlsym(lib, "PeekInitializeLibrary"); - - if (!(ps->ps_peek_open_adapter - && ps->ps_peek_start_capture - && ps->ps_peek_request - && ps->ps_peek_stop_capture - && ps->ps_peek_close_adapter - && ps->ps_peek_packet_send - && ps->ps_peek_create_capture_context - && ps->ps_peek_initialize_library - )) - return -1; - - return 0; -} - -static void do_cleanup(struct pstate *ps) -{ - if (!ps->ps_lib) - return; - - if (ps->ps_ctx != INVALID_HANDLE_VALUE) - ps->ps_peek_stop_capture(ps->ps_ctx); - - if (ps->ps_adapter != INVALID_HANDLE_VALUE) - ps->ps_peek_close_adapter(ps->ps_adapter); - - dlclose(ps->ps_lib); -} - -static int set_chan(struct pstate *ps, int channel) -{ - unsigned long reqdata[139]; - OVERLAPPED iodata; - - memset(reqdata, 0, sizeof(reqdata)); - memset(&iodata, 0, sizeof(iodata)); - - iodata.hEvent = CreateEvent(0, 0, 0, 0); - - reqdata[5] = 1; - reqdata[6] = MAGICCHAN; - reqdata[7] = (unsigned long) &channel; - reqdata[8] = 4; - - return ps->ps_peek_request(ps->ps_adapter, reqdata, &iodata); -} - -static void do_lock(struct pstate *ps) -{ - if (pthread_mutex_lock(&ps->ps_mtx)) - err(1, "pthread_mutex_lock()"); -} - -static void do_signal(struct pstate *ps) -{ - do_lock(ps); - - if (pthread_cond_signal(&ps->ps_sem)) - err(1, "pthread_cond_signal()"); -} - -static void do_wait(struct pstate *ps) -{ - do_lock(ps); - - if (pthread_cond_wait(&ps->ps_sem, &ps->ps_mtx)) - err(1, "pthread_cond_wait()"); -} - -static int WINAPI callback(unsigned char *data, int len, int UNUSED(caplen), - __int64 UNUSED(timestamp), int flags, - int UNUSED(arg7)) -{ - struct pstate *ps = get_ps(); - - if ((flags & 1) != 0) - return 1; - - assert(len <= (int) sizeof(ps->ps_data)); - ps->ps_len = len; - memcpy(ps->ps_data, data, ps->ps_len); - - /* tell him we wrote */ - do_signal(ps); - - /* wait for him to copy */ - do_wait(ps); - - return 1; -} - -static int init_card(struct pstate *ps, char *dev) -{ - int rc, len; - char *unicode, *p; - - if (ps->ps_peek_initialize_library() == 0) - return -1; - - /* convert dev to unicode - i'm sure there's a standard function, but - * aingottime. - * Format: \Device\{GUID} - */ - if (!dev) - return -1; - - len = strlen(dev); - unicode = p = malloc((len+1)*2); - if (!unicode) - return -1; - - for (rc = 0; rc < len; rc++) { - *p++ = dev[rc]; - *p++ = 0; - } - *p++ = 0; - *p++ = 0; - - ps->ps_adapter = ps->ps_peek_open_adapter(unicode); - free(unicode); - if (ps->ps_adapter == INVALID_HANDLE_VALUE) - return -1; - - ps->ps_ctx = ps->ps_peek_create_capture_context(ps->ps_adapter, - callback, MAGIC1, MAGIC2, NULL); - - if ((rc = ps->ps_peek_start_capture(ps->ps_ctx)))
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/confs/bash_aliases
Deleted
@@ -1,20 +0,0 @@ -#!/bin/bash -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - eval "`dircolors -b`" - alias ls='ls --color=yes' - alias dir='dir --color=yes' - alias vdir='vdir --color=yes' - - alias grep='grep --color=yes' - alias fgrep='fgrep --color=yes' - alias egrep='egrep --color=yes' -fi - -# some more ls aliases -alias ll='ls -l -v1' -alias la='ls -A' - -alias l='ls -CF -v1' - -
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/plugins/TUI.plugin.bash
Deleted
@@ -1,40 +0,0 @@ -#!/bin/bash -# TUI tools -document_description "Nice menu creation function not depending on ncurses, just pure bash" -load color screen_display - - - -declare -A menuopts menufuncs; -start_menu(){ echo_center "$1" "$2"; menu_vwall $2; } -menu_failed_response(){ _ "Error, try again"; } -menu_wall(){ colorize none,${theme['menu_separator_color']} ${theme['menu_separator']}; } -menu_vwall(){ colorize none,${theme['menu_separator_color']} "${theme['menu_edge']}$(mkline "${theme['separator']}" $(($1 -2 )))${theme['menu_edge']}";echo; } -menu_entry(){ tput sc; menu_wall; colorize none,${theme['menu_number']} "$2)"; echo -n " "; colorize none,${theme['normal']} "$1"; tput rc; screen_goto_col $3; echo $(menu_wall);} -menu_get_response(){ read -p "`_ \"Enter option: \"`" response; (( $response > $1 )) && response=-127; } -mkmenu(){ - document "mkmenu" "Create a menu" "[-t title] [ -o options ] [ -f functions ]" && return - while getopts "s:o:f:t:" opt; do - case $opt in - o) menuopts[${#menuopts[@]}]=$OPTARG;; - f) menufuncs[${#menufuncs[@]}]=$OPTARG;; - s) set_name=$OPTARG;; - t) title=$OPTARG;; - esac; - done - status=0; menu_len=$(( $(max_len_in_array "${menuopts[@]}") + 5 ));(( $menu_len < ${#title} )) && menu_len=$((${#title} + 4 )); - start_menu "$title" $menu_len - for i in "${menuopts[@]}"; do addone status; menu_entry "${i[@]}" $status $menu_len; done - menu_vwall $menu_len - while [ "1" ]; do - menu_get_response ${#menuopts}; - [[ $response != -127 ]] && { - [[ $set_name ]] && { - export $set_name=${menufuncs[$(( $response - 1 ))]}; break ; - } || { - ${menufuncs[$(( $response - 1 ))]}; break ; - } - } || { menu_failed_response; } - done -} -
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/plugins/color.plugin.bash
Deleted
@@ -1,17 +0,0 @@ -#!/bin/bash -document_description "Colouring functions, easily customizable and themable colouring for your scripts" -declare -A colors highlights -get_color(){ - document "get_color" "Return a color, either a colorcode or one of the color list" "colorname" && return - [[ $1 < 254 ]] && { echo $1; } || { echo ${colors[$1]} ; } ; } -colorize(){ - document "colorize" "Colorize bg and fg for a specific frase" "bg fg frase" && return - a=($(split $1 ",")); - fg=$(get_color ${a[1]}); - bg=$(get_color ${a[2]}); - ef=$(get_color ${a[0]}); - [[ $bg ]] && tput setab $bg - [[ ${fg} ]] && tput setaf $fg - [[ ${ef} != "0" ]] && tput $ef - echo -en "$2"; tput sgr0 -}
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/plugins/device_utils.plugin.bash
Deleted
@@ -1,17 +0,0 @@ -#!/bin/bash - -document_description "Device tools, handy functions to get all the power from your hardware" - -cdtool(){ - document "cdtool" "Manipulate cdrom device" "[save|write_iso|write_dir|erase_dev] [device] [destination]" && return - [[ $1 == "save" ]] && { dd if=$2 of=$3 bs=2048 conv=sync,notrunc; } - [[ $1 == "write_iso" ]] && { wodim -eject -tao speed=1 dev=$2 -v -data $3 || wodim -eject -tao speed=1 dev=$2 -v -data $3; } - [[ $1 == "write_dir" ]] && { temp=`mktemp`; mkisofs -o $temp.iso -J -r -v -V $3 $4; cdtool "write_iso" $2 $temp.iso; rm $temp.iso; } - [[ $1 == "erase_dev" ]] && { wodim blank=fast -eject dev=$2; } -} - - -battery_percentage(){ - document "battery_percentage" "Get battery percentage" "" && return - awk '/Battery/ {print substr($4,1,2)}' <(acpi); -}
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/plugins/git.plugin.bash
Deleted
@@ -1,29 +0,0 @@ -#!/bin/bash -document_description "Git tools, to work with one of the bests cvs out there" - -function git_stats { -document "git_stats" "Return git statistics" "Git LOG OPTIONS" && return -# awesome work from https://github.com/esc/git-stats -# including some modifications by Bash-It author and then by me. - -if [ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]; then - echo "Number of commits per author:"; git --no-pager shortlog -sn --all - - LOGOPTS="$@" - - for a in $( git shortlog -sn --all | cut -f2 | cut -f1 -d' '); do - echo "Statistics for: $a" - echo -n "Number of files changed: " - git log $LOGOPTS --all --numstat --format="%n" --author=$a | cut -f3 | sort -iu | wc -l - echo -n "Number of lines added: " - git log $LOGOPTS --all --numstat --format="%n" --author=$a | cut -f1 | awk '{s+=$1} END {print s}' - echo -n "Number of lines deleted: " - git log $LOGOPTS --all --numstat --format="%n" --author=$a | cut -f2 | awk '{s+=$1} END {print s}' - echo -n "Number of merges: " - git log $LOGOPTS --all --merges --author=$a | grep -c '^commit' - done -else - echo "you're currently not in a git repository" -fi -} -
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/plugins/screen_display.plugin.bash
Deleted
@@ -1,30 +0,0 @@ -#!/bin/bash -document_description "Screen tools, allows you to get all the power from your terminal, and from your xserver." -# Screen Utilities -X11_screen_reso(){ xrandr 2>/dev/null | grep "[[:digit:]].*x.*[[:digit:]]\*[[:blank:]]*$" | awk '{print $1}' ; } -X11_best_screen_reso(){ xrandr |awk '/\+$/ {print $1}'; } -X11_screen_outputs(){ xrandr |awk '/ connected/ {print $1}'; } -set_auto_X11_reso(){ - document "set_auto_X11_reso" "Sets the best (according to xrandr) resolution to all active screen outputs" "" && return - outputs=($(X11_screen_outputs)); a=($(X11_best_screen_reso)); b=0; for i in ${a[@]}; do output=${outputs[$b]}; xrandr --output $output --mode $i; addone b; done; } - -auto_screensize(){ - document "auto_screensize" "Sets a bash trap to keep COLUMNS and LINES updated" "" && return - trap 'COLUMNS=$(tput cols) LINES=$(tput lines)' WINCH; export AUTO_SCREENSIZE=1; -} -screen_c(){ [[ "$AUTO_SCREENSIZE" ]] && echo $COLUMNS || tput cols; } -screen_l(){ [[ "$AUTO_SCREENSIZE" ]] && echo $LINES || tput lines; } -screen_goto(){ - document "screen_goto" "Put the cursor in a specific screen position" " Column [Row] " && return - [[ "1" ]] && [[ "$2" ]] && echo -n -e "\033[${1};${2}H" || screen_goto_col $1; } -screen_goto_col(){ tput cuf $1; } -print_at(){ - document "print_at" "Print text in a specific position" "COLUMNxROW" && return - screen_goto $(split $1 x); shift; echo $@; -} -echo_center(){ a=$2; [[ ! $a ]] && a=`screen_c`; print_at "`get_center $a ${#1}`" "$1"; } -mkline(){ - document "mkline" "Prints a line of a specified character during N times, or foreach column in current size" "CHAR [Cols]" && return - [[ $2 ]] && { for i in `seq 0 $2`; do echo -n $1; done ; echo; } || { eval printf "%.0s$1" {1..$(screen_c)}; }; - -}
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/extras/jabashit/src/plugins/time.plugin.bash
Deleted
@@ -1,35 +0,0 @@ -#!/bin/bash -document_description "Time manipulation in bash" -scale=2 - -minutes(){ - document "minutes" "Convert seconds or hours to (aproximated when s or h lowercase) minutes" "[time][s|h|m|S|H|M]" && return - c=$(echo -n $@ |tail -c -1) - case $c in - s) echo $(( $(sed s/.$// <( echo "${@}" ) ) / 60 )) ;; - S) echo "scale=$scale; $(sed s/.$// <( echo "${@}" ) ) / 60" | bc;; - h) echo $(( $(sed s/.$// <( echo "${@}" ) ) * 60 )) ;; - H) echo "scale=$scale; $(sed s/.$// <( echo "${@}" ) ) * 60" |bc ;; - m) sed s/.$// <( echo "${@}" ) ;; - M) sed s/.$// <( echo "${@}" ) ;; - *) echo $(( $(sed s/.$// <( echo "${@}" ) ) / 60 )) ;; - esac -} - -seconds(){ - document "seconds" "Convert minutes or hours to (aproximated when s or h lowercase) seconds" "[time][s|h|m|S|H|M]" && return - c=$(echo -n $@ |tail -c -1) - case $c in - m) echo $(( $(sed s/.$// <( echo "${@}" ) ) * 60 )) ;; - M) echo "scale=$scale; $(sed s/.$// <( echo "${@}" ) ) * 60" | bc;; - h) echo $(( $(sed s/.$// <( echo "${@}" ) ) * 3600 )) ;; - H) echo "scale=$scale; $(sed s/.$// <( echo "${@}" ) ) * 60" |bc ;; - s) sed s/.$// <( echo "${@}" ) ;; - S) sed s/.$// <( echo "${@}" ) ;; - *) echo $(( $(sed s/.$// <( echo "${@}" ) ) * 60 )) ;; - esac -} - -delay(){ - { time=$1; shift; sleep $(seconds $time) && ${@}; } & -} # I know... I know, sleep allows you to choose seconds minutes and all that. But hell, I had to do a practical example for this.
View file
aircrack-ng-1.2-beta1.tar.gz/ChangeLog -> aircrack-ng-1.2-beta2.tar.gz/ChangeLog
Changed
@@ -1,3 +1,16 @@ +Version 1.2-beta2 (changes from aircrack-ng 1.2-beta1) - Released 30 November 2013: +* Airbase-ng: Fixed order of IE when creating soft Access Point. +* Airbase-ng: Fixed Caffe Latte Attack not working for all clients. +* Aircrack-ng: Improved PTW speed thanks to Ramiro Polla. +* Airmon-zc: Fixed improper use of the interface. +* Airdecap-ng: Fixed decoding captures with WMM enabled. +* Various: Fixed memory leaks in Aircrack-ng, Aireplay-ng, OSdep. +* Added support for static analysis using Coverity Scan. +* Fixed compilation due to PIC unfriendly assembly on Gentoo hardened. +* Fixed running tests using 'make check'. +* Fixed building aircrack-ng with recent version of gcc and also on cygwin. +* Various other small fixes. + Version 1.2-beta1 (changes from aircrack-ng 1.1) - Released 25 May 2013: * Airmon-ng: Added chipset information for ar9170usb, wl, rt2800usb, ar9271, wl12xx, RT3070STA, ath9k_htc, r871x_usb_drv, ath5k, carl9170 and various Intel drivers. * Airmon-ng: Fixed chipset information ipw2200.
View file
aircrack-ng-1.2-beta1.tar.gz/Makefile -> aircrack-ng-1.2-beta2.tar.gz/Makefile
Changed
@@ -11,12 +11,32 @@ DOCFILES = ChangeLog INSTALLING README LICENSE AUTHORS VERSION +COVERITY_BUILD ?= cov-build +COVERITY_DIR = cov-int + +COVERITY_TAR_GZ = Aircrack-ng.tar.gz +COVERITY_CREDS_DIR = coverity +COVERITY_TOKEN = $(shell cat ${COVERITY_CREDS_DIR}/token) +COVERITY_EMAIL = $(shell cat ${COVERITY_CREDS_DIR}/email) default: all all: $(MAKE) -C src $(@) +coverity-build: + $(COVERITY_BUILD) --dir $(COVERITY_DIR) $(MAKE) sqlite=true unstable=true libnl=true + +coverity-package: coverity-build + tar czvf $(COVERITY_TAR_GZ) $(COVERITY_DIR) + +coverity-upload: coverity-package + curl --form project=Aircrack-ng --form token=$(COVERITY_TOKEN) --form email=$(COVERITY_EMAIL) --form file=@$(COVERITY_TAR_GZ) --form version=r$(REVISION) --form description="Aircrack-ng svn r$(REVISION)" http://scan5.coverity.com/cgi-bin/upload.py + +coverity-show-creds: + @echo "Token: $(COVERITY_TOKEN)" + @echo "Email: $(COVERITY_EMAIL)" + aircrack-ng-opt-prof_gen: all mkdir -p prof $(MAKE) -C src $(@) @@ -45,6 +65,7 @@ install -m 644 $(DOCFILES) $(DESTDIR)$(docdir) clean: + -rm -rf $(COVERITY_DIR) $(MAKE) -C src $(@) $(MAKE) -C test/cryptounittest $(@)
View file
aircrack-ng-1.2-beta1.tar.gz/VERSION -> aircrack-ng-1.2-beta2.tar.gz/VERSION
Changed
@@ -1,1 +1,1 @@ -1.2-beta1 \ No newline at end of file +1.2-beta2 \ No newline at end of file
View file
aircrack-ng-1.2-beta1.tar.gz/common.mak -> aircrack-ng-1.2-beta2.tar.gz/common.mak
Changed
@@ -86,16 +86,7 @@ endif ifneq ($(origin CC),environment) - ifeq ($(OSNAME), cygwin) - ARCHITECTURE = $(shell uname -m) - ifeq ($(ARCHITECTURE), i686) - CC = $(TOOL_PREFIX)gcc-4 - else - CC = $(TOOL_PREFIX)gcc - endif - else - CC = $(TOOL_PREFIX)gcc - endif + CC = $(TOOL_PREFIX)gcc endif RANLIB ?= $(TOOL_PREFIX)ranlib
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airbase-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airbase-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRBASE-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIRBASE-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME airbase-ng - multi-purpose tool aimed at attacking clients as opposed to the Access Point (AP) itself
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/aircrack-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/aircrack-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH AIRCRACK-NG 1 "May 2013" "Version 1.2-beta1" +.TH AIRCRACK-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME aircrack-ng - a 802.11 WEP / WPA-PSK key cracker
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airdecap-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airdecap-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH AIRDECAP-NG 1 "May 2013" "Version 1.2-beta1" +.TH AIRDECAP-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME airdecap-ng - decrypt a WEP/WPA crypted pcap file
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airdecloak-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airdecloak-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH AIRDECLOAK-NG 1 "May 2013" "Version 1.2-beta1" +.TH AIRDECLOAK-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME airuncloak-ng - Removes wep cloaked framed from a pcap file.
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airdriver-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airdriver-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRDRIVER-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIRDRIVER-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME airdriver-ng - automatically install/uninstall and patch drivers and 802.11 stacks
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/aireplay-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/aireplay-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIREPLAY-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIREPLAY-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME aireplay-ng - inject packets into a wireless network to generate traffic
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airmon-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airmon-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRMON-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIRMON-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME airmon-ng - bash script designed to turn wireless cards into monitor mode.
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airmon-zc.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airmon-zc.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRMON-ZC 8 "May 2013" "Version 1.2-beta1" +.TH AIRMON-ZC 8 "November 2013" "Version 1.2-beta2" .SH NAME airmon-zc - bash script designed to turn wireless cards into monitor mode, Zero_Chaos version
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airodump-ng-oui-update.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airodump-ng-oui-update.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRODUMP-NG-OUI-UPDATE 8 "May 2013" "Version 1.2-beta1" +.TH AIRODUMP-NG-OUI-UPDATE 8 "November 2013" "Version 1.2-beta2" .SH NAME airodump-ng-oui-updater - IEEE oui list updater for airodump-ng
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airodump-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airodump-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRODUMP-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIRODUMP-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME airodump-ng - a wireless packet capture tool for aircrack-ng
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airolib-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airolib-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH AIROLIB-NG 1 "May 2013" "Version 1.2-beta1" +.TH AIROLIB-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME airolib-ng - manage and create a WPA/WPA2 pre-computed hashes tables
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airserv-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airserv-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRSERV-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIRSERV-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME airserv-ng - a wireless card server
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/airtun-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/airtun-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH AIRTUN-NG 8 "May 2013" "Version 1.2-beta1" +.TH AIRTUN-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME airtun-ng - a virtual tunnel interface creator for aircrack-ng
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/besside-ng-crawler.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/besside-ng-crawler.1
Changed
@@ -1,4 +1,4 @@ -.TH BESSIDE-NG-CRAWLER 1 "May 2013" "Version 1.2-beta1" +.TH BESSIDE-NG-CRAWLER 1 "November 2013" "Version 1.2-beta2" .SH NAME
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/besside-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/besside-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH BESSIDE-NG 8 "May 2013" "Version 1.2-beta1" +.TH BESSIDE-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME besside-ng - crack a WEP or WPA key without user intervention and collaborate with WPA cracking statistics
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/buddy-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/buddy-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH BUDDY-NG 1 "May 2013" "Version 1.2-beta1" +.TH BUDDY-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME buddy-ng - a tool to work with easside-ng
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/easside-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/easside-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH EASSIDE-NG 8 "May 2013" "Version 1.2-beta1" +.TH EASSIDE-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME easside-ng - an auto-magic tool which allows you to communicate via an WEP-encrypted AP without knowing the key
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/ivstools.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/ivstools.1
Changed
@@ -1,4 +1,4 @@ -.TH IVSTOOLS 1 "May 2013" "Version 1.2-beta1" +.TH IVSTOOLS 1 "November 2013" "Version 1.2-beta2" .SH NAME ivstools - extract IVs from a pcap file or merges several .ivs files into one
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/kstats.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/kstats.1
Changed
@@ -1,4 +1,4 @@ -.TH KSTATS 1 "May 2013" "Version 1.2-beta1" +.TH KSTATS 1 "November 2013" "Version 1.2-beta2" .SH NAME kstats - show statistical FMS algorithm votes for an ivs dump and a specified WEP key
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/makeivs-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/makeivs-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH MAKEIVS-NG 1 "May 2013" "Version 1.2-beta1" +.TH MAKEIVS-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME makeivs - generate a dummy IVS dump file with a specific WEP key
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/packetforge-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/packetforge-ng.1
Changed
@@ -1,4 +1,4 @@ -.TH PACKETFORGE-NG 1 "May 2013" "Version 1.2-beta1" +.TH PACKETFORGE-NG 1 "November 2013" "Version 1.2-beta2" .SH NAME packetforge-ng - forge packets: ARP, UDP, ICMP or custom packets.
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/tkiptun-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/tkiptun-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH TKIPTUN-NG 8 "May 2013" "Version 1.2-beta1" +.TH TKIPTUN-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME tkiptun-ng - inject a few frames into a WPA TKIP network with QoS
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/wesside-ng.8 -> aircrack-ng-1.2-beta2.tar.gz/manpages/wesside-ng.8
Changed
@@ -1,4 +1,4 @@ -.TH WESSIDE-NG 8 "May 2013" "Version 1.2-beta1" +.TH WESSIDE-NG 8 "November 2013" "Version 1.2-beta2" .SH NAME wesside-ng - crack a WEP key of an open network without user intervention
View file
aircrack-ng-1.2-beta1.tar.gz/manpages/wpaclean.1 -> aircrack-ng-1.2-beta2.tar.gz/manpages/wpaclean.1
Changed
@@ -1,4 +1,4 @@ -.TH WPACLEAN 1 "May 2013" "Version 1.2-beta1" +.TH WPACLEAN 1 "November 2013" "Version 1.2-beta2" .SH NAME wpaclean - clean wpa capture files
View file
aircrack-ng-1.2-beta1.tar.gz/packages/PKGBUILD -> aircrack-ng-1.2-beta2.tar.gz/packages/PKGBUILD
Changed
@@ -1,6 +1,6 @@ # Contributor: ice-man <icemanf@gmail.com> pkgname=aircrack-ng -pkgver=1.1 +pkgver=1.2-beta2 pkgrel="1" pkgdesc="aircrack is an 802.11 WEP and WPA-PSK keys cracking program that can recover this keys once enough encrypted packets have been captured." source=(http://download.aircrack-ng.org/$pkgname-$pkgver.tar.gz)
View file
aircrack-ng-1.2-beta1.tar.gz/packages/aircrack-ng.spec -> aircrack-ng-1.2-beta2.tar.gz/packages/aircrack-ng.spec
Changed
@@ -3,7 +3,7 @@ # these bits are constant across distributions # Name: aircrack-ng -Version: 1.1 +Version: 1.2-beta2 Summary: Reliable 802.11 (wireless) sniffer and WEP/WPA-PSK key cracker License: GPL Source: http://dl.aircrack-ng.org/%{name}-%{version}.tar.gz
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airmon-ng -> aircrack-ng-1.2-beta2.tar.gz/scripts/airmon-ng
Changed
@@ -8,7 +8,7 @@ MADWIFI=0 MAC80211=0 USE_IW=0 -IW_SOURCE="https://www.kernel.org/pub/software/network/iw/iw-3.10.tar.bz2" +IW_SOURCE="https://www.kernel.org/pub/software/network/iw/iw-3.11.tar.bz2" IW_ERROR="" UDEV_ISSUE=0
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airmon-zc -> aircrack-ng-1.2-beta2.tar.gz/scripts/airmon-zc
Changed
@@ -1,12 +1,12 @@ #!/bin/sh DEBUG="0" VERBOSE="0" +ELITE="0" USERID="" IFACE="" -CH=$3; [ x$3 = "x" ] && CH=10 MADWIFI=0 MAC80211=0 -IW_SOURCE="http://wireless.kernel.org/download/iw/iw-latest.tar.bz2" +IW_SOURCE="https://www.kernel.org/pub/software/network/iw/iw-3.11.tar.bz2" IW_ERROR="" UDEV_ISSUE=0 SYSFS=0 @@ -15,6 +15,12 @@ SYSFS=1 fi +if [ "$1" = "--elite" ] +then + shift + ELITE="1" +fi + if [ "$1" = "--verbose" ] then shift @@ -28,13 +34,23 @@ VERBOSE="1" fi +#yes, I know this is in here twice +if [ "$1" = "--elite" ] +then + shift + ELITE="1" +fi + + +CH=${3}; [ x${3} = "x" ] && CH=10 + #TODO LIST #cleanup getDriver() #add band detection -#down station interface, wait 1 second make sure it's down #fix to not assume wifi drivers are modules #allow users to start the interface multiple times to change the channel +#rewrite scanprocesses and checkprocessesiface to be sane if [ x"$(command -v id 2> /dev/null)" != "x" ] then @@ -156,32 +172,38 @@ done fi #we didn't bail means we need a monitor interface - ifconfig $1 down - IW_ERROR=$(iw dev $1 interface add ${1}mon type monitor 2>&1 | grep "nl80211 not found") - if [ x$IW_ERROR = "x" ] + ifconfig ${1} down + IW_ERROR=$(iw dev ${1} interface add ${1}mon type monitor 2>&1 | grep "nl80211 not found") + if [ x${IW_ERROR} = "x" ] then sleep 1s ifconfig ${1}mon up - if [ ! -z $3 ] + if [ ! -z ${3} ] then - if [ $3 -lt 1000 ] + if [ ${3} -lt 1000 ] then - iw dev ${1}mon set channel $3 + iw dev ${1}mon set channel ${3} else - iw dev ${1}mon set freq "$3" + iw dev ${1}mon set freq "${3}" fi else iw dev ${1}mon set channel ${CH} fi - printf "\n\t\t(mac80211 monitor mode enabled for [${PHYDEV}]${1} on [${PHYDEV}]${1}mon)\n" + printf "\n\t\t(mac80211 monitor mode vif enabled for [${PHYDEV}]${1} on [${PHYDEV}]${1}mon)\n" else printf "\n\nERROR: something went wrong with iw." fi - #check if $1 is still down, warn if not - if $(ifconfig ${1} | grep -q UP) + if [ ${ELITE} = "1" ] then - printf "\nInterface ${1} is up, but it should be down. Something is interferring." - printf "\nPlease run \"airmon-zc check kill\" and/or kill your network manager." + #check if $1 is still down, warn if not + if $(ifconfig ${1} | grep -q UP) + then + printf "\nInterface ${1} is up, but it should be down. Something is interferring." + printf "\nPlease run \"airmon-zc check kill\" and/or kill your network manager." + fi + else + iw ${1} del + printf "\t\t(mac80211 station mode vif disabled for [${PHYDEV}]${1})\n" fi } @@ -200,26 +222,38 @@ } stopMac80211Iface() { - if [ -f /sys/class/net/$1/type ] + if [ -f /sys/class/net/${1}/type ] then - if [ "$(cat /sys/class/net/$1/type)" != "803" ] + if [ "$(cat /sys/class/net/${1}/type)" != "803" ] then printf "\n\nYou are trying to stop a device that isn't in monitor mode.\n" printf "Doing so is a terrible idea, if you really want to do it then you\n" - printf "need to type 'iw $1 del' yourself since it is a terrible idea.\n" - printf "Most likely you want to remove an interface called mon[0-9]\n" + printf "need to type 'iw ${1} del' yourself since it is a terrible idea.\n" + printf "Most likely you want to remove an interface called wlan[0-9]mon\n" printf "If you feel you have reached this warning in error,\n" - printf "please report it following the directions above." + printf "please report it." else - IW_ERROR=$(iw dev "$1" del 2>&1 | grep "nl80211 not found") + if [ "${ELITE}" = "0" ] + then + echo ${1%mon} + IW_ERROR=$(iw dev ${1} interface add ${1%mon} type station 2>&1) + if [ x${IW_ERROR} = "x" ] + then + printf "\t\t(mac80211 station mode vif enabled on [${PHYDEV}]${1%mon})\n" + unset IW_ERROR + else + printf "\n\n ERROR: iw command error" + fi + fi + IW_ERROR=$(iw dev "${1}" del 2>&1 | grep "nl80211 not found") if [ x$IW_ERROR = "x" ] then - printf " (mac80211 vif removed)" + printf "\t\t(mac80211 monitor mode vif disabled for [${PHYDEV}]${1})\n" else - if [ -f /sys/class/ieee80211/"$PHYDEV"/remove_iface ] + if [ -f /sys/class/ieee80211/"${PHYDEV}"/remove_iface ] then - printf "$1" > /sys/class/ieee80211/"$PHYDEV"/remove_iface - printf " (mac80211 vif removed)" + printf "${1}" > /sys/class/ieee80211/"${PHYDEV}"/remove_iface + printf "\t\t(mac80211 monitor mode vif disabled for [${PHYDEV}]${1})\n" else printf "\n\nERROR: Neither the sysfs interface links nor the iw command is available.\nPlease download and install iw from\n$IW_SOURCE\n" fi
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/doc/airoscript-ng.1 -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/doc/airoscript-ng.1
Changed
@@ -158,14 +158,13 @@ mrxvt|xterm|gnome\-terminal \-> Preferibly xterm aircrack\-ng ( = airoscript\-ng_version) ) bash ( >4.0 ) -grep -macchanger iproute ( /bin/ip ) .fi .sp .SS Recommended .nf digenpy ( \fI\%http://github.com/XayOn/Digenpy\fP ) # Depends on python 2.6 +macchanger mdk .fi .sp
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/doc/install -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/doc/install
Changed
@@ -1,23 +1,12 @@ Requirements (Deps) =================== -Build-deps -++++++++++ - -gettext - Deps: +++++ -| GNU gettext (gettext package) | ip (iproute package) | aircrack-ng (same version as airoscript-ng) -| *Working* injection capable driver for the interface you want to use -| mrxvt|xterm|gnome-terminal -> Preferibly xterm -| aircrack-ng ( = airoscript-ng_version) ) | bash ( >4.0 ) -| grep -| macchanger | iproute ( /bin/ip ) Recommended @@ -25,4 +14,5 @@ | digenpy ( http://github.com/XayOn/Digenpy ) # Depends on python 2.6 | mdk +| macchanger
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/airoscript-ng -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/airoscript-ng
Changed
@@ -1,9 +1,9 @@ #!/bin/bash -# Depends: aircrack-ng, xterm|urxvt|gnome-terminal, awk, macchanger, grep, bash >= 4 -# Recommends: mdk3, wlandecrypter, jazzteldecrypter +# Depends: aircrack-ng, bash >= 4 +# Recommends: mdk3, digenpy, macchanger, # Copyright (C) 2008 Daouid -# Copyright (C) 2009, 2010 David Francos Cuartero +# Copyright (C) 2009-2013 David Francos Cuartero # See Authors for a more detailed authors spec. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/_internal -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/_internal
Changed
@@ -17,7 +17,17 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. required(){ - check_function $1 || { specialwarn "${warn}${2}"; return 1; } + check_function $1 || { specialwarn "${warn}${2}"; return 1; } +} + +change_mac(){ + type macchanger && { + fail=$(ifconfig $1 down; $MACCHANGER $1 --mac $2 2>&1; ifconfig $1 up) + } || { + fail=$(ifconfig $1 down; ifconfig $1 $2 2>&1; ifconfig $1 up) + } + + [[ $? == 0 ]] && echo -e "${mark}Interface mac set up correctly $(FAKE_MAC)" || echo -en "${mark}Unable to set interface mac: $?\n $fail" } error(){ @@ -29,13 +39,13 @@ reload_config(){ - return + return } cleanautovars(){ - export AUTO=0; - export QUIET=""; - export INTERACTIVE=$OLDINTERACTIVE + export AUTO=0; + export QUIET=""; + export INTERACTIVE=$OLDINTERACTIVE return } @@ -86,7 +96,7 @@ launch_help_fifo(){ [[ -e $DUMP_PATH/help_fifo ]] || mkfifo $DUMP_PATH/help_fifo &>/dev/null - execute "Help" "tail -f $DUMP_PATH/help_fifo" + execute "Help" "tail -f $DUMP_PATH/help_fifo" } help_fifo(){ @@ -117,7 +127,7 @@ esac done - for i in ${opt_functions[@]}; do [[ $i == "usage" ]] && { usage; exit 1; }; done # Small hack to execute usage the first + for i in ${opt_functions[@]}; do [[ $i == "usage" ]] && { usage; exit 1; }; done # Small hack to execute usage the first for i in ${opt_functions[@]}; do [[ $i != auto ]] && options_$i || execute_auto=1; done [[ $execute_auto ]] && options_auto; # Small hack to execute auto the lastest xD } @@ -138,23 +148,24 @@ } options_auto(){ - export noscan=1; + export noscan=1; temporary_switch_clear; export clear=""; - check_function autopwn || source $path/autocrack; - check_function doexit || source $path/internal/exit; + check_function autopwn || source $path/autocrack; + check_function doexit || source $path/internal/exit; autopwn runner doexit; } load_plugins(){ - for i in ${@}; do + for i in ${@}; do [[ $i =~ (.*)bash(.*) ]] && export BASH_PLUGIN=1 || { if [[ -e $path/plugins/$i ]]; then _source "${path}/plugins/${i}" fi } done + [[ $BASH_PLUGIN ]] || BASH_PLUGIN=0 } initial_warning(){ @@ -168,14 +179,14 @@ # Standard functions. markwarn(){ - echo -e "${warn}${@}" + echo -e "${warn}${@}" } _debug(){ if [ "$debug" == 1 ]; then markwarn $1; fi } -execute(){ +execute(){ check_function mkmenu || source $path/interface check_function save_pids || source $path/internal/childs title=$1; shift; @@ -185,8 +196,8 @@ echo read -p $"Enter extra options to execute: " eopts fi - if [ "$1" == "crack" ]; then shift; fi # FIXME This will not do anything. - if [ "$QUIET" != "" ] || [ "$AUTO" == "1" ]; then + if [ "$1" == "crack" ]; then shift; fi # FIXME This will not do anything. + if [ "$QUIET" != "" ] || [ "$AUTO" == "1" ]; then [[ $NOTITLE ]] || warn "${mark}$title" if [[ $wait_for_execute != 1 ]]; then ${@} $eopts &> /dev/null & @@ -194,29 +205,36 @@ ${@} $eopts &> /dev/null fi else - args="${@}"; args="${args/% /} ${eopts}" # Failsafe, this way if there's a trailing space it'll remove it before executing. + args="${@}"; args="${args/% /} ${eopts}" # Failsafe, this way if there's a trailing space it'll remove it before executing. [[ $wait_for_execute != 1 ]] && { $CDCMD $TERMINAL $HOLDA $TITLEFLAG "$title" $termargs "$args" & } || { $CDCMD $TERMINAL $HOLDA $TITLEFLAG "$title" $termargs "$args" } fi - [[ $debug == 1 ]] && { echo $TERMINAL $HOLDA $TITLEFLAG "$title" $TOPLEFTBIG $BGC $BACKGROUND_COLOR $FGC $DUMPING_COLOR $EXECFLAG "$args"; read; } + [[ $debug == 1 ]] && { echo $TERMINAL $HOLDA $TITLEFLAG "$title" $TOPLEFTBIG $BGC $BACKGROUND_COLOR $FGC $DUMPING_COLOR $EXECFLAG "$args"; read; } save_pids $! } -monmode(){ { ifconfig $1 up; $iwconfig $1 |grep "Monitor" && if [ $? != 0 ]; then MON_PREFIX=$mon_prefix $AIRMON start $1 $2; fi; } &>/dev/null ; } +monmode(){ + { + ifconfig $1 up + [[ $($iwconfig $1) =~ (.*)Mode:Monitor(.*) ]] && { + MON_PREFIX=$mon_prefix $AIRMON start $1 $2 + } + } &>/dev/null +} # this function allows debugging, called from main menu. function debug { - if [ "$debug" == "1" ] || [ "$hold" == "1" ]; then - export HOLD=$HOLDFLAG; echo $"Debug Mode enabled, you'll have to manually close windows" - else export HOLD="" ;fi + if [ "$debug" == "1" ] || [ "$hold" == "1" ]; then + export HOLD=$HOLDFLAG; echo $"Debug Mode enabled, you'll have to manually close windows" + else export HOLD="" ;fi } _read(){ # Read function so we can override it later, to add another interface. - read "${@}"; + read "${@}"; } # Various checks. @@ -249,12 +267,12 @@ } attack_opn(){ # If no encryption detected - $clear && error "Network not encrypted or not network selected"; + $clear && error "Network not encrypted or not network selected"; } capture(){ hardclean - execute "Capturing" $AIRODUMP --ignore-negative-one --bssid $Host_MAC -w $DUMP_PATH/$Host_MAC -c $Host_CHAN -a $wifi + execute "Capturing" $AIRODUMP --ignore-negative-one --bssid $Host_MAC -w $DUMP_PATH/$Host_MAC -c $Host_CHAN -a $wifi echo } @@ -272,9 +290,9 @@ } check_default_software(){ - for program in ${required_software[@]}; do - [[ $(whereis $program) ]] || { echo -en "$program"; warn "not found, quitting." ; exit ; } - done + for program in ${required_software[@]}; do + [[ $(whereis $program) ]] || { echo -en "$program"; warn "not found, quitting." ; exit ; } + done } _source $path/internal/startup
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/attacks/others -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/attacks/others
Changed
@@ -109,13 +109,6 @@ done } -mergethisivs(){ # TODO Untested - for i in $DUMP_PATH/$Host_MAC*.cap; do - cur=$( $cur + `$IVSTOOLS --convert $i /dev/null|grep IVs|awk '{print $2}'`) - done - return $cur -} - mergeallivs(){ # TODO Untested newdir=`mktemp -d` for i in $TMPDIR/*/*.cap; do b=$(( $b + 1 )); $IVSTOOLS --convert $i $newdir/$b; done @@ -123,9 +116,6 @@ read -p $"Select merged data as target? (y/N): " ACP && [[ "$ACP" = $"y" ]] && Host_MAC="merged" } - - - choosewesside(){ while true; do $clear; mkmenu $"Choose Wesside-ng Options" $"No args" $"Selected target" $"Sel. target max retrans" $"Sel. target poor conection" $"Select another target" $"Return to main menu"
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/autocrack -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/autocrack
Changed
@@ -16,8 +16,6 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # FUCKING UNPOLISHED, but... it seems to work. - #ap_array=`cat $DUMP_PATH/dump-02.csv | grep -a -n Station | awk -F : '{print $1}'` - #head -n $ap_array $DUMP_PATH/dump-01.csv &> $DUMP_PATH/dump-02.csv source $path/attacks/others source $path/attacks/injection @@ -38,21 +36,28 @@ } autopwn_scan(){ - launch_counter $time_to_scan & + launch_counter $time_to_scan & choosescan # Choose scan in auto auto auto mode. - sleep $time_to_scan && killall -2 "airodump-ng"; + sleep $time_to_scan && killall -2 "airodump-ng"; + reload_config - cat $DUMP_PATH/dump-01.csv|sed -e '1,/BSSID/ s/.*//' -e '/Station/,$ s/.*//'|tac > $DUMP_PATH/dump-02.csv 2>/dev/null + + while read line; do ⮂ 17:43:43 ⮂ 2013-08-10 + [[ $line =~ ^Station\ MAC,(.*) ]] && next=0; + [[ $next == 1 ]] && echo $line; + [[ $line =~ ^BSSID,(.*) ]] && next=1; + done < ${DUMP_PATH}/dump-01.csv | tac > ${DUMP_PATH}/dump-02.csv + filter_ssid } - -autopwn_selectap(){ + +autopwn_selectap(){ export AUTO=2; selectAp; sleep 1 } autopwn_crack(){ check_function Crack_with_dictionary_generator && { - export wait_for_execute=1; AUTO=1; Crack_with_dictionary_generator autocrack + export wait_for_execute=1; AUTO=1; Crack_with_dictionary_generator autocrack } || { export wait_for_execute=1; AUTO=1; selectcracking 1; AUTO=0; export wait_for_execute=0; } @@ -68,7 +73,7 @@ for i in `seq 1 $MAX_TARGETS`; do echo autopwn selectap - if [ "$Host_SSID" != "" ]; then autopwn network; + if [ "$Host_SSID" != "" ]; then autopwn network; else tag; warn "${mark}Couldn't find essid, trying with next network."; fi done @@ -85,14 +90,14 @@ } autopwn_finish(){ - check_function doexit || source $path/internal/exit; - [[ $options_autoconfigure ]] && { - configure; doexit killme; + check_function doexit || source $path/internal/exit; + [[ $options_autoconfigure ]] && { + configure; doexit killme; } || { read -p "Press c to configure, q to quit, n to next network and any key to get back to main menu" -s -n1 ans [[ "$ans" == "c" ]] && { configure; return 1; } [[ $ans == "n" ]] && return 0 - [[ $ans == "q" ]] && { + [[ $ans == "q" ]] && { warn "${mark}Exiting..." doexit killme ; exit; pkill -9 airoscript-ng; killall -9 airoscript-ng @@ -109,8 +114,8 @@ autopwn_network(){ autopwn setvars 2 - [[ "$Host_ENC" =~ (.*)WPA(.*) ]] && { - enc=wpa; attack_functions=${attack_functions_wpa[@]}; min_ivs=10; + [[ "$Host_ENC" =~ (.*)WPA(.*) ]] && { + enc=wpa; attack_functions=${attack_functions_wpa[@]}; min_ivs=10; } || { enc=wep; attack_functions=${attack_functions_wep} } @@ -119,13 +124,13 @@ tag; echo "${mark}Attack $count. Using $i in $Host_MAC" { ${enc}_attacks $i & cleanp & get_min_ivs; } &> /dev/null - [[ $enc == wpa ]] || { + [[ $enc == wpa ]] || { tag; warn "${mark}Needed ivs: $min_ivs" } - while [ "1" ]; do + while [ "1" ]; do sleep 5 - autopwn finished && { + autopwn finished && { # We have enough ivs echo; tag; warn "${mark}Trying to crack network, we have enough ivs or handshakes."; autopwn crack && autopwn_print_crack_status @@ -148,11 +153,11 @@ autopwn_print_crack_status(){ [[ -e $DUMP_PATH/$Host_MAC.key ]] && \ warn "${mark}Network cracked, password is `cat $DUMP_PATH/$Host_MAC.key`" || \ - autopwn failed_cracking + autopwn failed_cracking } autopwn_print_capture_status(){ - [[ "$Host_ENC" =~ (.*)WPA(.*) ]] && { + [[ "$Host_ENC" =~ (.*)WPA(.*) ]] && { specialwarn "\r\t${mark}Current Handshakes: $handshakes. Press a to go to next attack, m for menu, for next network" ; } || { specialwarn "\r\t${mark}Current IVS: `check_all_ivs`. Press a to go to next attack, m for menu, n for next network" ; @@ -163,7 +168,11 @@ [[ $ans == "k" ]] && return 20 [[ $ans == "a" ]] } -check_all_ivs(){ awk "/^$Host_MAC/ { gsub(/,/, \"\", \$14); print \$14; }" ${DUMP_PATH}/${Host_MAC}-01.csv; } +check_all_ivs(){ + while IFS=, read -a line; do + [[ ${line[0]} == "${Host_MAC}" ]] && echo ${line[10]} ; + done < ${DUMP_PATH}/${Host_MAC}-01.csv; +} get_min_ivs(){ [[ "$Host_ENC" =~ (.*)WPA(.*) ]] && { min_ivs=10; return; } @@ -176,8 +185,14 @@ [[ "$a" == 255 ]] && min_ivs=$autopwn_min_ivs || min_ivs=$a } -check_if_handshake(){ - handshakes=$(awk '/handshake/ {gsub(/\(/, "", $5); print $5}' <( $AIRCRACK $DUMP_PATH/$Host_MAC-01.cap ) ) +get_handshake_number(){ + while read -a line; do + [[ ${line[@]} =~ (.*)handshake(.*) ]] && echo ${line[-2]/(/}; + done < <( aircrack-ng ${DUMP_PATH}/${Host_MAC}-01.cap & sleep 0.5 && kill $! ) +} + +check_if_handshake(){ + export handshakes=$(get_handshake_number); [[ $handshakes == "" ]] && handshakes=0 (( $handshakes > 0 )) && return 0 || return 1 }
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/interface -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/interface
Changed
@@ -16,12 +16,12 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. notify(){ - tput sc - msg="${@}"; x=$(( $(tput cols) - ( ${#msg} + 20 ) )); - tput cup 0 $x - echo $msg; - tput rc - notification=""; + tput sc + msg="${@}"; x=$(( $(tput cols) - ( ${#msg} + 20 ) )); + tput cup 0 $x + echo $msg; + tput rc + notification=""; } _(){ @@ -36,8 +36,8 @@ default_theme(){ markwarn $'Theme file does not exists, using defaults...' - DUMPING_COLOR="#FFFFFF"; INJECTION_COLOR="#1DFF00" - ASSOCIATION_COLOR="#FF0009"; DEAUTH_COLOR="#99CCFF"; BACKGROUND_COLOR="#000000" + DUMPING_COLOR="#FFFFFF"; INJECTION_COLOR="#1DFF00" + ASSOCIATION_COLOR="#FF0009"; DEAUTH_COLOR="#99CCFF"; BACKGROUND_COLOR="#000000" } @@ -54,7 +54,7 @@ } fill_menu(){ - len=$(( $1 - $2 )); for i in `seq 0 $len`; do echo -n "$3"; done; + len=$(( $1 - $2 )); for i in `seq 0 $len`; do echo -n "$3"; done; } fill(){ @@ -63,25 +63,25 @@ fill_menu $loop_times 1 "$separator";echo -n "$title";fill_menu $loop_times 1 "$separator" } -function mkbox(){ - echo -n "+"; fill "$menu_t" "$separator_h" "$(( $max + ${#menu_t} ))" center; +function mkbox(){ + echo -n "+"; fill "$menu_t" "$separator_h" "$(( $max + ${#menu_t} ))" center; echo "+" } -temporary_switch_clear(){ +temporary_switch_clear(){ temp="$oldclear"; oldclear=$clear; clear=$temp; $@ ; clear=$oldclear -} +} airoscript_quiet(){ - mkdir -p $DUMP_PATH/Terminals/ &>/dev/null - title=$(echo $1| sed 's/ /_/g'); shift; - $@ &> "$DUMP_PATH/Terminals/${title}" & + mkdir -p $DUMP_PATH/Terminals/ &>/dev/null + title=${1/ /_}; shift + $@ &> "$DUMP_PATH/Terminals/${title}" & } vline(){ for i in `seq 0 $1`; do echo -n "-"; done; } -mkmenuline(){ echo -en "$separator_x"; for i in $(seq 1 $1); do echo -en "$separator_h"; done; echo "$separator_x"; } +mkmenuline(){ echo -en "$separator_x"; for i in $(seq 1 $1); do echo -en "$separator_h"; done; echo "$separator_x"; } mkmenuheader(){ echo -en "\033[$(($2 / 2 - (${#1} / 2 - 10) ))C$1\n"; } getmaxlenfromlist(){ max=0; for i in "${@}"; do [[ ${#i} -gt $max ]] && max=${#i}; done; echo $max; } mkmenueline(){ echo -en "${separator_v}\033[${1}C${separator_v}\033[${1}D${white}${2}${red})${end} ${separator_v}";} @@ -90,13 +90,13 @@ mkmenu(){ if [ "$AUTO" == 2 ]; then return; fi [[ ${ERRORS} ]] && markwarn "Error:" "${ERRORS[@]}" - ERRORS="" + ERRORS="" [[ ${INFOS} ]] && markwarn "Info:" "${INFOS[@]}" - INFOS="" + INFOS="" max=`getmaxlenfromlist "${@}"` max=$(( $max + 10 )) title=$1; shift; line=0; - f=$((`tput cols` - 10)); + f=$((`tput cols` - 10)); title=($(_ "${title}")) mkmenuheader "${title[@]}" $max mkmenuline $max
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/internal/childs -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/internal/childs
Changed
@@ -13,12 +13,20 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -get_childs(){ - ps axo ppid,pid|awk "/$1/ {print \$2}"|grep -v "$pid" +get_childs(){ + while read r; do + [[ $r =~ (.*)$1(.*) ]] && { + [[ $BASH_REMATCH[1] != $2 ]] && echo $BASH_REMATCH[1]; + } + done < <(ps -eo ppid,pid) } -clean_processes(){ - for i in `ls /var/run/airoscript/`; do kill -2 $i; rm /var/run/airoscript/$i; done; +clean_processes(){ + for i in /var/run/airoscript/*; do + i=$(basename $i); + kill -2 $i; + rm /var/run/airoscript/$i; + done; } save_pids(){
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/internal/exit -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/internal/exit
Changed
@@ -13,12 +13,19 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -delete_vinterfaces(){ for i in $(awk "/$MON_PREFIX/ {print \$1}" <(airmon-ng)); do iw dev $i del; done; } +delete_vinterfaces(){ + while read interface; do + [[ $interface =~ ^$MON_PREFIX(.*)\S*(.*) ]] && { + iw dev ${MON_PREFIX}${BASH_REMATCH[1]} del + } + done < <($AIRMON) +} + deconfigure(){ airmon-ng stop $wifi &> /dev/null ; delete_vinterfaces &>/dev/null; } -delete_dpath(){ grep "tmp" <<< $DUMP_PATH && rm -r $DUMP_PATH &>/dev/null; } # First checks if there is tmp in dump_path, so dump_path will have to have tmp on it. That's because of some old trouble having dump_path as /home/xayon/ ... ¬¬ (Note: I've been asked more than twice so I clear it here: i didn't lost anything, I have all in sync with a git repository =) ) +delete_dpath(){ [[ $DUMP_PATH =~ /tmp/(.*) ]] && rm -r $DUMP_PATH &>/dev/null; } doexit(){ - check_function make_report || source $path/reporting + check_function make_report || source $path/reporting [[ -e $DUMP_PATH/$Host_MAC.key ]] && { yesno "Create a full report?" && { warn "${mark}Creating report"; make_report;
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/internal/scansel -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/internal/scansel
Changed
@@ -26,54 +26,72 @@ select_target(){ if [ "$AUTO" == 2 ]; then return; fi - help_fifo $"${mark}${red}Select a client${end}\n"\ - "At this step, you have to choose how to look for target clients\n"\ - "Target clients will be used later, to make attacks directed at them\n"\ - "This step is not obligatory, but might come handy if the network has some clients on it"\ - "${red} If you're about to attack, attacks will be performed differently if you choose not to select a client (most of the times with a fake auth), so, don't worry if there are none ${end}" + help_fifo $"${mark}${red}Select a client${end}\n"\ + "At this step, you have to choose how to look for target clients\n"\ + "Target clients will be used later, to make attacks directed at them\n"\ + "This step is not obligatory, but might come handy if the network has some clients on it"\ + "${red} If you're about to attack, attacks will be performed differently if you choose not to select a client (most of the times with a fake auth), so, don't worry if there are none ${end}" while true; do echo "Selecting client" - mkmenu $"Client Selection"\ - $"Select client"\ - $"Enable dynamic mode (ask for client in each attack)"\ - $"Manually enter client MAC" "No select client" - - case $choice in - 1 ) auto_scan_clients; select_client; break;; - 2 ) dynamic_client_selection=1; break;; - 3 ) single_question $"Type in client mac now"; Client_MAC="$ans"; set -- ${Client_MAC} ; break ;; - 4 ) Client_MAC=""; break ;; - * ) echo -e $"Unknown response. Try again";; - esac - done + mkmenu $"Client Selection"\ + $"Select client"\ + $"Enable dynamic mode (ask for client in each attack)"\ + $"Manually enter client MAC" "No select client" + + case $choice in + 1 ) auto_scan_clients; select_client; break;; + 2 ) dynamic_client_selection=1; break;; + 3 ) single_question $"Type in client mac now"; Client_MAC="$ans"; set -- ${Client_MAC} ; break ;; + 4 ) Client_MAC=""; break ;; + * ) echo -e $"Unknown response. Try again";; + esac + done } auto_scan_clients(){ - rm $DUMP_PATH/Client_$Host_MAC* &>/dev/null + rm $DUMP_PATH/Client_$Host_MAC* &>/dev/null launch_counter $time_to_scan "clients" & - INTERACTIVE=0; AUTO=2; QUIET=1; NOTITLE=1; - wait_for_execute=0 - execute "" $AIRODUMP --ignore-negative-one --bssid $Host_MAC -w $DUMP_PATH/Client_$Host_MAC -c $Host_CHAN -a $wifi - sleep $time_to_scan && killall -2 "airodump-ng"; + INTERACTIVE=0; AUTO=2; QUIET=1; NOTITLE=1; + wait_for_execute=0 + execute "" $AIRODUMP --ignore-negative-one --bssid $Host_MAC -w $DUMP_PATH/Client_$Host_MAC -c $Host_CHAN -a $wifi + sleep $time_to_scan && killall -2 "airodump-ng"; export SCAN=0; AUTO=0; QUIET=""; NOTITLE=0 } +get_clients(){ + rm $DUMP_PATH/Client_${Host_MAC}_all.csv + cat $DUMP_PATH/Client_${Host_MAC}*.csv > $DUMP_PATH/Client_${Host_MAC}_all.csv + + while read line; do + IFS=',' read -a line_ <<< "$line" + [[ ${line[2]} =~ ${Host_MAC} ]] && [[ ${line[1]} != "00:00:00:00" ]] && echo ${line[1]} + done < $DUMP_PATH/Client_${Host_MAC}_all.csv + + echo "None" "Rescan" +} + +i_have_to_return() { + # TODO: Move this to internal + if [ "$AUTO" == "1" ]; then return 0; fi; + return 1; +} select_client(){ - if [ "$AUTO" == "1" ]; then return; fi; - HOST=(`cat $DUMP_PATH/Client_$Host_MAC* | grep -a $Host_MAC | awk '{ print $1 }'| grep -a -v 00:00:00:00| grep -a -v $Host_MAC|sed 's/,//'`); - while [ "1" ]; do - mkmenu $"Select client" ${HOST[@]} "None" "Rescan" - (( $choice < $(( ${#HOST[@]} + 3 )) )) && break - done - - export Client_MAC=`echo ${HOST[$choice -1]} | awk '{split($1, info, "," ); print info[1] }'`; - (( $choice == $(( ${#HOST[@]} + 1 )) )) && { $MACCHANGER $wificard $FAKE_MAC ; Client_MAC=""; directed=0; return; } - (( $choice == $(( ${#HOST[@]} + 2 )) )) && { auto_scan_clients; select_client; return; } - { - ifconfig $wifi down; $MACCHANGER $wifi --mac $Client_MAC; ifconfig $wifi up; - ifconfig $iwifi down; $MACCHANGER $iwifi --mac $Client_MAC; ifconfig $iwifi up; - ifconfig $wificard down; $MACCHANGER $wificard --mac $Client_MAC; ifconfig $wificard up - } &>/dev/null + i_have_to_return && return + + while [ "1" ]; do + mkmenu $"Select client" $(get_clients) + (( $choice < $(( ${#HOST[@]} + 3 )) )) && break + done + + IFS=, read -a elem <<< ${HOST[$choice-1]}; Client_MAC=${elem[1]}; + + (( $choice == $(( ${#HOST[@]} + 1 )) )) && { change_mac $wificard $FAKE_MAC; Client_MAC=""; directed=0; return; } + (( $choice == $(( ${#HOST[@]} + 2 )) )) && { auto_scan_clients; select_client; return; } + { + change_mac $wifi $Client_MAC + change_mac $iwifi $Client_MAC + change_mac $wificard $Client_MAC + } &>/dev/null }
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/internal/startup -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/internal/startup
Changed
@@ -23,7 +23,15 @@ } bsd_interfaces(){ - for i in $( ifconfig | awk '/flags/ { print $1}'|cut -d: -f1 ); do { ifconfig $i | grep "wlan" &>/dev/null && echo $i ; } ; done + for i in $( ifconfig | awk '/flags/ { print $1}'|cut -d: -f1 ); do { ifconfig $i | grep "wlan" &>/dev/null && echo $i ; } ; done +} + +linux_interfaces() { + while read r; do [[ $r =~ (.*)IEEE\ 802.11(.*) ]] && { iw=${BASH_REMATCH[1]}; [[ $r =~ (.*)Mode:Monitor(.*) ]] || echo $iw; }; done < <(iwconfig 2>/dev/null) +} + +all_interfaces() { + while read r; do [[ $r =~ (^[0-9]+)(.*):(.*):(.*) ]] && echo ${BASH_REMATCH[3]}; done < <(ip link 2>/dev/null) } setinterface(){ @@ -33,17 +41,17 @@ "If you're using it to connect to the internet, you'll be most likely disconnected " declare -a INTERFACES - [[ "$wifi" != "" ]] && [[ "$1" == "start" ]] && [[ "$set_wifi_by_args" == 1 ]] || { + [[ "$wifi" != "" ]] && [[ "$1" == "start" ]] && [[ "$set_wifi_by_args" == 1 ]] || { if [ "$1" == "" ] || [[ "$1" == 1 ]] || [ "$1" == "start" ] ; then - if [ "$show_only_wireless_extensions" == 1 ]; then - [[ -e /bsd ]] && { - INTERFACES=( $(bsd_interfaces) ) - } || { - INTERFACES=(`{ iwconfig|grep -v "no wireless extensions"|grep IEEE|grep -v mon|grep -v airoscript|awk '{print $1}';} 2>/dev/null`) - } - else - INTERFACES=(`ip link|egrep "^[0-9]+"|awk '/: /{gsub(":"," "); print $2}' |grep -v lo`) - fi + if [ "$show_only_wireless_extensions" == 1 ]; then + [[ -e /bsd ]] && { + INTERFACES=( $(bsd_interfaces) ) + } || { + INTERFACES=( $(linux_interfaces) ) + } + else + INTERFACES=( $(all_interfaces) ) + fi fi _askinterface [[ "$DEFAULT_MONITOR_MODE" == 1 ]] &&{ ac="start"; } || { @@ -51,7 +59,7 @@ [[ "$ans" != n ]] && ac="start" || ac="stop" } { guess_idata $ac; testmac; } &>/dev/null - } + } export iwifi=$wifi @@ -69,9 +77,9 @@ } checkforcemac() { - if [ "$force_mac_address" == "1" ]; then $clear && warn "${mark}Warn: Not checking mac" + if [ "$force_mac_address" == "1" ]; then $clear && warn "${mark}Warn: Not checking mac" else - export mac=`$MACCHANGER -s $wificard|awk '/Current/ {print $3}'` + export mac=$(get_current_mac); if [ "$FAKE_MAC" != "$mac" ]; then wichchangemac_startup &>/dev/null; fi @@ -79,50 +87,48 @@ } guess_idata(){ - AIROUTPUT=$($AIRMON $1 $wificard|grep -v "running"|grep -A 1 $wificard); - [[ $AIROUTPUT =~ (.*)-(.*)phy(.*)monitor\ mode\ enabled\ on(.*)\) ]]; tmpwifi="${BASH_REMATCH[4]}"; - AIROUTPUT=( ${BASH_REMATCH[1]} ); # Messy, but works. - export DRIVER=${AIROUTPUT[@]: -1}; export TYPE="${a[1]} ${a[2]}" - export TYPE="${AIROUTPUT[1]} ${AIROUTPUT[2]}" - echo $DRIVER $TYPE - if [[ "$tmpwifi" =~ (.*)[0-9] ]]; then wifi=$tmpwifi; else wifi=$wificard; fi + declare -a monitorlines line + while read -a line; do + [[ ${line[@]} =~ ^$wificard ]] && { + phy=${line[-1]}; + [[ ${line[@]} =~ "- ${phy}" ]] && { + monitorlines=("${line[@]}") + getNextLine=1 + } + } || { + [[ $getNextLine == 1 ]] && { + export wifi=${line[-1]/)/} + getNextLine=0 + } + } + done < <(airmon-ng start $wificard) + export iwifi=${wifi} + export fisical=${monitorlines[-1]} + export DRIVER=${monitorlines[-3]} + export TYPE=${monitorlines[1]} } wichchangemac_startup(){ - ifconfig $wifi down; $MACCHANGER $wifi --mac $FAKE_MAC; ifconfig $wifi up; - ifconfig $iwifi down; $MACCHANGER $iwifi --mac $FAKE_MAC; ifconfig $iwifi up; - ifconfig $wificard down; $MACCHANGER $wificard --mac $FAKE_MAC; ifconfig $wificard up - return # Disabled =) + change_mac $wificard $FAKE_MAC + change_mac $wifi $FAKE_MAC + change_mac $iwifi $FAKE_MAC } + wichchangemac(){ while true; do [[ "$1" != "" ]] && { startup_mac_set=$1; choice=$1; } || { mkmenu "Select MAC options" "Change MAC to FAKEMAC" "Change MAC to CLIENTMAC" "Use real MAC" "Manual Mac Input" } case $choice in - 1 ) ifconfig $wifi down &>/dev/null;fail=`$MACCHANGER -m $FAKE_MAC $wifi 2>&1` - [[ $? == 0 ]] && echo -e "${mark}Interface mac set up correctly" || echo -en "${mark}Unable to set interface mac: $?\n $fail" - ifconfig $wifi up &>/dev/null; break ;; - 2 ) ifconfig $wifi down &>/dev/null; sleep 2 - fail=`$MACCHANGER -m $Client_MAC $wifi 2>&1` - [[ $? == 0 ]] && echo -e "${mark}Interface mac set up correctly" || echo -en "${mark}Unable to set interface mac: $?\n $fail" - ifconfig $wifi up &>/dev/null ; break ;; - 3) export FAKE_MAC=$mac - warn "${mark}Using for $wificard $FAKE_MAC = $mac" - ifconfig $wifi down &>/dev/null; sleep 2; - $MACCHANGER -m $mac $wifi &>/dev/null - ifconfig $wifi up &>/dev/null; - break;; - 4 ) single_question "MAC: "; Manual_MAC="$ans"; - ifconfig $wifi down &>/dev/null - fail=`$MACCHANGER -m $Manual_MAC $wifi &>/dev/null` - [[ $? == 0 ]] && echo -e "${mark}Interface mac set up correctly" || echo -en "${mark}Unable to set interface mac: $?\n $fail" - ifconfig $wifi up &>/dev/null; break ;; - - * ) echo $"Unknown response. Try again" ;; - + 1) change_mac $wifi $FAKE_MAC; break ;; + 2) change_mac $wifi $Client_MAC; break ;; + 3) export FAKE_MAC=$(get_current_mac); + change_mac $wifi $FAKE_MAC; break ;; + 4) single_question "MAC: "; Manual_MAC="$ans"; + change_mac $wifi $Manual_MAC; break ;; + *) echo $"Unknown response. Try again" ;; esac done } @@ -133,8 +139,8 @@ selectap_wrapper(){ while [ "1" ]; do mkmenueline $max r; echo " Rescan targets"; mkmenuline $max - special_single_question "Select Target: "; - choice=$ans; + special_single_question "Select Target: "; + choice=$ans; is_number $choice && break done } @@ -145,13 +151,15 @@ filter_ssid(){ [[ -n "$filter_ssid_" ]] && { echo; echo; tag; warn "${mark}Filtering essid to $filter_ssid_ " - grep -a "$filter_ssid_" $DUMP_PATH/dump-01.csv > $DUMP_PATH/dump-02.csv; - } + while read line; do + [[ $line =~ (.*)${filter_ssid_}(.*) ]] && echo $line >> $DUMP_PATH/dump-02.csv + done <<< $DUMP_PATH/dump-01.csv + } } # Some various functions that didn't know where to put them selectAp(){ - k=0; i=0; + k=0; i=0; if [ "$AUTO" == 2 ]; then choice=$CURRENT @@ -163,7 +171,7 @@ echo mkmenuheader "Detected access points" $max mkmenuline $max - fi + fi while IFS=, read MAC FTS LTS CHANNEL SPEED PRIVACY CYPHER AUTH POWER BEACON IV LANIP IDLENGTH ESSID KEY;do $(valid_mac "$MAC") && { @@ -174,12 +182,12 @@ echo -e " $MAC | $CHANNEL | $PRIVACY | $POWER | $IDLENGTH | $ESSID" fi aidlenght=$IDLENGTH - assid[$k]=$ESSID; achannel[$k]=$CHANNEL; + assid[$k]=$ESSID; achannel[$k]=$CHANNEL; amac[$k]=$MAC; aprivacy[$k]=$PRIVACY; aspeed[$k]=$SPEED; apower[$k]=$POWER } done < $DUMP_PATH/dump-02.csv - + if [ "$AUTO" != 2 ]; then selectap_wrapper; fi if [ "$choice" != "r" ] ; then
View file
aircrack-ng-1.2-beta1.tar.gz/scripts/airoscript-ng/src/functions/menu -> aircrack-ng-1.2-beta2.tar.gz/scripts/airoscript-ng/src/functions/menu
Changed
@@ -15,16 +15,16 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. mainmenu(){ - $clear + $clear - [[ $TERMINAL == "airoscript_quiet" ]] && { - [[ $notification != "" ]] && notify $notification; - mkmenu $"Main Menu" $"Attack - Attack target" $"Crack - Get target key" $"Select - Reselect target" $"Others - Various utilities" $"Autopwn- Automatic cracking" "Window - Window list" $"Exit - Quits" - window=1; - } || { - [[ $notification != "" ]] && notify $notification; - mkmenu $"Main Menu" $"Attack - Attack target" $"Crack - Get target key" $"Select - Reselect target" $"Others - Various utilities" $"Autopwn- Automatic cracking" $"Exit - Quits" - } + [[ $TERMINAL == "airoscript_quiet" ]] && { + [[ $notification != "" ]] && notify $notification; + mkmenu $"Main Menu" $"Attack - Attack target" $"Crack - Get target key" $"Select - Reselect target" $"Others - Various utilities" $"Autopwn- Automatic cracking" "Window - Window list" $"Exit - Quits" + window=1; + } || { + [[ $notification != "" ]] && notify $notification; + mkmenu $"Main Menu" $"Attack - Attack target" $"Crack - Get target key" $"Select - Reselect target" $"Others - Various utilities" $"Autopwn- Automatic cracking" $"Exit - Quits" + } for choix in ${choice[*]}; do case "$choix" in 1) menu_attack;; @@ -36,22 +36,22 @@ 7) check_function doexit || source $path/internal/exit; doexit;; *) $clear && markwarn $"ERROR: Wrong number entered";; esac - done + done mainmenu } menu_windows(){ - cd $DUMP_PATH/Terminals - clear; - windows=(*) - mkmenu "Window list" * "Back to main menu" - [[ $choice == ${#windows} ]] && return; - echo; clear; - notify "Press ctrl + c to return to airoscript" - tail_launched=1; - tail -f "${windows[$choice - 1]}" - tail_launched=0; - cd - + cd $DUMP_PATH/Terminals + clear; + windows=(*) + mkmenu "Window list" * "Back to main menu" + [[ $choice == ${#windows} ]] && return; + echo; clear; + notify "Press ctrl + c to return to airoscript" + tail_launched=1; + tail -f "${windows[$choice - 1]}" + tail_launched=0; + cd - } menu_attack(){ monmode &>/dev/null @@ -62,16 +62,16 @@ menu_crack(){ check_function crack_wep || source $path/crack/main - [[ ! -e $DUMP_PATH/$Host_MAC-01.cap ]] && { error $"You have no IVS, please attack first." ; return; } - while true; do - mkmenu $"WEP/WPA Cracking Options" $"Crack with manual dictionary" $"Standard aircrack-ng" $"Return to menu" + [[ ! -e $DUMP_PATH/$Host_MAC-01.cap ]] && { error $"You have no IVS, please attack first." ; return; } + while true; do + mkmenu $"WEP/WPA Cracking Options" $"Crack with manual dictionary" $"Standard aircrack-ng" $"Return to menu" case $choice in - 1 ) export crack_extra_opts=" -w $WORDLIST"; selectcracking; break ;; - 2 ) selectcracking ; break ;; - 3 ) $clear; break;; - * ) echo $"Unknown response. Try again" ;; - esac - done + 1 ) export crack_extra_opts=" -w $WORDLIST"; selectcracking; break ;; + 2 ) selectcracking ; break ;; + 3 ) $clear; break;; + * ) echo $"Unknown response. Try again" ;; + esac + done } menu_type(){ @@ -109,17 +109,22 @@ select_ap(){ check_function select_target || source $path/internal/scansel - if [ -e $DUMP_PATH/dump-01.csv ]; then - cat $DUMP_PATH/dump-01.csv|sed -e '1,/BSSID/ s/.*//' -e '/Station/,$ s/.*//'|tac > $DUMP_PATH/dump-02.csv 2>/dev/null + if [ -e $DUMP_PATH/dump-01.csv ]; then + while read line; do + [[ $line =~ ^Station\ MAC,(.*) ]] && next=0; + [[ $next == 1 ]] && echo $line; + [[ $line =~ ^BSSID,(.*) ]] && next=1; + done < ${DUMP_PATH}/dump-01.csv | tac > ${DUMP_PATH}/dump-02.csv + filter_ssid - selectAp; $clear - if [ "$Host_SSID" = $'\r' ]; then blankssid; - elif [ "$Host_SSID" = "No SSID has been detected" ]; then blankssid; fi - select_target; target - else $clear && markwarn $'ERROR: You have to scan for targets first'; fi + selectAp; $clear + if [ "$Host_SSID" = $'\r' ]; then blankssid; + elif [ "$Host_SSID" = "No SSID has been detected" ]; then blankssid; fi + select_target; target + else $clear && markwarn $'ERROR: You have to scan for targets first'; fi } -menu_extra(){ +menu_extra(){ check_function menu_options || source $path/attacks/others while true; do mkmenu $"Extra tools" $"Airoscript Options" $"Advanced tools" $"External plugins" $'User interfaces' $"Return to main menu" @@ -127,7 +132,7 @@ 1) menu_options; $clear; break;; 2) othertmenu; $clear; break;; 3) menu_plugins; $clear; break;; - 3) menu_interfaces; $clear; break;; + 3) menu_interfaces; $clear; break;; 4) $clear;break ;; * ) echo $"Unknown response. Try again" ;; esac @@ -135,11 +140,11 @@ } menu_interfaces(){ - mkmenu "User interfaces" "${interfaces[@]}" - _source $path/plugins/${interfaces[$choice - 1]} + mkmenu "User interfaces" "${interfaces[@]}" + _source $path/plugins/${interfaces[$choice - 1]} } menu_plugins(){ a_menu=( "${p_menu[@]}" ); a_menu+=("Return to main menu"); mkmenu "External plugins" "${a_menu[@]}" - $(sed 's/ /_/g' <<< ${p_menu[$choice - 1]}) || { $clear; warn "Wrong option, try again"; menu_plugins; } + ${p_menu[$choice - 1]/ /_} || { $clear; warn "Wrong option, try again"; menu_plugins; } }
View file
aircrack-ng-1.2-beta1.tar.gz/src/Makefile -> aircrack-ng-1.2-beta2.tar.gz/src/Makefile
Changed
@@ -55,10 +55,10 @@ OBJS_AT = airtun-ng.o common.o crypto.o osdep/radiotap/radiotap-parser.o OBJS_IV = ivstools.o common.o crypto.o uniqueiv.o OBJS_AS = airserv-ng.o common.o osdep/radiotap/radiotap-parser.o -OBJS_WS = wesside-ng.o crypto.c common.o osdep/radiotap/radiotap-parser.o $(OBJS_PTW) -OBJS_BS = besside-ng.o crypto.c common.o osdep/radiotap/radiotap-parser.o $(OBJS_PTW) +OBJS_WS = wesside-ng.o crypto.o common.o osdep/radiotap/radiotap-parser.o $(OBJS_PTW) +OBJS_BS = besside-ng.o crypto.o common.o osdep/radiotap/radiotap-parser.o $(OBJS_PTW) OBJS_BC = besside-ng-crawler.o -OBJS_AL = airolib-ng.o crypto.c common.o +OBJS_AL = airolib-ng.o crypto.o common.o OBJS_ES = easside-ng.o common.o osdep/radiotap/radiotap-parser.o OBJS_BUDDY = buddy-ng.o common.o OBJS_MI = makeivs-ng.o common.o uniqueiv.o @@ -223,7 +223,7 @@ -rm -f $(DESTDIR)$(sbindir)/tkiptun-ng$(EXE) -rm -rf $(DESTDIR)$(etcdir) -check: aircrack-ng$(EXE) +check: all ./aircrack-ng$(EXE) -w $(TEST_DIR)/password.lst -a 2 -e Harkonen -q $(TEST_DIR)/wpa2.eapol.cap | grep 'KEY FOUND! \[ 12345678 \]' ./aircrack-ng$(EXE) -w $(TEST_DIR)/password.lst -a 2 -e test -q $(TEST_DIR)/wpa.cap | grep 'KEY FOUND! \[ biscotte \]' ./aircrack-ng$(EXE) -w $(TEST_DIR)/password.lst -a 2 -e linksys -q $(TEST_DIR)/wpa2-psk-linksys.cap | grep 'KEY FOUND! \[ dictionary \]'
View file
aircrack-ng-1.2-beta1.tar.gz/src/airbase-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/airbase-ng.c
Changed
@@ -2,7 +2,7 @@ * 802.11 monitor AP * based on airtun-ng * - * Copyright (C) 2008-2010 Thomas d'Otreppe + * Copyright (C) 2008-2013 Thomas d'Otreppe * Copyright (C) 2008, 2009 Martin Beck * * This program is free software; you can redistribute it and/or modify @@ -116,7 +116,10 @@ "\xB4\x00\x4E\x04\xBB\xBB\xBB\xBB\xBB\xBB\xCC\xCC\xCC\xCC\xCC\xCC" #define RATES \ - "\x01\x04\x02\x04\x0B\x16\x32\x08\x0C\x12\x18\x24\x30\x48\x60\x6C" + "\x01\x04\x02\x04\x0B\x16" + +#define EXTENDED_RATES \ + "\x32\x08\x0C\x12\x18\x24\x30\x48\x60\x6C" #define PROBE_REQ \ "\x40\x00\x00\x00\xFF\xFF\xFF\xFF\xFF\xFF\xCC\xCC\xCC\xCC\xCC\xCC" \ @@ -134,10 +137,12 @@ "\x30\x14\x01\x00\x00\x0f\xac\x02\x01\x00\x00\x0f\xac\x01\x01\x00" \ "\x00\x0f\xac\x02\x01\x00" -#define WPA_TAGS \ +#define ALL_WPA2_TAGS \ "\x30\x28\x01\x00\x00\x0f\xac\x01\x05\x00\x00\x0f\xac\x01\x00\x0f" \ "\xac\x02\x00\x0f\xac\x03\x00\x0f\xac\x04\x00\x0f\xac\x05\x02\x00" \ - "\x00\x0f\xac\x01\x00\x0f\xac\x02\x03\x00" \ + "\x00\x0f\xac\x01\x00\x0f\xac\x02\x03\x00" + +#define ALL_WPA1_TAGS \ "\xdd\x2A\x00\x50\xf2\x01\x01\x00\x00\x50\xf2\x02\x05\x00\x00\x50" \ "\xf2\x01\x00\x50\xf2\x02\x00\x50\xf2\x03\x00\x50\xf2\x04\x00\x50" \ "\xf2\x05\x02\x00\x00\x50\xf2\x01\x00\x50\xf2\x02" @@ -150,7 +155,7 @@ char usage[] = "\n" -" %s - (C) 2008-2010 Thomas d'Otreppe\n" +" %s - (C) 2008-2013 Thomas d'Otreppe\n" " Original work: Martin Beck\n" " http://www.aircrack-ng.org\n" "\n" @@ -2334,6 +2339,8 @@ if(memcmp(bssid, opt.r_bssid, 6) != 0) return -1; + packet[21] ^= ((rand() % 255)+1); //Sohail:flip sender MAC address since few clients do not honor ARP from its own MAC + if(opt.nb_arp >= opt.ringbuffer) return -1; @@ -3013,11 +3020,16 @@ packet[length] = 0x03; packet[length+1] = 0x01; temp_channel = wi_get_channel(_wi_in); //current channel - if ((temp_channel > 255 || temp_channel < 1) && !invalid_channel_displayed) { - // Display error message once - invalid_channel_displayed = 1; - fprintf(stderr, "Error: Got channel %d, expected a value < 256. Please report.\n", temp_channel); - } + if (!invalid_channel_displayed) { + if (temp_channel > 255) { + // Display error message once + invalid_channel_displayed = 1; + fprintf(stderr, "Error: Got channel %d, expected a value < 256.\n", temp_channel); + } else if (temp_channel < 1) { + invalid_channel_displayed = 1; + fprintf(stderr, "Error: Got channel %d, expected a value > 0.\n", temp_channel); + } + } packet[length+2] = ((temp_channel > 255 || temp_channel < 1) && opt.channel != 0) ? opt.channel : temp_channel; length += 3; @@ -3026,27 +3038,32 @@ memcpy(packet + 10, opt.r_bssid, 6); memcpy(packet + 16, opt.r_bssid, 6); + // TODO: See also about 100 lines below if( opt.allwpa ) { - memcpy(packet+length, WPA_TAGS, 0x56); - length += 0x56; + memcpy(packet+length, ALL_WPA2_TAGS, sizeof(ALL_WPA2_TAGS) -1); + length += sizeof(ALL_WPA2_TAGS) -1; + memcpy(packet+length, ALL_WPA1_TAGS, sizeof(ALL_WPA1_TAGS) -1); + length += sizeof(ALL_WPA1_TAGS) -1; } - - if(opt.wpa2type > 0) - { - memcpy(packet+length, WPA2_TAG, 22); - packet[length+7] = opt.wpa2type; - packet[length+13] = opt.wpa2type; - length += 22; - } - - if(opt.wpa1type > 0) + else { - memcpy(packet+length, WPA1_TAG, 24); - packet[length+11] = opt.wpa1type; - packet[length+17] = opt.wpa1type; - length += 24; - } + if(opt.wpa2type > 0) + { + memcpy(packet+length, WPA2_TAG, 22); + packet[length+7] = opt.wpa2type; + packet[length+13] = opt.wpa2type; + length += 22; + } + + if(opt.wpa1type > 0) + { + memcpy(packet+length, WPA1_TAG, 24); + packet[length+11] = opt.wpa1type; + packet[length+17] = opt.wpa1type; + length += 24; + } + } send_packet(packet, length); @@ -3111,11 +3128,16 @@ packet[length] = 0x03; packet[length+1] = 0x01; temp_channel = wi_get_channel(_wi_in); //current channel - if ((temp_channel > 255 || temp_channel < 1) && !invalid_channel_displayed) { - // Display error message once - invalid_channel_displayed = 1; - fprintf(stderr, "Error: Got channel %d, expected a value < 256. Please report.\n", temp_channel); - } + if (!invalid_channel_displayed) { + if (temp_channel > 255) { + // Display error message once + invalid_channel_displayed = 1; + fprintf(stderr, "Error: Got channel %d, expected a value < 256.\n", temp_channel); + } else if (temp_channel < 1) { + invalid_channel_displayed = 1; + fprintf(stderr, "Error: Got channel %d, expected a value > 0.\n", temp_channel); + } + } packet[length+2] = ((temp_channel > 255 || temp_channel < 1) && opt.channel != 0) ? opt.channel : temp_channel; length += 3; @@ -3124,26 +3146,31 @@ memcpy(packet + 10, opt.r_bssid, 6); memcpy(packet + 16, opt.r_bssid, 6); + // TODO: See also around ~3500 if( opt.allwpa ) { - memcpy(packet+length, WPA_TAGS, 0x56); - length += 0x56; + memcpy(packet+length, ALL_WPA2_TAGS, sizeof(ALL_WPA2_TAGS) -1); + length += sizeof(ALL_WPA2_TAGS) -1; + memcpy(packet+length, ALL_WPA1_TAGS, sizeof(ALL_WPA1_TAGS) -1); + length += sizeof(ALL_WPA1_TAGS) -1; } - - if(opt.wpa2type > 0) - { - memcpy(packet+length, WPA2_TAG, 22); - packet[length+7] = opt.wpa2type; - packet[length+13] = opt.wpa2type; - length += 22; - } - - if(opt.wpa1type > 0) + else { - memcpy(packet+length, WPA1_TAG, 24); - packet[length+11] = opt.wpa1type; - packet[length+17] = opt.wpa1type; - length += 24; + if(opt.wpa2type > 0) + { + memcpy(packet+length, WPA2_TAG, 22); + packet[length+7] = opt.wpa2type; + packet[length+13] = opt.wpa2type; + length += 22; + } + + if(opt.wpa1type > 0) + { + memcpy(packet+length, WPA1_TAG, 24); + packet[length+11] = opt.wpa1type; + packet[length+17] = opt.wpa1type; + length += 24; + } } send_packet(packet, length); @@ -3554,28 +3581,32 @@ memcpy(beacon+beacon_len, essid, essid_len); //actual essid beacon_len+=essid_len;
View file
aircrack-ng-1.2-beta1.tar.gz/src/aircrack-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/aircrack-ng.c
Changed
@@ -1,7 +1,7 @@ /* * 802.11 WEP / WPA-PSK Key Cracker * - * Copyright (C) 2006-2010 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * Advanced WEP attacks developed by KoreK @@ -181,8 +181,7 @@ char usage[] = "\n" -" %s - (C) 2006-2010 Thomas d\'Otreppe\n" -" Original work: Christophe Devine\n" +" %s - (C) 2006-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: aircrack-ng [options] <.cap / .ivs file(s)>\n" @@ -480,8 +479,9 @@ int checkbssids(char *bssidlist) { int first = 1; + int failed = 0; int i = 0; - char *list, *tmp; + char *list, *frontlist, *tmp; int nbBSSID = 0; if(bssidlist == NULL) return -1; @@ -490,7 +490,7 @@ #define VALID_CHAR(x) ((IS_X(x)) || hexCharToInt(x) > -1) #define VALID_SEP(arg) ( ((arg) == '_') || ((arg) == '-') || ((arg) == ':') ) - list = strdup(bssidlist); + frontlist = list = strdup(bssidlist); do { tmp = strsep(&list, ","); @@ -500,42 +500,50 @@ ++nbBSSID; - if(strlen(tmp) != 17) return -1; + if(strlen(tmp) != 17) failed = 1; //first byte - if(!VALID_CHAR(tmp[ 0])) return -1; - if(!VALID_CHAR(tmp[ 1])) return -1; - if(!VALID_SEP( tmp[ 2])) return -1; + if(!VALID_CHAR(tmp[ 0])) failed = 1; + if(!VALID_CHAR(tmp[ 1])) failed = 1; + if(!VALID_SEP( tmp[ 2])) failed = 1; //second byte - if(!VALID_CHAR(tmp[ 3])) return -1; - if(!VALID_CHAR(tmp[ 4])) return -1; - if(!VALID_SEP( tmp[ 5])) return -1; + if(!VALID_CHAR(tmp[ 3])) failed = 1; + if(!VALID_CHAR(tmp[ 4])) failed = 1; + if(!VALID_SEP( tmp[ 5])) failed = 1; //third byte - if(!VALID_CHAR(tmp[ 6])) return -1; - if(!VALID_CHAR(tmp[ 7])) return -1; - if(!VALID_SEP( tmp[ 8])) return -1; + if(!VALID_CHAR(tmp[ 6])) failed = 1; + if(!VALID_CHAR(tmp[ 7])) failed = 1; + if(!VALID_SEP( tmp[ 8])) failed = 1; //fourth byte - if(!VALID_CHAR(tmp[ 9])) return -1; - if(!VALID_CHAR(tmp[10])) return -1; - if(!VALID_SEP( tmp[11])) return -1; + if(!VALID_CHAR(tmp[ 9])) failed = 1; + if(!VALID_CHAR(tmp[10])) failed = 1; + if(!VALID_SEP( tmp[11])) failed = 1; //fifth byte - if(!VALID_CHAR(tmp[12])) return -1; - if(!VALID_CHAR(tmp[13])) return -1; - if(!VALID_SEP( tmp[14])) return -1; + if(!VALID_CHAR(tmp[12])) failed = 1; + if(!VALID_CHAR(tmp[13])) failed = 1; + if(!VALID_SEP( tmp[14])) failed = 1; //sixth byte - if(!VALID_CHAR(tmp[15])) return -1; - if(!VALID_CHAR(tmp[16])) return -1; + if(!VALID_CHAR(tmp[15])) failed = 1; + if(!VALID_CHAR(tmp[16])) failed = 1; + if(failed) { + free(frontlist); + return -1; + } if(first) { - for(i=0; i< 17; i++) - if( IS_X(tmp[i])) return -1; + for(i=0; i< 17; i++) { + if( IS_X(tmp[i])) { + free(frontlist); + return -1; + } + } opt.firstbssid = (unsigned char *) malloc(sizeof(unsigned char)); getmac(tmp, 1, opt.firstbssid); @@ -545,6 +553,7 @@ } while(list); // Success + free(frontlist); return nbBSSID; } @@ -4590,23 +4599,22 @@ int next_key( char **key, int keysize ) { - char *tmp, *tmp2; + char *tmp, *tmpref; int i, rtn; unsigned int dec; char *hex; - tmp2 = tmp = (char*) malloc(1024); + tmpref = tmp = (char*) malloc(1024); while(1) { rtn = 0; - tmp = tmp2; pthread_mutex_lock( &mx_dic ); if(opt.dict == NULL) { pthread_mutex_unlock( &mx_dic ); //printf( "\nPassphrase not in dictionary \n" ); - free(tmp); + free(tmpref); tmp = NULL; return( FAILURE ); } @@ -4625,7 +4633,7 @@ // printf( "\nPassphrase not in dictionary \"%s\" \n", opt.dicts[opt.nbdict] ); if(next_dict(opt.nbdict+1) != 0) { - free(tmp); + free(tmpref); tmp = NULL; return( FAILURE ); } @@ -4681,7 +4689,7 @@ // printf( "\nPassphrase not in dictionary \"%s\" \n", opt.dicts[opt.nbdict] ); if(next_dict(opt.nbdict+1) != 0) { - free(tmp); + free(tmpref); tmp = NULL; return( FAILURE ); } @@ -4704,9 +4712,7 @@ break; } - free(tmp); - tmp = NULL; - + free(tmpref); return( SUCCESS ); }
View file
aircrack-ng-1.2-beta1.tar.gz/src/aircrack-ptw-lib.c -> aircrack-ng-1.2-beta2.tar.gz/src/aircrack-ptw-lib.c
Changed
@@ -1,5 +1,6 @@ /* * Copyright (c) 2007, 2008, 2009 Erik Tews, Andrei Pychkine and Ralf-Philipp Weinmann. + * 2013 Ramiro Polla * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,9 +48,9 @@ // Internal state of rc4 typedef struct { + uint32_t s[n]; uint8_t i; uint8_t j; - uint8_t s[n]; } rc4state; @@ -66,7 +67,7 @@ } doublesorthelper; // The rc4 initial state, the idendity permutation -static const uint8_t rc4initial[] = +static const uint32_t rc4initial[] = {0,1,2,3,4,5,6,7,8,9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, @@ -117,45 +118,173 @@ // For sorting static int compare(const void * ina, const void * inb) { - PTW_tableentry * a = (PTW_tableentry * )ina; - PTW_tableentry * b = (PTW_tableentry * )inb; - if (a->votes > b->votes) { - return -1; - } else if (a->votes == b->votes) { - return 0; - } else { - return 1; - } + PTW_tableentry * a = (PTW_tableentry * )ina; + PTW_tableentry * b = (PTW_tableentry * )inb; + return b->votes - a->votes; } // For sorting static int comparedoublesorthelper(const void * ina, const void * inb) { - doublesorthelper * a = (doublesorthelper * )ina; - doublesorthelper * b = (doublesorthelper * )inb; - if (a->difference > b->difference) { - return 1; - } else if (a->difference == b->difference) { - return 0; - } else { - return -1; - } + doublesorthelper * a = (doublesorthelper * )ina; + doublesorthelper * b = (doublesorthelper * )inb; + if (a->difference > b->difference) { + return 1; + } else if (a->difference == b->difference) { + return 0; + } else { + return -1; + } } +#if defined(__amd64) && defined(__SSE2__) +static const uint32_t __attribute__((used)) __attribute__((aligned (16))) x0123 [4] = { 0, 1, 2, 3 }; +static const uint32_t __attribute__((used)) __attribute__((aligned (16))) x4444 [4] = { 4, 4, 4, 4 }; +static int rc4test_amd64_sse2(uint8_t *key, int keylen, uint8_t *iv, uint8_t *keystream) +{ + int idx, i, j; + int scratch1, scratch2; + + __asm__ volatile( +#define state "%%rsp" +#define keybuf "0x400(%%rsp)" +#define keystream_ "0x428(%%rsp)" + // setup stack + "movq %%rsp, %q0 \n\t" + "subq $0x430, %%rsp \n\t" + "andq $-16, %%rsp \n\t" + "movq %q0, -8(%%rsp) \n\t" + + // save keystream variable + "movq %q6, "keystream_" \n\t" + + // keylen += IVBYTES + "addl $3, %k4 \n\t" + + // memcpy(keybuf, iv, IVBYTES); + "movl (%q5), %k1 \n\t" + "movl %k1 , "keybuf" \n\t" + // memcpy(&keybuf[IVBYTES], key, keylen); + "movdqa (%q3), %%xmm0 \n\t" + "cmpl $16, %k4 \n\t" + "movdqu %%xmm0, 3+"keybuf" \n\t" + "jng .L0 \n\t" + "movdqa 16(%q3), %%xmm1 \n\t" + "movdqu %%xmm1,19+"keybuf" \n\t" + ".L0: \n\t" + + // key = keybuf + "lea "keybuf", %q3 \n\t" + // load xmm registers + "movdqa %q9, %%xmm0 \n\t" + "movdqa %q10, %%xmm1 \n\t" + // clear some registers + "xorq %q0, %q0 \n\t" // idx + "xorq %q1, %q1 \n\t" // i + "xorq %q2, %q2 \n\t" // j + + // build identity array + ".p2align 4 \n\t" + ".Lidentity_loop: \n\t" + "movdqa %%xmm0, ("state",%q1,4)\n\t" + "addb $4, %b1 \n\t" + "paddd %%xmm1, %%xmm0 \n\t" + "jnc .Lidentity_loop \n\t" + + // load state into register + "movq "state", %q1 \n\t" + + // %q4 = and mask for idx + "movq %q4, %q8 \n\t" + "cmpq $16, %q8 \n\t" + "movq $15, %q4 \n\t" + "je .L7 \n\t" + "shrq $1, %q4 \n\t" + ".L7: \n\t" + + // init array with key + ".p2align 4 \n\t" + ".init_loop: \n\t" + "movl %k0, %k8 \n\t" /* scratch2 = idx */ + "movl (%q1), %k5 \n\t" /* s1 = state[i] */ + "leal 1(%q0,1), %k0 \n\t" /* idx++ */ + "movzbl (%q3,%q8,1), %k6 \n\t" /* key_n = key[scratch2] */ + "leal (%q5,%q6,1), %k8 \n\t" /* scratch2 = s1 + key_n */ + "addl %k8, %k2 \n\t" /* j += scratch2 */ + "andl %k4, %k0 \n\t" /* idx &= mask */ + "movzbl %b2, %k8 \n\t" /* scratch2 = j */ + "movl ("state",%q8,4), %k7 \n\t" /* s2 = state[scratch2] */ + "movl %k7, (%q1) \n\t" /* state[i] = s2 */ + "addq $4, %q1 \n\t" /* i++ */ + "movl %k5, ("state",%q8,4) \n\t" /* state[scratch2] = s1 */ + "cmpq %q1, %q3 \n\t" /* state == &state[0x100] */ + "jne .init_loop \n\t" + + // restore keystream variable + "movq "keystream_", %q6 \n\t" + + // clear some registers + "xorq %q2, %q2 \n\t" // j = 0 + "xorq %q0, %q0 \n\t" // result + +#define RC4TEST_LOOP(offset) \ + "movl 4*"offset"("state"), %k5\n\t" /* s1 = state[i] */ \ + "leal (%q5,%q2,1), %k4 \n\t" /* */ \ + "movzbl %b4, %k2 \n\t" /* j += s1 */ \ + "movl ("state",%q2,4), %k1 \n\t" /* s2 = state[j] */ \ + "movl %k1, 4*"offset"("state")\n\t" /* state[i] = s2 */ \ + "movl %k5, ("state",%q2,4) \n\t" /* state[j] = s1 */ \ + "addb %b1, %b5 \n\t" /* s1 += s2; */ \ + "movb ("state",%q5,4), %b3 \n\t" /* ret = state[s1] */ \ + "cmpb %b3, "offset"-1(%q6) \n\t" /* ret == keystream[i-1] */ \ + "jne .ret \n\t" + + RC4TEST_LOOP("1") + RC4TEST_LOOP("2") + RC4TEST_LOOP("3") + RC4TEST_LOOP("4") + RC4TEST_LOOP("5") + RC4TEST_LOOP("6") + +#undef RC4TEST_LOOP + + "addb $1, %b0 \n\t" + ".ret: \n\t" + + // restore stack + "movq -8(%%rsp), %%rsp \n\t" + + : "=&r"(idx), "=&r"(i), "=&r"(j), + "+r"(key), "+r"(keylen), "+r"(iv), "+r"(keystream), + "=&r"(scratch1), "=&r"(scratch2) + : "m"(x0123[0]), "m"(x4444[0]) + : "xmm0", "xmm1" + ); +#undef state +#undef keybuf +#undef keystream_ + + return idx; +} +#endif + // RC4 key setup
View file
aircrack-ng-1.2-beta1.tar.gz/src/aircrack-ptw-lib.h -> aircrack-ng-1.2-beta2.tar.gz/src/aircrack-ptw-lib.h
Changed
@@ -77,6 +77,8 @@ int weight; } PTW_session; +typedef int (*rc4test_func)(uint8_t *key, int keylen, uint8_t *iv, uint8_t *keystream); + // The state of an attack // You should usually never modify these values manually typedef struct { @@ -93,6 +95,8 @@ // Sessions for the original klein attack PTW_session * allsessions; int allsessions_size; + // rc4test function, optimized if available + rc4test_func rc4test; } PTW_attackstate; PTW_attackstate * PTW_newattackstate();
View file
aircrack-ng-1.2-beta1.tar.gz/src/airdecap-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/airdecap-ng.c
Changed
@@ -1,7 +1,7 @@ /* * 802.11 to Ethernet pcap translator * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * This program is free software; you can redistribute it and/or modify @@ -57,8 +57,7 @@ char usage[] = "\n" -" %s - (C) 2006, 2007, 2008, 2009 Thomas d\'Otreppe\n" -" Original work: Christophe Devine\n" +" %s - (C) 2006-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: airdecap-ng [options] <pcap file>\n" @@ -163,7 +162,8 @@ pkh->len -= 24 + qosh_offset + 6; pkh->caplen -= 24 + qosh_offset + 6; - memcpy( buffer + 12, h80211 + qosh_offset + 30, pkh->caplen ); + /* can overlap */ + memmove( buffer + 12, h80211 + qosh_offset + 30, pkh->caplen ); } else { @@ -875,7 +875,8 @@ /* WPA data packet was successfully decrypted, * * remove the WPA Ext.IV & MIC, write the data */ - memcpy( h80211 + z, h80211 + z + 8, pkh.caplen - z ); + /* can overlap */ + memmove( h80211 + z, h80211 + z + 8, pkh.caplen - z ); stats.nb_unwpa++;
View file
aircrack-ng-1.2-beta1.tar.gz/src/airdecloak-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/airdecloak-ng.c
Changed
@@ -1,7 +1,7 @@ /* * WEP Cloaking filtering * - * Copyright (C) 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2008-2013 Thomas d'Otreppe * * Thanks to Alex Hernandez aka alt3kx for the hardware. * @@ -1319,7 +1319,7 @@ void usage() { printf("\n" - " %s - (C) 2008, 2009 Thomas d\'Otreppe\n" + " %s - (C) 2008-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: airdecloak-ng [options]\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/aireplay-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/aireplay-ng.c
Changed
@@ -1,7 +1,7 @@ /* * 802.11 WEP replay & injection attacks * - * Copyright (C) 2006-2010 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * WEP decryption attack (chopchop) developed by KoreK @@ -139,8 +139,7 @@ char usage[] = "\n" -" %s - (C) 2006-2010 Thomas d\'Otreppe\n" -" Original work: Christophe Devine\n" +" %s - (C) 2006-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: aireplay-ng <options> <replay interface>\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/airodump-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/airodump-ng.c
Changed
@@ -1,7 +1,7 @@ /* * pcap-compatible 802.11 packet sniffer * - * Copyright (C) 2006-2010 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * This program is free software; you can redistribute it and/or modify @@ -595,8 +595,7 @@ char usage[] = "\n" -" %s - (C) 2006-2010 Thomas d\'Otreppe\n" -" Original work: Christophe Devine\n" +" %s - (C) 2006-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: airodump-ng <options> <interface>[,<interface>,...]\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/airtun-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/airtun-ng.c
Changed
@@ -2,7 +2,7 @@ * 802.11 WEP network connection tunneling * based on aireplay-ng * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2006, 2007, 2008, 2009 Martin Beck * * This program is free software; you can redistribute it and/or modify @@ -83,8 +83,8 @@ char usage[] = "\n" -" %s - (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe\n" -" Original work: Christophe Devine and Martin Beck\n" +" %s - (C) 2006-2013 Thomas d'Otreppe\n" +" Original work: Martin Beck\n" " http://www.aircrack-ng.org\n" "\n" " usage: airtun-ng <options> <replay interface>\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/common.c -> aircrack-ng-1.2-beta2.tar.gz/src/common.c
Changed
@@ -1,7 +1,7 @@ /* * Common functions for all aircrack-ng tools * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
View file
aircrack-ng-1.2-beta1.tar.gz/src/crypto.c -> aircrack-ng-1.2-beta2.tar.gz/src/crypto.c
Changed
@@ -1189,19 +1189,16 @@ int decrypt_ccmp( uchar *h80211, int caplen, uchar TK1[16] ) { - int is_a4, i, n, z, blocks; + int is_a4, i, n, z, blocks, is_qos; int data_len, last, offset; uchar B0[16], B[16], MIC[16]; uchar PN[6], AAD[32]; AES_KEY aes_ctx; is_a4 = ( h80211[1] & 3 ) == 3; - + is_qos = ( h80211[0] & 0x8C ) == 0x88; z = 24 + 6 * is_a4; - if ( GET_SUBTYPE(h80211[0]) == IEEE80211_FC0_SUBTYPE_QOS ) - { - z += 2; - } + z += 2 * is_qos; PN[0] = h80211[z + 7]; PN[1] = h80211[z + 6]; @@ -1220,22 +1217,46 @@ B0[15] = ( data_len & 0xFF ); memset( AAD, 0, sizeof( AAD ) ); - - if ( GET_SUBTYPE(h80211[0]) == IEEE80211_FC0_SUBTYPE_QOS ) - { - AAD[1] = 22+2 + 6 * is_a4; - } - else - { - AAD[1] = 22 + 6 * is_a4; - } - + AAD[2] = h80211[0] & 0x8F; AAD[3] = h80211[1] & 0xC7; memcpy( AAD + 4, h80211 + 4, 3 * 6 ); AAD[22] = h80211[22] & 0x0F; - if( is_a4 ) + + if( is_a4 ) + { memcpy( AAD + 24, h80211 + 24, 6 ); + + if( is_qos ) + { + AAD[30] = h80211[z - 2] & 0x0F; + AAD[31] = 0; + B0[1] = AAD[30]; + AAD[1] = 22 + 2 + 6; + } + else + { + memset(&AAD[30], 0, 2); + B0[1] = 0; + AAD[1] = 22 + 6; + } + } + else + { + if( is_qos ) + { + AAD[24] = h80211[z - 2] & 0x0F; + AAD[25] = 0; + B0[1] = AAD[24]; + AAD[1] = 22 + 2; + } + else + { + memset(&AAD[24], 0, 2); + B0[1] = 0; + AAD[1] = 22; + } + } AES_set_encrypt_key( TK1, 128, &aes_ctx ); AES_encrypt( B0, MIC, &aes_ctx );
View file
aircrack-ng-1.2-beta1.tar.gz/src/ivstools.c -> aircrack-ng-1.2-beta2.tar.gz/src/ivstools.c
Changed
@@ -1,7 +1,7 @@ /* * IVS Tools - Convert or merge IVs * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine (pcap2ivs and mergeivs) * * This program is free software; you can redistribute it and/or modify @@ -113,8 +113,7 @@ void usage(int what) { - printf("\n %s - (C) 2006, 2007, 2008, 2009 Thomas d\'Otreppe\n" - " Original work: Christophe Devine\n" + printf("\n %s - (C) 2006-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n usage: ", getVersion("ivsTools", _MAJ, _MIN, _SUB_MIN, _REVISION, _BETA, _RC)); if (what == 0 || what == 1)
View file
aircrack-ng-1.2-beta1.tar.gz/src/kstats.c -> aircrack-ng-1.2-beta2.tar.gz/src/kstats.c
Changed
@@ -1,7 +1,7 @@ /* * Kstat: displays the votes of the korek attack for each keybyte * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * This program is free software; you can redistribute it and/or modify
View file
aircrack-ng-1.2-beta1.tar.gz/src/makeivs-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/makeivs-ng.c
Changed
@@ -1,7 +1,7 @@ /* * Server for osdep network driver. Uses osdep itself! [ph33r teh recursion] * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * This program is free software; you can redistribute it and/or modify @@ -38,8 +38,7 @@ char usage[] = "\n" -" %s - (C) 2006, 2007, 2008, 2009 Thomas d\'Otreppe\n" -" Original work: Christophe Devine\n" +" %s - (C) 2006-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: makeivs-ng [options]\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/osdep/airpcap.c -> aircrack-ng-1.2-beta2.tar.gz/src/osdep/airpcap.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2008, Thomas d'Otreppe + * Copyright (c) 2007-2013 Thomas d'Otreppe * * Airpcap stuff *
View file
aircrack-ng-1.2-beta1.tar.gz/src/osdep/common.c -> aircrack-ng-1.2-beta2.tar.gz/src/osdep/common.c
Changed
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Thomas d'Otreppe + * Copyright (c) 2008-2013, Thomas d'Otreppe * * Common OSdep stuff *
View file
aircrack-ng-1.2-beta1.tar.gz/src/osdep/cygwin_tap.c -> aircrack-ng-1.2-beta2.tar.gz/src/osdep/cygwin_tap.c
Changed
@@ -25,13 +25,14 @@ #include <pthread.h> #include <assert.h> +#include "osdep.h" + #include <windows.h> #include <winioctl.h> #include <iphlpapi.h> #include <setupapi.h> #include <devguid.h> -#include "osdep.h" #include "network.h" #include "tap-win32/common.h"
View file
aircrack-ng-1.2-beta1.tar.gz/src/osdep/linux.c -> aircrack-ng-1.2-beta2.tar.gz/src/osdep/linux.c
Changed
@@ -1,7 +1,7 @@ /* * OS dependent APIs for Linux * - * Copyright (C) 2006, 2007, 2008 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine * * This program is free software; you can redistribute it and/or modify @@ -45,7 +45,7 @@ #include <linux/nl80211.h> #include <netlink/genl/genl.h> #include <netlink/genl/family.h> -#include <netlink/genl/ctrl.h> +#include <netlink/genl/ctrl.h> #include <netlink/msg.h> #include <netlink/attr.h> #include <linux/genetlink.h> @@ -492,7 +492,7 @@ case DT_MAC80211_RT: dev->rate = (rate/500000); - //return 0; + //return 0; //Newer mac80211 stacks (2.6.31 and up) //don't care about Radiotap header anymore, so ioctl below must also be done! //[see Documentation/networking/mac80211-injection.txt] @@ -616,7 +616,7 @@ break; } - memset( buf, 0, sizeof( buf ) ); + memset( buf, 0, count ); /* XXX */ if (ri) @@ -1615,6 +1615,7 @@ char r_file[128], buf[128]; struct ifreq ifr; char * unused_str; + int iface_malloced = 0; dev->inject_wlanng = 1; dev->rate = 2; /* default to 1Mbps if nothing is set */ @@ -1901,6 +1902,7 @@ strncpy(dev->main_if, iface, strlen(iface)); iface=(char*)malloc(strlen(buf)+1); + iface_malloced = 1; memset(iface, 0, strlen(buf)+1); strncpy(iface, buf, strlen(buf)); } @@ -2011,11 +2013,13 @@ dev->arptype_in = dev->arptype_out; + if(iface_malloced) free(iface); return 0; close_out: close(dev->fd_out); close_in: close(dev->fd_in); + if(iface_malloced) free(iface); return 1; } @@ -2053,6 +2057,8 @@ close(pl->fd_in); if (pl->fd_out) close(pl->fd_out); + if (pl->fd_main) + close(pl->fd_main); do_free(wi); }
View file
aircrack-ng-1.2-beta1.tar.gz/src/packetforge-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/packetforge-ng.c
Changed
@@ -2,7 +2,7 @@ * 802.11 ARP-request WEP packet forgery * UDP, ICMP and custom packet forging developped by Martin Beck * - * Copyright (C) 2006, 2007, 2008, 2009 Thomas d'Otreppe + * Copyright (C) 2006-2013 Thomas d'Otreppe * Copyright (C) 2004, 2005 Christophe Devine (arpforge) * * This program is free software; you can redistribute it and/or modify @@ -76,8 +76,8 @@ char usage[] = "\n" -" %s - (C) 2006, 2007, 2008, 2009 Thomas d\'Otreppe\n" -" Original work: Christophe Devine and Martin Beck\n" +" %s - (C) 2006-2013 Thomas d\'Otreppe\n" +" Original work: Martin Beck\n" " http://www.aircrack-ng.org\n" "\n" " Usage: packetforge-ng <mode> <options>\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/tkiptun-ng.c -> aircrack-ng-1.2-beta2.tar.gz/src/tkiptun-ng.c
Changed
@@ -142,7 +142,7 @@ char usage[] = "\n" -" %s - (C) 2008, 2009 Thomas d\'Otreppe\n" +" %s - (C) 2008-2013 Thomas d\'Otreppe\n" " http://www.aircrack-ng.org\n" "\n" " usage: tkiptun-ng <options> <replay interface>\n"
View file
aircrack-ng-1.2-beta1.tar.gz/src/version.h -> aircrack-ng-1.2-beta2.tar.gz/src/version.h
Changed
@@ -33,7 +33,7 @@ #define _MAJ 1 #define _MIN 2 #define _SUB_MIN 0 -#define _BETA 1 +#define _BETA 2 #define _RC 0 #define WEBSITE "http://www.aircrack-ng.org"
View file
aircrack-ng-1.2-beta1.tar.gz/test/test-airdecap-ng.sh -> aircrack-ng-1.2-beta2.tar.gz/test/test-airdecap-ng.sh
Changed
@@ -8,18 +8,13 @@ # set -e set -o pipefail -# We receive from Makefile the path to src/ and we put it as first option on $PATH -# This allows us to run the test against the recent compiled binary if we are called -# from Makefile (make check). Otherwise we run the test against the installed binary -# on the system. -[[ -d "$1" ]] && export PATH="${1}:${PATH}" TESTDIR="$(dirname $0)" tmpdir="$(mktemp -d)" # Clean on exit trap "rm -fr "${tmpdir}"" SIGINT SIGKILL SIGQUIT SIGSEGV SIGPIPE SIGALRM SIGTERM EXIT # Test1 cp -f "${TESTDIR}/wpa.cap" "${tmpdir}" -airdecap-ng -e test -p biscotte "${tmpdir}/wpa.cap" | \ +./airdecap-ng -e test -p biscotte "${tmpdir}/wpa.cap" | \ grep "Number of decrypted WPA packets 2" # Check that the hash is what we expect. # For each hash there are two possibilities: little or big endian @@ -28,14 +23,14 @@ [[ "${sha1sum}" == "fb1592b2c0dccef542c1f46297394ee2892f8ed3" ]] # Test 2 cp -f "${TESTDIR}/wpa-psk-linksys.cap" "${tmpdir}" -airdecap-ng -e linksys -p dictionary "${tmpdir}/wpa-psk-linksys.cap" | \ +./airdecap-ng -e linksys -p dictionary "${tmpdir}/wpa-psk-linksys.cap" | \ grep "Number of decrypted WPA packets 53" sha1sum=$(sha1sum "${tmpdir}/wpa-psk-linksys-dec.cap" | awk '{print $1}') [[ "${sha1sum}" == "1e75a9af0d9703c4ae4fc8ea454326aeb4abecc1" ]] || \ [[ "${sha1sum}" == "1c3c4123ba6718bd3db66de251a125ed65cd6ee6" ]] # Test 3 cp -f "${TESTDIR}/wpa2-psk-linksys.cap" "${tmpdir}" -airdecap-ng -e linksys -p dictionary "${tmpdir}/wpa2-psk-linksys.cap" | \ +./airdecap-ng -e linksys -p dictionary "${tmpdir}/wpa2-psk-linksys.cap" | \ grep "Number of decrypted WPA packets 25" sha1sum=$(sha1sum "${tmpdir}/wpa2-psk-linksys-dec.cap" | awk '{print $1}') [[ "${sha1sum}" == "2da107b96fbe19d926020ffb0da72553b18a5775" ]] || \
View file
aircrack-ng-1.2-beta1.tar.gz/test/test-airolib-sqlite.sh -> aircrack-ng-1.2-beta2.tar.gz/test/test-airolib-sqlite.sh
Changed
@@ -8,16 +8,11 @@ # set -e set -o pipefail -# We receive from Makefile the path to src/ and we put it as first option on $PATH -# This allows us to run the test against the recent compiled binary if we are called -# from Makefile (make check). Otherwise we run the test against the installed binary -# on the system. -[[ -d "$1" ]] && export PATH="${1}:${PATH}" TESTDIR="$(dirname $0)" tmpfile="$(mktemp -u)" # Clean on exit trap "rm -f "${tmpfile}"" SIGINT SIGKILL SIGQUIT SIGSEGV SIGPIPE SIGALRM SIGTERM EXIT -echo Harkonen | airolib-ng "${tmpfile}" --import essid - -airolib-ng "${tmpfile}" --import passwd "${TESTDIR}/password.lst" -airolib-ng "${tmpfile}" --batch | grep "Computed 233 PMK" -aircrack-ng -q -e Harkonen -r "${tmpfile}" "${TESTDIR}/wpa2.eapol.cap" | grep 'KEY FOUND! \[ 12345678 \]' +echo Harkonen | ./airolib-ng "${tmpfile}" --import essid - +./airolib-ng "${tmpfile}" --import passwd "${TESTDIR}/password.lst" +./airolib-ng "${tmpfile}" --batch | grep "Computed 233 PMK" +./aircrack-ng -q -e Harkonen -r "${tmpfile}" "${TESTDIR}/wpa2.eapol.cap" | grep 'KEY FOUND! \[ 12345678 \]'
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.