-rw-r--r-- | libopie2/opienet/opcap.cpp | 13 | ||||
-rw-r--r-- | libopie2/opienet/opcap.h | 2 | ||||
-rw-r--r-- | libopie2/opienet/opienet.pro | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp index 012c0a3..4d786f5 100644 --- a/libopie2/opienet/opcap.cpp +++ b/libopie2/opienet/opcap.cpp @@ -830,3 +830,3 @@ OWaveLanManagementSSID::~OWaveLanManagementSSID() -QString OWaveLanManagementSSID::ID() const +QString OWaveLanManagementSSID::ID( bool decloak ) const { @@ -837,3 +837,12 @@ QString OWaveLanManagementSSID::ID() const essid[length] = 0x0; - return essid; + if ( !decloak || length < 2 || essid[0] != '\0' ) return essid; + odebug << "OWaveLanManagementSSID:ID(): SSID is cloaked - decloaking..." << oendl; + + QString decloakedID; + for ( int i = 1; i < length; ++i ) + { + if ( essid[i] >= 32 && essid[i] <= 126 ) decloakedID.append( essid[i] ); + else decloakedID.append( '.' ); + } + return decloakedID; } diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index b373c56..f5dc5c0 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h @@ -251,3 +251,3 @@ class OWaveLanManagementSSID : public QObject - QString ID() const; + QString ID( bool decloak = false ) const; diff --git a/libopie2/opienet/opienet.pro b/libopie2/opienet/opienet.pro index 2027481..cab6da6 100644 --- a/libopie2/opienet/opienet.pro +++ b/libopie2/opienet/opienet.pro @@ -21,3 +21,3 @@ INTERFACES = TARGET = opienet2 -VERSION = 1.8.2 +VERSION = 1.8.3 INCLUDEPATH += $(OPIEDIR)/include |