author | mickeyl <mickeyl> | 2004-02-15 18:08:39 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-02-15 18:08:39 (UTC) |
commit | 4d467f290f7f42717be14bb0f269570fe5dd07bc (patch) (side-by-side diff) | |
tree | 9c50cc710f7f69f57eceece17635b0b5e5b3a0b9 | |
parent | 76be6ccdc364c609e86d74e6daa72438bc92e911 (diff) | |
download | opie-4d467f290f7f42717be14bb0f269570fe5dd07bc.zip opie-4d467f290f7f42717be14bb0f269570fe5dd07bc.tar.gz opie-4d467f290f7f42717be14bb0f269570fe5dd07bc.tar.bz2 |
s/$1/%1/
-rw-r--r-- | noncore/net/wellenreiter/TODO | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/main.cpp | 8 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO index b6ec617..01e731f 100644 --- a/noncore/net/wellenreiter/TODO +++ b/noncore/net/wellenreiter/TODO @@ -4,57 +4,59 @@ /* /* Version: 1.0.2 /************************************************************************ ---------------------------------------------------- Ideas as of Wellenreiter II / December 2003 ---------------------------------------------------- -------- ENGINE -------- - enable multiple packet sources - infrared - bluetooth - usb? - define packet structure in a metalanguage and generate the actual parsing code (hmmm) - pester the ethereal folks to settle for an application independant packet dissection framework... (unlikely) - adaptive hopping scheme ! - gather interface capabilities - enable sniffing in wired networks - fix autodetection (interface name) --------- UI --------- - display interface capabilities (or rewrite networksettings?) - distinguish wireless bridges (WDS traffic) - expand/collapse all - add configuration for scrollback buffer in hex window and log window - revamp hex window, make it more sophisticated than just a QMultiLineEdit - tree view - beep over headphone / customizable +- count/display number of wireless networks / APs since last start/stop + --------- FILES --------- - write kismet-like .network format and format to be importable into AutoRoute - implement beacon stripping (the first beacon is enough to detect a new network - further beacons just blow up the capture file) diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index d32b362..8ef62e9 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -27,81 +27,83 @@ #include <errno.h> #include <signal.h> #include <string.h> #include <unistd.h> int main( int argc, char **argv ) { #ifdef QWS OApplication a( argc, argv, "Wellenreiter II" ); #else QApplication a( argc, argv ); #endif WellenreiterMainWindow* w = new WellenreiterMainWindow(); #ifdef QWS a.showMainWidget( w ); #else a.setMainWidget( w ); w->setCaption( "Wellenreiter II" ); w->show(); #endif a.processEvents(); // show the window before doing the safety checks int result = -1; static int killed = false; bool check = true; for ( int i = 1; i < argc; ++i ) { if ( !strcmp( "-nocheck", argv[i] ) ) { qDebug( "-nocheck found" ); check = false; break; } } if ( check ) { // root check if ( getuid() ) { qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::No ) return -1; } - if ( OProcess::processPID( "dhcpc" ) ) + int dhcpid = OProcess::processPID( "dhcpc" ); + + if ( dhcpid ) { result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "You have a dhcp client running.\n" - "This can severly limit scanning!\nShould I kill it for you?" ), + "(PID = %1)\nThis can severly limit scanning!\nShould I kill it for you?" ).arg( dhcpid ), QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::Yes ) { - if ( -1 == ::kill( OProcess::processPID( "dhcpc" ), SIGTERM ) ) + if ( -1 == ::kill( dhcpid, SIGTERM ) ) qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) ); else killed = true; } } } a.exec(); if ( check ) { if ( killed ) { result = QMessageBox::warning( w, " - Wellenreiter II - (dhcp)", QObject::tr( "Restart your dhcp client?" ), QMessageBox::Yes, QMessageBox::No ); if ( result == QMessageBox::Yes ) { ::system( QString().sprintf( "dhclient &; udhcpcd &; dhcpcd &" ) ); } } delete w; } return 0; } diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index b462afd..72624f7 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -197,97 +197,97 @@ void WellenreiterMainWindow::updateToolButtonState() else { startButton->setEnabled( false ); menuBar()->setItemEnabled( startID, false ); } } void WellenreiterMainWindow::changedSniffingState() { startButton->setEnabled( !mw->sniffing ); menuBar()->setItemEnabled( startID, !mw->sniffing ); stopButton->setEnabled( mw->sniffing ); menuBar()->setItemEnabled( stopID, mw->sniffing ); if ( !mw->sniffing ) { menuBar()->setItemEnabled( uploadID, true ); uploadButton->setEnabled( true ); } } WellenreiterMainWindow::~WellenreiterMainWindow() { qDebug( "Wellenreiter:: bye." ); }; void WellenreiterMainWindow::demoAddStations() { //mw = 0; // test SIGSEGV handling mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:00:20:EF:A6:43"), true, 6, 80, GpsLocation( 39.8794, -94.0936) ); mw->netView()->addNewItem( "managed", "Vanille", OMacAddress::fromString("00:30:6D:EF:A6:23"), true, 11, 10, GpsLocation( 0.0, 0.0 ) ); mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:03:F8:E7:16:22"), false, 3, 10, GpsLocation( 5.5, 2.3 ) ); mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:04:01:E7:56:62"), false, 3, 15, GpsLocation( 2.3, 5.5 ) ); mw->netView()->addNewItem( "adhoc", "ELAN", OMacAddress::fromString("00:05:8E:E7:56:E2"), false, 3, 20, GpsLocation( -10.0, -20.5 ) ); } void WellenreiterMainWindow::demoReadFromGps() { WellenreiterConfigWindow* configwindow = WellenreiterConfigWindow::instance(); GPS* gps = new GPS( this ); gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); GpsLocation loc = gps->position(); - QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n$1" ).arg( loc.dmsPosition() ) ); + QMessageBox::information( this, "Wellenreiter/Opie", tr( "GPS said:\n%1" ).arg( loc.dmsPosition() ) ); } QString WellenreiterMainWindow::getFileName( bool save ) { QMap<QString, QStringList> map; map.insert( tr("All"), QStringList() ); QStringList text; text << "text/*"; map.insert( tr("Text"), text ); text << "*"; map.insert( tr("All"), text ); QString str; if ( save ) { #ifdef QWS str = OFileDialog::getSaveFileName( 2, "/", QString::null, map ); #else str = QFileDialog::getSaveFileName(); #endif if ( str.isEmpty() /*|| QFileInfo(str).isDir()*/ ) return ""; } else { #ifdef QWS str = OFileDialog::getOpenFileName( 2, "/", QString::null, map ); #else str = QFileDialog::getOpenFileName(); #endif if ( str.isEmpty() || !QFile(str).exists() || QFileInfo(str).isDir() ) return ""; } return str; } void WellenreiterMainWindow::fileSaveLog() { QString fname = getFileName( true ); if ( !fname.isEmpty() ) { QFile f( fname ); if ( f.open(IO_WriteOnly) ) { QTextStream t( &f ); t << mw->logWindow()->getLog(); |