Skip to content

Commit

Permalink
Merge pull request #50 from RealEnder/master
Browse files Browse the repository at this point in the history
Two new simple algorithm plugins, general improvements and additions
  • Loading branch information
RealEnder authored Jul 21, 2019
2 parents a503a38 + e3b305e commit c1f1665
Show file tree
Hide file tree
Showing 9 changed files with 269 additions and 17 deletions.
70 changes: 61 additions & 9 deletions src/WirelessMatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
#include "algorithms/Tpw4gKeygen.h"
#include "algorithms/PldtKeygen.h"
#include "algorithms/BaseXKeygen.h"
#include "algorithms/EijsinkKeygen.h"
#include "algorithms/GontwifiKeygen.h"
#include <QRegExp>

WirelessMatcher::WirelessMatcher() {
Expand Down Expand Up @@ -269,7 +271,7 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
}


if (ssid.count(QRegExp("^InfostradaWiFi-[0-9a-zA-Z]{6}$")) == 1)
if (ssid.count(QRegExp("^InfostradaWiFi-[0-9a-f]{6}$")) == 1)
keygens->append(new InfostradaKeygen(ssid, mac));

if (ssid.startsWith("InterCable"))
Expand All @@ -295,8 +297,11 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
if (ssid.count(QRegExp("^PBS-[0-9A-F]{6}$")) == 1)
keygens->append(new PBSKeygen(ssid, mac));

if (mac.startsWith("08:86:3B") || mac.startsWith("94:44:52")
|| mac.startsWith("EC:1A:59"))
if (ssid.count(QRegExp("^(B|b)elkin(\\.|_)[0-9a-fA-F]{3,6}$")) == 1
&& (mac.startsWith("08:86:3B") || mac.startsWith("14:91:82")
|| mac.startsWith("94:10:3E") || mac.startsWith("94:44:52")
|| mac.startsWith("B4:75:0E") || mac.startsWith("C0:56:27")
|| mac.startsWith("EC:1A:59")))
keygens->append(new BelkinKeygen(ssid, mac));

if (ssid.count(
Expand Down Expand Up @@ -341,10 +346,16 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
|| mac.startsWith("00:22:3F") || mac.startsWith("00:24:B2")))
keygens->append(new SkyV1Keygen(ssid, mac));

if (ssid.count(QRegExp("^WLAN-[0-9a-fA-F]{6}$")) == 1
&& (mac.startsWith("00:12:BF") || mac.startsWith("00:1A:2A")
|| mac.startsWith("00:1D:19")))
keygens->append(new Speedport500Keygen(ssid, mac));
if (ssid.count(QRegExp("^WLAN-[0-9A-F]{6}$")) == 1
&& ssid.mid(5, 4) == mac.mid(9, 5).replace(":", "")) {
if (mac.startsWith("00:12:BF") || mac.startsWith("00:1A:2A")
|| mac.startsWith("00:1D:19")) {
keygens->append(new Speedport500Keygen(ssid, mac, "-"));
}
if (mac.startsWith("00:1D:19") || mac.startsWith("00:23:08")) {
keygens->append(new Speedport500Keygen(ssid, mac, ""));
}
}

if (ssid.count(QRegExp("^TECOM-AH4(021|222)-[0-9A-Z]{6}$")) == 1) {
keygens->append(new TecomKeygen(ssid, mac));
Expand Down Expand Up @@ -441,17 +452,27 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen8, -2));
}

if (ssid.count(QRegExp("^NET_2G[0-9A-F]{6}$")) == 1) {
if (ssid.count(QRegExp("^NET_2G[0-9A-F]{6}$")) == 1
|| ssid.count(QRegExp("^NET_2G_[0-9]{3}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen8, -6));
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen8, -5));
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen12, -6));
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen12, -5));
}

if (ssid.count(QRegExp("^OPTIC[0-9a-fA-F]{4}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen8, -16));
}

/* Hon Hai Precision Ind. Co.,Ltd. algo */
if (ssid.count(QRegExp("^TeleRed-[0-9A-F]{4}$")) == 1
|| ssid.count(QRegExp("^Ubee[0-9A-F]{4}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen10, -4));
}

if (ssid.count(QRegExp("^PTV[0-9]{4}$")) == 1
|| ssid.count(QRegExp("^VIVO-[0-9A-F]{4}$")) == 1
|| (ssid.count(QRegExp("^WIFI-[0-9A-F]{4}$")) == 1 && mac.replace(":", "").right(4) == ssid.right(4) ) ) {
|| (ssid.count(QRegExp("^WIFI-[0-9A-F]{4}$")) == 1 && mac.right(5).replace(":", "") == ssid.right(4) ) ) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen10, 0));
}

Expand All @@ -478,6 +499,19 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen10, -1));
}

if (ssid.count(QRegExp("^ORANGE-[0-9A-F]{4}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen12, -6));
}

if (ssid.count(QRegExp("^Distributel_[0-9]{5}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen12, -3));
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen12, -2));
}

if (ssid.count(QRegExp("^FLOW[0-9]{4}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen12, -2));
}

if (ssid.count(QRegExp("^Access[0-9]{3}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen12, 2));
}
Expand Down Expand Up @@ -528,6 +562,12 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen12, -6));
}

if (ssid.count(QRegExp("^HOTBOX-[0-9A-F]{4}$")) == 1 &&
(mac.startsWith("7C:B7:33") || mac.startsWith("A0:64:8F")
|| mac.startsWith("B4:EE:B4") || mac.startsWith("E0:CE:C3"))) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen12, -6));
}

