summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui2
-rw-r--r--noncore/net/wellenreiter/gui/configbasenew.ui814
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp6
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.h2
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro2
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp0
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.h0
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp10
-rw-r--r--noncore/net/wellenreiter/opie-wellenreiter.control2
9 files changed, 831 insertions, 7 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui
index ba4de32..a8b55bb 100644
--- a/noncore/net/wellenreiter/gui/configbase.ui
+++ b/noncore/net/wellenreiter/gui/configbase.ui
@@ -1,554 +1,554 @@
<!DOCTYPE UI><UI>
<class>WellenreiterConfigBase</class>
<widget>
<class>QDialog</class>
<property stdset="1">
<name>name</name>
<cstring>WellenreiterConfigBase</cstring>
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>236</width>
+ <width>232</width>
<height>342</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>Form1</string>
</property>
<property>
<name>layoutMargin</name>
</property>
<property>
<name>layoutSpacing</name>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>6</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>5</number>
</property>
<widget row="0" column="0" rowspan="1" colspan="3" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout5</cstring>
</property>
<property>
<name>layoutSpacing</name>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3_2</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>4</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>Sniffer</string>
</property>
</widget>
<widget>
<class>Line</class>
<property stdset="1">
<name>name</name>
<cstring>Line9</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
</widget>
</hbox>
</widget>
<widget row="1" column="0" rowspan="1" colspan="2" >
<class>QComboBox</class>
<property stdset="1">
<name>name</name>
<cstring>interfaceName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property>
<name>whatsThis</name>
<string>Choose the interface used for sniffing.</string>
</property>
</widget>
<widget row="2" column="0" rowspan="1" colspan="2" >
<class>QComboBox</class>
<item>
<property>
<name>text</name>
<string>&lt;select&gt;</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>cisco</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>wlan-ng</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>hostap</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>orinoco</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>&lt;manual&gt;</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>&lt;file&gt;</string>
</property>
</item>
<property stdset="1">
<name>name</name>
<cstring>deviceType</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property>
<name>whatsThis</name>
<string>Choose the type of driver used for sniffing.</string>
</property>
</widget>
<widget row="3" column="0" rowspan="1" colspan="2" >
<class>QSpinBox</class>
<property stdset="1">
<name>name</name>
<cstring>hopInterval</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>suffix</name>
<string> ms</string>
</property>
<property stdset="1">
<name>maxValue</name>
<number>2000</number>
</property>
<property stdset="1">
<name>minValue</name>
<number>100</number>
</property>
<property stdset="1">
<name>lineStep</name>
<number>100</number>
</property>
<property>
<name>whatsThis</name>
<string>Choose the channel hop interval.</string>
</property>
</widget>
<widget row="3" column="2" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3_3</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Hop Interval</string>
</property>
</widget>
<widget row="2" column="2" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2_3</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Device Type</string>
</property>
</widget>
<widget row="1" column="2" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_2</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Interface Name</string>
</property>
</widget>
<widget row="5" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_5</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>Fake MAC:</string>
</property>
</widget>
<widget row="5" column="1" rowspan="1" colspan="2" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>MAC</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>44:44:44:44:44:44</string>
</property>
</widget>
<widget row="4" column="0" rowspan="1" colspan="3" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>activeScanning</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Active Scanning (caution!)</string>
</property>
</widget>
<widget row="10" column="0" rowspan="1" colspan="3" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout5</cstring>
</property>
<grid>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget row="0" column="1" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>sound on new net</string>
</property>
</widget>
<widget row="1" column="0" >
<class>QComboBox</class>
<item>
<property>
<name>text</name>
<string>Ignore</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Touch</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Key</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Alarm</string>
</property>
</item>
<property stdset="1">
<name>name</name>
<cstring>beaconSound</cstring>
</property>
</widget>
<widget row="0" column="0" >
<class>QComboBox</class>
<item>
<property>
<name>text</name>
<string>Ignore</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Touch</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Key</string>
</property>
</item>
<item>
<property>
<name>text</name>
<string>Alarm</string>
</property>
</item>
<property stdset="1">
<name>name</name>
<cstring>netSound</cstring>
</property>
</widget>
<widget row="1" column="1" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_3</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>sound on beacon</string>
</property>
</widget>
</grid>
</widget>
<widget row="8" column="0" rowspan="1" colspan="3" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout7</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<cstring>writeCaptureFile</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>true</bool>
</property>
<property stdset="1">
<name>text</name>
<string>Write Capture File</string>
</property>
</widget>
<widget>
<class>QToolButton</class>
<property stdset="1">
<name>name</name>
<cstring>getCaptureFileName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
<property stdset="1">
<name>text</name>
<string>...</string>
</property>
</widget>
</hbox>
</widget>
<widget row="7" column="0" rowspan="1" colspan="3" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout6</cstring>
</property>
<property>
<name>layoutSpacing</name>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>2</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3_2_2</cstring>
</property>
<property stdset="1">
<name>sizePolicy</name>
<sizepolicy>
<hsizetype>4</hsizetype>
<vsizetype>1</vsizetype>
</sizepolicy>
</property>
<property stdset="1">
<name>text</name>
<string>GUI</string>
</property>
</widget>
<widget>
<class>Line</class>
<property stdset="1">
<name>name</name>
<cstring>Line9_2</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Horizontal</enum>
</property>
</widget>
</hbox>
</widget>
<spacer row="6" column="2" >
<property>
<name>name</name>
<cstring>Spacer1</cstring>
</property>
<property stdset="1">
<name>orientation</name>
<enum>Vertical</enum>
</property>
<property stdset="1">
<name>sizeType</name>
<enum>Expanding</enum>
</property>
<property>
<name>sizeHint</name>
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
<widget row="9" column="0" rowspan="1" colspan="3" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout7</cstring>
</property>
<hbox>
<property stdset="1">
<name>margin</name>
<number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
<class>QLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1_4</cstring>
</property>
<property stdset="1">
<name>text</name>
<string>CaptureFile:</string>
</property>
</widget>
<widget>
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>captureFileName</cstring>
</property>
<property stdset="1">
<name>enabled</name>
<bool>false</bool>
</property>
</widget>
</hbox>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>writeCaptureFile</sender>
<signal>toggled(bool)</signal>
<receiver>getCaptureFileName</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>activeScanning</sender>
<signal>toggled(bool)</signal>
<receiver>MAC</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>writeCaptureFile</sender>
<signal>toggled(bool)</signal>
<receiver>captureFileName</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
</UI>
diff --git a/noncore/net/wellenreiter/gui/configbasenew.ui b/noncore/net/wellenreiter/gui/configbasenew.ui
new file mode 100644
index 0000000..1307f00
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/configbasenew.ui
@@ -0,0 +1,814 @@
+<!DOCTYPE UI><UI>
+<class>Form1</class>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Form1</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>280</width>
+ <height>382</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Form1</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>3</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QTabWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>interface</cstring>
+ </property>
+ <property>
+ <name>layoutMargin</name>
+ </property>
+ <property>
+ <name>layoutSpacing</name>
+ </property>
+ <widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>tab</cstring>
+ </property>
+ <attribute>
+ <name>title</name>
+ <string>Interface</string>
+ </attribute>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Name:</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" rowspan="1" colspan="2" >
+ <class>QComboBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>name</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Choose the interface used for sniffing.</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2_3</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Driver:</string>
+ </property>
+ </widget>
+ <widget row="1" column="1" rowspan="1" colspan="2" >
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>&lt;select&gt;</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>cisco</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>wlan-ng</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>hostap</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>orinoco</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>&lt;manual&gt;</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>&lt;file&gt;</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>driver</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Choose the type of driver used for sniffing.</string>
+ </property>
+ </widget>
+ <widget row="4" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>CheckBox18</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Hop Channels</string>
+ </property>
+ <property stdset="1">
+ <name>checked</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget row="4" column="1" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>every</string>
+ </property>
+ </widget>
+ <widget row="4" column="2" >
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>hopInterval</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>suffix</name>
+ <string> ms</string>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>2000</number>
+ </property>
+ <property stdset="1">
+ <name>minValue</name>
+ <number>100</number>
+ </property>
+ <property stdset="1">
+ <name>lineStep</name>
+ <number>100</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>1000</number>
+ </property>
+ <property>
+ <name>whatsThis</name>
+ <string>Choose the channel hop interval.</string>
+ </property>
+ </widget>
+ <widget row="5" column="0" rowspan="1" colspan="3" >
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Scan on channel</string>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="1" column="1" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel6</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>6</string>
+ </property>
+ </widget>
+ <widget row="1" column="3" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel8</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>8</string>
+ </property>
+ </widget>
+ <widget row="0" column="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>2</string>
+ </property>
+ </widget>
+ <widget row="1" column="4" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel9</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>9</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>1</string>
+ </property>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channelAll</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>All</string>
+ </property>
+ </widget>
+ <widget row="2" column="1" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel11</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>11</string>
+ </property>
+ </widget>
+ <widget row="2" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel10</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>10</string>
+ </property>
+ </widget>
+ <widget row="1" column="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel7</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>7</string>
+ </property>
+ </widget>
+ <widget row="0" column="3" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel3</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>3</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel5</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>5</string>
+ </property>
+ </widget>
+ <widget row="0" column="4" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel4</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>4</string>
+ </property>
+ </widget>
+ <widget row="2" column="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel12</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>12</string>
+ </property>
+ </widget>
+ <widget row="2" column="3" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel13</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>13</string>
+ </property>
+ </widget>
+ <widget row="2" column="4" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>channel14</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>14</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="3" column="0" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer4</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget row="2" column="0" rowspan="1" colspan="3" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>usePrismHeader</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Use additional PRISM header</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>tab</cstring>
+ </property>
+ <attribute>
+ <name>title</name>
+ <string>Capture</string>
+ </attribute>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>3</number>
+ </property>
+ <widget row="2" column="0" rowspan="1" colspan="2" >
+ <class>ProtocolListView</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>MyCustomWidget1</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>writeCaptureFile</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Write Capture Files To</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QToolButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>getCaptureFileName</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>...</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" rowspan="1" colspan="2" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>captureFileName</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>tab</cstring>
+ </property>
+ <attribute>
+ <name>title</name>
+ <string>Parse</string>
+ </attribute>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>3</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>ProtocolListView</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>parsePackets</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>tab</cstring>
+ </property>
+ <attribute>
+ <name>title</name>
+ <string>Intrusion</string>
+ </attribute>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="1" column="0" >
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Link Level</string>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_5</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Fake Mac:</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" rowspan="1" colspan="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>sendProbeRequests</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Send proble requests</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>44:44:44:44:44:44</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>&lt;automatic&gt;</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>fakeMac</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>autoCompletion</name>
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget row="2" column="0" rowspan="1" colspan="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>tryToAuthenticate</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Try to authenticate</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>enableActiveScanning</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Enable active scanning</string>
+ </property>
+ </widget>
+ <widget row="2" column="0" >
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>GroupBox4</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>IP Level</string>
+ </property>
+ <grid>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget row="1" column="0" rowspan="1" colspan="2" >
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>CheckBox24</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Request DHCP Address</string>
+ </property>
+ </widget>
+ <widget row="0" column="0" >
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_5_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Fake IP:</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>192.168.125.1</string>
+ </property>
+ </item>
+ <item>
+ <property>
+ <name>text</name>
+ <string>&lt;automatic&gt;</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ComboBox10</cstring>
+ </property>
+ <property stdset="1">
+ <name>sizePolicy</name>
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>ProtocolListView</class>
+ <header location="local">protolistview.h</header>
+ <sizehint>
+ <width>100</width>
+ <height>100</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>3</hordata>
+ <verdata>3</verdata>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image>
+ <name>image0</name>
+ <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>CheckBox18</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>hopInterval</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox18</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enableActiveScanning</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GroupBox3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enableActiveScanning</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GroupBox4</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+</UI>
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 716618e..92715b4 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -1,140 +1,146 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
/* LOCAL */
#include "configwindow.h"
#include "mainwindow.h"
/* QT */
#include <qapplication.h>
#include <qcombobox.h>
#include <qfile.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qmap.h>
#include <qpushbutton.h>
#include <qtoolbutton.h>
#include <qspinbox.h>
#include <qtextstream.h>
/* OPIE */
#include <opie2/onetwork.h>
WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0;
WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f )
:WellenreiterConfigBase( parent, name, true, f )
{
_devicetype[ "cisco" ] = DEVTYPE_CISCO;
_devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG;
_devicetype[ "hostap" ] = DEVTYPE_HOSTAP;
_devicetype[ "orinoco" ] = DEVTYPE_ORINOCO;
_devicetype[ "<manual>" ] = DEVTYPE_MANUAL;
_devicetype[ "<file>" ] = DEVTYPE_FILE;
// gather possible interface names from ONetwork
ONetwork* net = ONetwork::instance();
ONetwork::InterfaceIterator it = net->iterator();
while ( it.current() )
{
if ( it.current()->isWireless() )
interfaceName->insertItem( it.current()->name() );
++it;
}
// try to guess device type
QFile m( "/proc/modules" );
if ( m.open( IO_ReadOnly ) )
{
int devicetype(0);
QString line;
QTextStream modules( &m );
while( !modules.atEnd() && !devicetype )
{
modules >> line;
if ( line.contains( "cisco" ) ) devicetype = DEVTYPE_CISCO;
else if ( line.contains( "hostap" ) ) devicetype = DEVTYPE_HOSTAP;
else if ( line.contains( "prism" ) ) devicetype = DEVTYPE_WLAN_NG;
else if ( line.contains( "orinoco" ) ) devicetype = DEVTYPE_ORINOCO;
}
if ( devicetype )
{
deviceType->setCurrentItem( devicetype );
_guess = devicetype;
qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
}
}
#ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here
QPushButton* okButton = new QPushButton( "ok", this );
okButton->show();
Layout5_2->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui
connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
#endif
WellenreiterConfigWindow::_instance = this;
connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) );
connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) );
};
int WellenreiterConfigWindow::daemonDeviceType()
{
QString name = deviceType->currentText();
if ( _devicetype.contains( name ) )
{
return _devicetype[name];
}
else
{
return 0;
}
};
int WellenreiterConfigWindow::daemonHopInterval()
{
return hopInterval->cleanText().toInt();
}
void WellenreiterConfigWindow::changedDeviceType(int t)
{
if ( t != DEVTYPE_FILE ) return;
QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false);
if ( !name.isEmpty() && QFile::exists( name ) )
{
interfaceName->insertItem( name );
interfaceName->setCurrentItem( interfaceName->count()-1 );
}
else
{
deviceType->setCurrentItem( _guess );
}
}
void WellenreiterConfigWindow::getCaptureFileNameClicked()
{
QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true);
qDebug( "name = %s", (const char*) name );
if ( !name.isEmpty() )
{
captureFileName->setText( name );
}
}
+
+bool WellenreiterConfigWindow::usePrismHeader()
+{
+ return true;
+ //return interface->usePrismHeader();
+}
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h
index c7c70a6..11ae5b8 100644
--- a/noncore/net/wellenreiter/gui/configwindow.h
+++ b/noncore/net/wellenreiter/gui/configwindow.h
@@ -1,57 +1,59 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef WELLENREITERCONFIGWINDOW_H
#define WELLENREITERCONFIGWINDOW_H
#include "configbase.h"
#include <qmap.h>
#include <qcombobox.h>
#include <qstring.h>
const int DEVTYPE_SELECT = 0;
const int DEVTYPE_CISCO = 1;
const int DEVTYPE_WLAN_NG = 2;
const int DEVTYPE_HOSTAP = 3;
const int DEVTYPE_ORINOCO = 4;
const int DEVTYPE_MANUAL = 5;
const int DEVTYPE_FILE = 6;
class WellenreiterConfigWindow;
class WellenreiterConfigWindow : public WellenreiterConfigBase
{
Q_OBJECT
public:
WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 );
int daemonDeviceType();
int daemonHopInterval();
const QString soundOnNetwork() const { return netSound->currentText(); };
const QString soundOnBeacon() const { return beaconSound->currentText(); };
static WellenreiterConfigWindow* instance() { return _instance; };
+ bool usePrismHeader();
+
public slots:
void changedDeviceType(int);
void getCaptureFileNameClicked();
protected:
QMap<QString, int> _devicetype;
static WellenreiterConfigWindow* _instance;
int _guess;
};
#endif
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 62e1d9a..a11698f 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -1,65 +1,65 @@
MOC_DIR = ./tmp
OBJECTS_DIR = ./tmp
DESTDIR = $(OPIEDIR)/bin
TEMPLATE = app
CONFIG = qt warn_on debug
HEADERS = wellenreiterbase.h \
mainwindow.h \
wellenreiter.h \
scanlist.h \
logwindow.h \
hexwindow.h \
statwindow.h \
configwindow.h \
manufacturers.h \
graphwindow.h
SOURCES = main.cpp \
mainwindow.cpp \
wellenreiterbase.cpp \
wellenreiter.cpp \
scanlist.cpp \
logwindow.cpp \
hexwindow.cpp \
statwindow.cpp \
configwindow.cpp \
manufacturers.cpp \
graphwindow.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-INTERFACES = configbase.ui
+INTERFACES = configbase.ui #configbasenew.ui
TARGET = wellenreiter
!contains( platform, x11 ) {
message( qws )
include ( $(OPIEDIR)/include.pro )
LIBS += -lqpe -lopie -lopiecore2 -lopieui2 -lopienet2 -lstdc++
}
contains( platform, x11 ) {
LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter
SOURCES += resource.cpp
HEADERS += resource.h
DESTDIR = $(OPIEDIR)/output/bin
}
TRANSLATIONS = ../../../../i18n/de/wellenreiter.ts \
../../../../i18n/nl/wellenreiter.ts \
../../../../i18n/da/wellenreiter.ts \
../../../../i18n/xx/wellenreiter.ts \
../../../../i18n/en/wellenreiter.ts \
../../../../i18n/es/wellenreiter.ts \
../../../../i18n/fr/wellenreiter.ts \
../../../../i18n/hu/wellenreiter.ts \
../../../../i18n/ja/wellenreiter.ts \
../../../../i18n/ko/wellenreiter.ts \
../../../../i18n/no/wellenreiter.ts \
../../../../i18n/pl/wellenreiter.ts \
../../../../i18n/pt/wellenreiter.ts \
../../../../i18n/pt_BR/wellenreiter.ts \
../../../../i18n/sl/wellenreiter.ts \
../../../../i18n/zh_CN/wellenreiter.ts \
../../../../i18n/zh_TW/wellenreiter.ts
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
new file mode 100644
index 0000000..e69de29
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
diff --git a/noncore/net/wellenreiter/gui/protolistview.h b/noncore/net/wellenreiter/gui/protolistview.h
new file mode 100644
index 0000000..e69de29
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/protolistview.h
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 9e1010b..705aab6 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -1,431 +1,433 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
***********************************************************************/
// Opie
#ifdef QWS
#include <opie/odevice.h>
using namespace Opie;
#endif
#ifdef QWS
#include <opie2/oapplication.h>
#else
#include <qapplication.h>
#endif
#include <opie2/onetwork.h>
#include <opie2/opcap.h>
// Qt
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qdatetime.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qspinbox.h>
#include <qtoolbutton.h>
#include <qmainwindow.h>
// Standard
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
// Local
#include "wellenreiter.h"
#include "scanlist.h"
#include "logwindow.h"
#include "hexwindow.h"
#include "configwindow.h"
#include "statwindow.h"
#include "graphwindow.h"
#include "manufacturers.h"
Wellenreiter::Wellenreiter( QWidget* parent )
: WellenreiterBase( parent, 0, 0 ),
sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 )
{
//
// construct manufacturer database
//
QString manufile;
#ifdef QWS
manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() );
#else
manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" );
#endif
manufacturerdb = new ManufacturerDB( manufile );
logwindow->log( "(i) Wellenreiter has been started." );
//
// detect operating system
//
#ifdef QWS
QString sys;
sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() );
_system = ODevice::inst()->system();
logwindow->log( sys );
#endif
// setup GUI
netview->setColumnWidthMode( 1, QListView::Manual );
if ( manufacturerdb )
netview->setManufacturerDB( manufacturerdb );
pcap = new OPacketCapturer();
}
Wellenreiter::~Wellenreiter()
{
// no need to delete child widgets, Qt does it all for us
delete manufacturerdb;
delete pcap;
}
void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
{
configwindow = cw;
}
void Wellenreiter::channelHopped(int c)
{
QString title = "Wellenreiter II -scan- [";
QString left;
if ( c > 1 ) left.fill( '.', c-1 );
title.append( left );
title.append( '|' );
if ( c < iface->channels() )
{
QString right;
right.fill( '.', iface->channels()-c );
title.append( right );
}
title.append( "]" );
//title.append( QString().sprintf( " %02d", c ) );
assert( parent() );
( (QMainWindow*) parent() )->setCaption( title );
}
void Wellenreiter::handleBeacon( OPacket* p, OWaveLanManagementPacket* beacon )
{
QString type;
if ( beacon->canIBSS() )
{
type = "adhoc";
}
else if ( beacon->canESS() )
{
type = "managed";
}
else
{
qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" );
return;
}
OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
QString essid = ssid ? ssid->ID() : QString("<unknown>");
OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
int channel = ds ? ds->channel() : -1;
OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 );
// update graph window
if ( ds )
{
OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) );
if ( prism )
graphwindow->traffic( ds->channel(), prism->signalStrength() );
else
graphwindow->traffic( ds->channel(), 95 );
}
}
void Wellenreiter::handleData( OPacket* p, OWaveLanDataPacket* data )
{
OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" );
if ( wlan->fromDS() && !wlan->toDS() )
{
qDebug( "FromDS traffic: '%s' -> '%s' via '%s'",
(const char*) wlan->macAddress3().toString(true),
(const char*) wlan->macAddress1().toString(true),
(const char*) wlan->macAddress2().toString(true) );
netView()->fromDStraffic( wlan->macAddress3().toString(),
wlan->macAddress1().toString(),
wlan->macAddress2().toString() );
}
else
if ( !wlan->fromDS() && wlan->toDS() )
{
qDebug( "ToDS traffic: '%s' -> '%s' via '%s'",
(const char*) wlan->macAddress2().toString(true),
(const char*) wlan->macAddress3().toString(true),
(const char*) wlan->macAddress1().toString(true) );
netView()->toDStraffic( wlan->macAddress2().toString(),
wlan->macAddress3().toString(),
wlan->macAddress1().toString() );
}
else
if ( wlan->fromDS() && wlan->toDS() )
{
qDebug( "WDS(bridge) traffic: '%s' -> '%s' via '%s' and '%s'",
(const char*) wlan->macAddress4().toString(true),
(const char*) wlan->macAddress3().toString(true),
(const char*) wlan->macAddress1().toString(true),
(const char*) wlan->macAddress2().toString(true) );
netView()->WDStraffic( wlan->macAddress4().toString(),
wlan->macAddress3().toString(),
wlan->macAddress1().toString(),
wlan->macAddress2().toString() );
}
else
{
qDebug( "IBSS(AdHoc) traffic: '%s' -> '%s' (Cell: '%s')'",
(const char*) wlan->macAddress2().toString(true),
(const char*) wlan->macAddress1().toString(true),
(const char*) wlan->macAddress3().toString(true) );
netView()->IBSStraffic( wlan->macAddress2().toString(),
wlan->macAddress1().toString(),
wlan->macAddress3().toString() );
}
OARPPacket* arp = (OARPPacket*) p->child( "ARP" );
if ( arp )
{
qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() );
if ( arp->type() == "REQUEST" )
{
netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() );
}
else if ( arp->type() == "REPLY" )
{
netView()->identify( arp->senderMacAddress().toString(), arp->senderIPV4Address().toString() );
netView()->identify( arp->targetMacAddress().toString(), arp->targetIPV4Address().toString() );
}
}
OIPPacket* ip = (OIPPacket*) p->child( "IP" );
if ( ip )
{
qDebug( "Received IP packet." );
}
}
void Wellenreiter::receivePacket( OPacket* p )
{
hexWindow()->log( p->dump( 8 ) );
// check if we received a beacon frame
OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) );
if ( beacon && beacon->managementType() == "Beacon" )
{
handleBeacon( p, beacon );
return;
}
//TODO: WEP check here
// check for a data frame
OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) );
if ( data )
{
handleData( p, data );
}
}
void Wellenreiter::stopClicked()
{
if ( iface )
{
disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
iface->setChannelHopping(); // stop hopping channels
}
else
killTimers();
pcap->close();
sniffing = false;
if ( iface )
{
// switch off monitor mode
iface->setMonitorMode( false );
// switch off promisc flag
iface->setPromiscuousMode( false );
system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess
}
logwindow->log( "(i) Stopped Scanning." );
assert( parent() );
( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" );
// message the user
QMessageBox::information( this, "Wellenreiter II",
tr( "Your wireless card\nshould now be usable again." ) );
sniffing = false;
emit( stoppedSniffing() );
// print out statistics
for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
statwindow->updateCounter( it.key(), it.data() );
}
void Wellenreiter::startClicked()
{
// get configuration from config window
const QString& interface = configwindow->interfaceName->currentText();
const int cardtype = configwindow->daemonDeviceType();
const int interval = configwindow->daemonHopInterval();
if ( ( interface == "" ) || ( cardtype == 0 ) )
{
QMessageBox::information( this, "Wellenreiter II",
tr( "Your device is not\nproperly configured. Please reconfigure!" ) );
return;
}
// configure device
ONetwork* net = ONetwork::instance();
iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface ));
// set monitor mode
+ bool usePrism = configwindow->usePrismHeader();
+
switch ( cardtype )
{
- case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface ) ); break;
- case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface ) ); break;
- case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface ) ); break;
- case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface ) ); break;
+ case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break;
+ case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break;
+ case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break;
+ case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break;
case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break;
case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break;
default: assert( 0 ); // shouldn't reach this
}
// switch device into monitor mode
if ( cardtype < DEVTYPE_FILE )
{
if ( cardtype != DEVTYPE_MANUAL )
iface->setMonitorMode( true );
if ( !iface->monitorMode() )
{
QMessageBox::warning( this, "Wellenreiter II",
tr( "Can't set device into monitor mode." ) );
return;
}
}
// open pcap and start sniffing
if ( cardtype != DEVTYPE_FILE )
{
if ( configwindow->writeCaptureFile->isEnabled() ) //FIXME: bug!?
{
QString dumpname( configwindow->captureFileName->text() );
dumpname.append( '-' );
dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) );
dumpname.append( ".wellenreiter" );
pcap->open( interface, dumpname );
}
else
{
pcap->open( interface );
}
}
else
{
pcap->open( QFile( interface ) );
}
if ( !pcap->isOpen() )
{
QMessageBox::warning( this, "Wellenreiter II",
tr( "Can't open packet capturer:\n" ) + QString(strerror( errno ) ));
return;
}
// set capturer to non-blocking mode
pcap->setBlocking( false );
// start channel hopper
if ( cardtype != DEVTYPE_FILE )
iface->setChannelHopping( 1000 ); //use interval from config window
if ( cardtype != DEVTYPE_FILE )
{
// connect socket notifier and start channel hopper
connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
}
else
{
// start timer for reading packets
startTimer( 100 );
}
logwindow->log( "(i) Started Scanning." );
sniffing = true;
emit( startedSniffing() );
if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title
else
{
assert( parent() );
( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) );
}
}
void Wellenreiter::timerEvent( QTimerEvent* )
{
qDebug( "Wellenreiter::timerEvent()" );
OPacket* p = pcap->next();
if ( !p ) // no more packets available
{
stopClicked();
}
else
{
receivePacket( p );
delete p;
}
}
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control
index 8bb5b1c..f7272e2 100644
--- a/noncore/net/wellenreiter/opie-wellenreiter.control
+++ b/noncore/net/wellenreiter/opie-wellenreiter.control
@@ -1,10 +1,10 @@
Package: opie-wellenreiter
Files: bin/wellenreiter share/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop
Priority: optional
Section: opie/applications
Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
Architecture: arm
Version: 0.9.9-$SUB_VERSION
-Depends: task-opie-minimal, libpcap0, libopie2 (1.8.1)
+Depends: task-opie-minimal, libpcap0 (0.7.2), libopie2 (1.8.1)
Description: A WaveLAN Network Monitor
A WaveLAN Network Monitor/Sniffer for the Opie Environment.