QVector<QString> & AxtelKeygen::getKeys() { QString mac = getMacAddress(); QString macShort = mac.replace(":", ""); bool gotResult = false; if ( macShort.length() != 12 ) throw ERROR; QString ssidSubpart = getSsidName().right(4); if ( ssidSubpart.toLower() == macShort.right(4).toLower()) { results.append(mac.mid(2).toUpper()); gotResult = true; } //WPA = (Second octet + 1) + (Fourth octect) + (Fifth octect) + (Sixth octect - 1) if (macShort.right(2).toInt(0, 16)-1 == ssidSubpart.right(2).toInt(0, 16)) { QString M1 = QString("%1").arg(mac.mid(2, 2).toInt(0, 16) + 1, 2, 16, QChar('0')); QString M2 = mac.mid(6, 2); QString wpaKey = M1 + M2 + ssidSubpart; results.append(wpaKey.toUpper()); gotResult = true; } if (gotResult) { return results; } else { throw ERROR; } }
QVector<QString> & ZyxelKeygen::getKeys() { if (getMacAddress().size() != 12) throw ERROR; this->hash->reset(); QString macMod = getMacAddress().left(8) + getSsidName().right(4); this->hash->addData(macMod.toLower().toLatin1()); QString result = QString::fromLatin1(this->hash->result().toHex().data()); result.truncate(20); this->results.append(result.toUpper()); return results; }
QVector<QString> & OteKeygen::getKeys() { if (getMacAddress().length() == 12) { results.append(getMacAddress().toLower()); } else { QString ssidIdentifier = getSsidName().right(6); results.append("c87b5b" + ssidIdentifier); results.append("fcc897" + ssidIdentifier); results.append("681ab2" + ssidIdentifier); results.append("b075d5" + ssidIdentifier); results.append("384608" + ssidIdentifier); } return results; }
QVector<QString> & AliceItalyKeygen::getKeys() { if (supportedAlice->isEmpty()) throw ERROR; SHA256_CTX sha; unsigned char hash[32]; bool status; for (int j = 0; j < supportedAlice->size(); ++j) {/*For pre AGPF 4.5.0sx*/ QString serialStr = supportedAlice->at(j)->serial + "X"; int k = supportedAlice->at(j)->magic[0]; int Q = supportedAlice->at(j)->magic[1]; int serial = (getSsidName().right(8).toInt(&status, 10) - Q) / k; QString tmp = ""; tmp.setNum(serial); for (int i = 0; i < 7 - tmp.length(); i++) { serialStr += "0"; } serialStr += tmp; char mac[6]; QString key = ""; QString macS = getMacAddress(); if (macS.size() == 12) { for (int i = 0; i < 12; i += 2) mac[i / 2] = (macS.mid(i, 1).toInt(&status, 16) << 4) + macS.mid(i + 1, 1).toInt(&status, 16); /* Compute the hash */ SHA256_Init(&sha); SHA256_Update(&sha, (const void *) ALICE_SEED, sizeof(ALICE_SEED)); SHA256_Update(&sha, (const void *) serialStr.toLatin1().data(), serialStr.size()); SHA256_Update(&sha, (const void *) mac, sizeof(mac)); SHA256_Final(hash, &sha); for (int i = 0; i < 24; ++i) { key += preInitCharset.at(hash[i] & 0xFF); } if (!results.contains(key)) results.append(key); } /*For post AGPF 4.5.0sx*/ QString macEth = macS.left(6); for (int extraNumber = 0;extraNumber < 10; ++extraNumber) { QString calc = ""; calc.setNum(extraNumber); calc += getSsidName().right(8); calc.setNum(calc.toInt(&status, 10), 16); calc = calc.toUpper(); if (macEth.at(5) == calc.at(0)) { macEth += calc.right(6); break; } } if (macEth == macS.left(6)) { continue; } for (int i = 0; i < 12; i += 2) mac[i / 2] = (macEth.mid(i, 1).toInt(&status, 16) << 4) + macEth.mid(i + 1, 1).toInt(&status, 16); /* Compute the hash */ SHA256_Init(&sha); SHA256_Update(&sha, (const void *) ALICE_SEED, sizeof(ALICE_SEED)); SHA256_Update(&sha, (const void *) serialStr.toLatin1().data(), serialStr.size()); SHA256_Update(&sha, (const void *) mac, sizeof(mac)); SHA256_Final(hash, &sha); key = ""; for (int i = 0; i < 24; ++i) key += preInitCharset.at(hash[i] & 0xFF); if (!results.contains(key)) results.append(key); } return results; }
int ArcadyanKeygen::getSupportState() const{ if ( getSsidName().count(QRegExp("^(Arcor|EasyBox|Vodafone|WLAN)(-| )[0-9a-fA-F]{6}$")) == 1 || getSsidName().count(QRegExp("Vodafone[0-9a-zA-Z]{4}")) == 1 ) return SUPPORTED; return UNLIKELY; }
int HuaweiKeygen::getSupportState() const{ if ( getSsidName().count(QRegExp("^INFINITUM[0-9a-zA-Z]{4}$")) == 1 ) return SUPPORTED; return UNLIKELY; }
int AliceGermanyKeygen::getSupportState() const{ if ( getSsidName().count(QRegExp("^ALICE-WLAN[0-9a-fA-F]{2}$")) == 1 ) return SUPPORTED; return UNLIKELY; }