wificurse

wifi jamming tool
git clone git://git.2f30.org/wificurse
Log | Files | Refs | README | LICENSE

commit 1125bf244a9bf476e6e8ae1f01d167e4cf675b25
parent e5701cfb781dc126f666517eecea2bfd11bf69c9
Author: oblique <psyberbits@gmail.com>
Date:   Tue,  6 Mar 2012 03:05:11 +0200

patch and iw_can_change_channel are unneeded, so they are removed

Diffstat:
MREADME | 4----
Dpatches/cfg80211_monitor_mode_channel_fix.patch | 14--------------
Msrc/iw.c | 18------------------
Msrc/iw.h | 1-
Msrc/wificurse.c | 7-------
5 files changed, 0 insertions(+), 44 deletions(-)

diff --git a/README b/README @@ -7,10 +7,6 @@ is essencially a WiFi DoS attack tool created for educational purposes only. It works only in Linux and requires wireless card drivers capable of injecting packets in wireless networks. -If your Linux kernel is version 2.6.35 or above, you have to -apply the patch patches/cfg80211_monitor_mode_channel_fix.patch -to the kernel. - How to use it: Just run it as root and put as first argument the card interface. It will automatically put your interface in monitor mode and it will listen at channel range 1-14. If there is no AP in the diff --git a/patches/cfg80211_monitor_mode_channel_fix.patch b/patches/cfg80211_monitor_mode_channel_fix.patch @@ -1,14 +0,0 @@ -diff --git a/net/wireless/chan.c b/net/wireless/chan.c -index 2fcfe09..3f63fae 100644 ---- a/net/wireless/chan.c -+++ b/net/wireless/chan.c -@@ -85,9 +85,6 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, - struct ieee80211_channel *chan; - int result; - -- if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) -- wdev = NULL; -- - if (wdev) { - ASSERT_WDEV_LOCK(wdev); - diff --git a/src/iw.c b/src/iw.c @@ -199,24 +199,6 @@ ssize_t iw_read(struct iw_dev *dev, void *buf, size_t count, uint8_t **pkt, size return r; } -int iw_can_change_channel(struct iw_dev *dev) { - struct iwreq iwr; - - /* set channel */ - memset(&iwr, 0, sizeof(iwr)); - strncpy(iwr.ifr_name, dev->ifname, sizeof(iwr.ifr_name)-1); - iwr.u.freq.flags = IW_FREQ_FIXED; - iwr.u.freq.m = 1; - - if (ioctl(dev->fd_in, SIOCSIWFREQ, &iwr) < 0) - return 0; - if (ioctl(dev->fd_in, SIOCGIWFREQ, &iwr) < 0) - return 0; - - /* channel 1 frequency is 2412 */ - return iwr.u.freq.m == 2412; -} - int iw_set_channel(struct iw_dev *dev, int chan) { struct iwreq iwr; ssize_t ret; diff --git a/src/iw.h b/src/iw.h @@ -58,7 +58,6 @@ int iw_open(struct iw_dev *dev); void iw_close(struct iw_dev *dev); ssize_t iw_write(struct iw_dev *dev, void *buf, size_t count); ssize_t iw_read(struct iw_dev *dev, void *buf, size_t count, uint8_t **pkt, size_t *pkt_sz); -int iw_can_change_channel(struct iw_dev *dev); int iw_set_channel(struct iw_dev *dev, int chan); #endif diff --git a/src/wificurse.c b/src/wificurse.c @@ -253,13 +253,6 @@ int main(int argc, char *argv[]) { goto _errout_no_thread; } - if (!iw_can_change_channel(&dev)) { - fprintf(stderr, "%s can not change channels in monitor mode.\n" - "Maybe you need to patch your kernel with:\n" - " patches/cfg80211_monitor_mode_channel_fix.patch\n", dev.ifname); - goto _errout_no_thread; - } - pfd[1].fd = dev.fd_in; pfd[1].revents = 0; pfd[1].events = POLLIN;