if (ssid.count(QRegExp("^movistar_[0-9a-f]{6}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen12, -9));
}
Expand All @@ -553,6 +593,11 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
keygens->append(new BssidKeygen(ssid, mac, FlagLc | FlagLen8 | FlagCutLeft, 1));
}

if (ssid.count(QRegExp("^LIME[0-9]{4}$")) == 1) {
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen10 | FlagCutLeft, 0));
keygens->append(new BssidKeygen(ssid, mac, FlagUc | FlagLen12, -2));
}

if (ssid.count(QRegExp("^Singtel[0-9]{4}-[0-9A-F]{4}$")) == 1
|| ssid.count(QRegExp("^SINGTEL-[0-9A-F]{4}$")) == 1
|| ssid.count(QRegExp("^BoxByTELMA-[0-9A-F]{4}$")) == 1) {
Expand Down Expand Up @@ -615,5 +660,12 @@ QVector<Keygen *> * WirelessMatcher::getKeygens(QString ssid, QString mac) {
keygens->append(new PldtKeygen(ssid, mac, 1));
}

if (ssid.count(QRegExp("^Eijsink[0-9]{5}(K5|k5|)$")) == 1)
keygens->append(new EijsinkKeygen(ssid, mac));

if (ssid.startsWith("GONTWIFI")
|| ssid.startsWith("GONT_WIFI"))
keygens->append(new GontwifiKeygen(ssid, mac));

return keygens;
}
35 changes: 35 additions & 0 deletions src/algorithms/EijsinkKeygen.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2016 Alex Stanev <[email protected]>
*
* This file is part of Router Keygen.
*
* Router Keygen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Router Keygen is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Router Keygen. If not, see <http://www.gnu.org/licenses/>.
*/

#include "EijsinkKeygen.h"

EijsinkKeygen::EijsinkKeygen(QString ssid, QString mac) :
Keygen(ssid, mac) {
kgname = "Eijsink";
}

QVector<QString> & EijsinkKeygen::getKeys(){
QString ssid = getSsidName();
ssid.replace("k5", "");
ssid.replace("K5", "");

results.append("951" + ssid.right(5));

return results;
}
32 changes: 32 additions & 0 deletions src/algorithms/EijsinkKeygen.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2016 Alex Stanev <[email protected]>
*
* This file is part of Router Keygen.
*
* Router Keygen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Router Keygen is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Router Keygen. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef EIJSINKKEYGEN_H
#define EIJSINKKEYGEN_H
#include "Keygen.h"

class EijsinkKeygen : public Keygen
{
public:
EijsinkKeygen(QString ssid, QString mac);
private:
QVector<QString> & getKeys();
};

#endif // EIJSINKKEYGEN_H
33 changes: 33 additions & 0 deletions src/algorithms/GontwifiKeygen.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2016 Alex Stanev <[email protected]>
*
* This file is part of Router Keygen.
*
* Router Keygen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Router Keygen is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Router Keygen. If not, see <http://www.gnu.org/licenses/>.
*/

#include "GontwifiKeygen.h"

GontwifiKeygen::GontwifiKeygen(QString ssid, QString mac) :
Keygen(ssid, mac) {
kgname = "Gontwifi";
}

QVector<QString> & GontwifiKeygen::getKeys(){
QString mac = getMacAddress();

results.append("000000" + mac[9] + mac[8] + mac[7] + mac[6]);

return results;
}
32 changes: 32 additions & 0 deletions src/algorithms/GontwifiKeygen.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright 2016 Alex Stanev <[email protected]>
*
* This file is part of Router Keygen.
*
* Router Keygen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Router Keygen is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Router Keygen. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef GONTWIFIKEYGEN_H
#define GONTWIFIKEYGEN_H
#include "Keygen.h"

class GontwifiKeygen : public Keygen
{
public:
GontwifiKeygen(QString ssid, QString mac);
private:
QVector<QString> & getKeys();
};

#endif // GONTWIFIKEYGEN_H
3 changes: 3 additions & 0 deletions src/algorithms/InfostradaKeygen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ QVector<QString> & InfostradaKeygen::getKeys(){
QString mac = getMacAddress();
if ( mac.size() != 12 )
throw ERROR;

results.append("2"+mac.toUpper());
results.append("2"+mac.toLower());

return results;
}
13 changes: 8 additions & 5 deletions src/algorithms/Speedport500Keygen.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
#include "Speedport500Keygen.h"

Speedport500Keygen::Speedport500Keygen(QString ssid, QString mac) :
Speedport500Keygen::Speedport500Keygen(QString ssid, QString mac, QString minus) :
Keygen(ssid, mac) {
kgname = "Speedport500";
this->minus = minus;
}

QVector<QString> & Speedport500Keygen::getKeys() {
QString mac = getMacAddress();
if (mac.size() != 12)
throw ERROR;

QString ssid = getSsidName();
QString first = ssid.at(9);
QString block = ssid.at(10) + mac.right(3);
QString beginning = "SP-";
beginning += ssid.at(9);

for (char x = '0'; x <= '9'; ++x)
for (char y = '0'; y <= '9'; ++y)
for (char z = '0'; z <= '9'; ++z)
this->results.append(beginning + z + block + x +y + z );
for (char z = '0'; z <= '9'; ++z) {
this->results.append("SP" + minus + first + z + block + x + y + z );
}
return results;
}
3 changes: 2 additions & 1 deletion src/algorithms/Speedport500Keygen.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ class Speedport500Keygen :public Keygen

{
public:
Speedport500Keygen(QString ssid, QString mac);
Speedport500Keygen(QString ssid, QString mac, QString minus);
private:
QVector<QString> & getKeys();
QString minus;
};

#endif // SPEEDPORT500KEYGEN_H
Loading

0 comments on commit c1f1665

Please sign in to comment.