Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Fixed reversed WEP keys hexmode
Browse files Browse the repository at this point in the history
We need to fix wifiQuickConnect!! Can't assume it is plaintext or hex,
need to determine it automatically, or ask the user
  • Loading branch information
Kris Moore committed Mar 15, 2014
1 parent 53ff927 commit 31467bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src-qt4/libpcbsd/utils/netif.cpp
Expand Up @@ -536,7 +536,9 @@ void NetworkInterface::wifiQuickConnect(QString SSID, QString netKey, QString De
} else if ( SecType.contains("WEP") ) { } else if ( SecType.contains("WEP") ) {
//Set WEP Defaults //Set WEP Defaults
int WEPIndex = 0; int WEPIndex = 0;
bool WEPHex = true; //Use Hex WEP key // Default to plain-text WEP keys..
// This needs to be fixed to figure it out automatically
bool WEPHex = false;


streamout << " key_mgmt=NONE\n"; streamout << " key_mgmt=NONE\n";
streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex) + "\n"; streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex) + "\n";
Expand Down
4 changes: 2 additions & 2 deletions src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
Expand Up @@ -164,9 +164,9 @@ void wificonfigwidgetbase::updateWPASupp()
streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex[curItem]) + "\n"; streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex[curItem]) + "\n";
// Check if we are using a plaintext WEP or not // Check if we are using a plaintext WEP or not
if ( WEPHex[curItem] ) if ( WEPHex[curItem] )
streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=\"" + WEPKey[curItem] + "\"\n";
else
streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=" + WEPKey[curItem] + "\n"; streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=" + WEPKey[curItem] + "\n";
else
streamout << " wep_key" + tmp.setNum(WEPIndex[curItem]) + "=\"" + WEPKey[curItem] + "\"\n";


} else if (SSIDEncType[curItem] == WPA_ENCRYPTION ) { } else if (SSIDEncType[curItem] == WPA_ENCRYPTION ) {


Expand Down

0 comments on commit 31467bf

Please sign in to comment.