Diffstat (limited to 'libopie2/examples/opienet/miniwellenreiter') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | 25 | ||||
-rw-r--r-- | libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro | 0 |
2 files changed, 20 insertions, 5 deletions
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp index c49daa0..eb2e8e8 100644 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp +++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp @@ -32,5 +32,5 @@ class Wellenreiter : public QApplication Q_OBJECT public: - Wellenreiter( int argc, char** argv ) : QApplication( argc, argv ) + Wellenreiter( int argc, char** argv ) : QApplication( argc, argv ), channel( 1 ) { @@ -57,7 +57,7 @@ public: } - printf( "****************************************************\n" ); - printf( "* Wellenreiter mini edition 1.0 (C) 2003 M-M-M *\n" ); - printf( "****************************************************\n" ); + printf( "*******************************************************************\n" ); + printf( "* Wellenreiter mini edition 1.0.0 (C) 2003 Michael 'Mickey' Lauer *\n" ); + printf( "*******************************************************************\n" ); printf( "\n\n" ); @@ -106,4 +106,10 @@ public: new OOrinocoMonitoringInterface( wiface, false ); else + if ( driver == "hostap" ) + new OHostAPMonitoringInterface( wiface, false ); + else + if ( driver == "wlan-ng" ) + new OWlanNGMonitoringInterface( wiface, false ); + else { printf( "Unknown driver. Exiting\n" ); @@ -113,5 +119,5 @@ public: // enable monitoring mode printf( "Enabling monitor mode...\n" ); - //wiface->setMonitorMode( true ); + wiface->setMode( "monitor" ); // open a packet capturer @@ -132,4 +138,6 @@ public: // connect connect( cap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); + // timer + startTimer( 1000 ); } @@ -138,4 +146,10 @@ public: public slots: + virtual void timerEvent(QTimerEvent* e) + { + wiface->setChannel( channel++ ); + if ( channel == 14 ) channel = 1; + } + void receivePacket(OPacket* p) { @@ -204,4 +218,5 @@ private: OPacketCapturer* cap; OWirelessNetworkInterface* wiface; + int channel; }; diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro index 7ce535c..b2c5c14 100644 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro +++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro |