SOURCES: aircrack-ng-0.6.1-ipw2200.patch (NEW) - http://tv.latinsu...
mguevara
mguevara at pld-linux.org
Fri Oct 13 16:56:16 CEST 2006
Author: mguevara Date: Fri Oct 13 14:56:16 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- http://tv.latinsud.com/ipw2200/aircrack-ng-0.6.1-ipw2200.patch
---- Files affected:
SOURCES:
aircrack-ng-0.6.1-ipw2200.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/aircrack-ng-0.6.1-ipw2200.patch
diff -u /dev/null SOURCES/aircrack-ng-0.6.1-ipw2200.patch:1.1
--- /dev/null Fri Oct 13 16:56:16 2006
+++ SOURCES/aircrack-ng-0.6.1-ipw2200.patch Fri Oct 13 16:56:11 2006
@@ -0,0 +1,63 @@
+diff -ur aircrack-ng-0.6.1/src/aireplay-ng.c aircrack-ng-0.6.1-ipw2200/src/aireplay-ng.c
+--- aircrack-ng-0.6.1/src/aireplay-ng.c 2006-08-27 17:49:49.000000000 +0200
++++ aircrack-ng-0.6.1-ipw2200/src/aireplay-ng.c 2006-08-31 22:27:21.000000000 +0200
+@@ -2176,6 +2176,23 @@
+
+ /* interface initialization routine */
+
++int sysfs_inject=0;
++int opensysfs( char *iface, int fd) {
++ int fd2;
++ char buf[256];
++
++ snprintf(buf, 256, "/sys/class/net/%s/device/inject", iface);
++ fd2=open(buf,O_WRONLY);
++ if (fd2 == -1)
++ return -1;
++
++ dup2(fd2, fd);
++ close(fd2);
++
++ sysfs_inject=1;
++ return 0;
++}
++
+ int openraw( char *iface, int fd, int *arptype )
+ {
+ struct ifreq ifr;
+@@ -2223,7 +2240,11 @@
+ ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_PRISM &&
+ ifr.ifr_hwaddr.sa_family != ARPHRD_IEEE80211_FULL )
+ {
+- if( ifr.ifr_hwaddr.sa_family == 1 )
++ /* try sysfs instead */
++ if (opensysfs(iface, fd)==0)
++ return 0;
++
++ if( ifr.ifr_hwaddr.sa_family == 1 )
+ fprintf( stderr, "\nARP linktype is set to 1 (Ethernet) " );
+ else
+ fprintf( stderr, "\nUnsupported hardware link type %4d ",
+@@ -2232,7 +2253,8 @@
+ fprintf( stderr, "- expected ARPHRD_IEEE80211\nor ARPHRD_IEEE8021"
+ "1_PRISM instead. Make sure RFMON is enabled:\n"
+ "run 'ifconfig %s up; iwconfig %s mode Monitor "
+- "channel <#>'\n\n", iface, iface );
++ "channel <#>'\nSysfs injection support was not "
++ "found either.\n\n", iface, iface );
+ return( 1 );
+ }
+
+@@ -2787,6 +2809,12 @@
+ dev.arptype_in = dev.arptype_out;
+ }
+
++ if( sysfs_inject && (opt.a_mode==0 || opt.a_mode==1) )
++ {
++ printf( "IPW2200-sysfs does not support non-data injection, so attack %d is not supported\n", opt.a_mode);
++ return( 1 );
++ }
++
+ if( opt.s_file != NULL )
+ {
+ if( ! ( dev.f_cap_in = fopen( opt.s_file, "rb" ) ) )
================================================================
More information about the pld-cvs-commit
mailing list