Merge pull request #112 from Deltafox79/windows

Navicat MongoDB Support
This commit is contained in:
Double Sine 2018-08-08 22:11:37 +08:00 committed by GitHub
commit 72fefcf3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -28,7 +28,8 @@ public:
Oracle, Oracle,
SQLServer, SQLServer,
SQLite, SQLite,
MariaDB MariaDB,
MongoDB
}; };
private: private:
std::random_device rand_dev; std::random_device rand_dev;
@ -113,6 +114,9 @@ private:
case Product::MariaDB: case Product::MariaDB:
data[7] = 0x7C; data[7] = 0x7C;
break; break;
case Product::MongoDB:
data[7] = 0x80;
break;
default: default:
break; break;
} }
@ -190,4 +194,4 @@ public:
return Key; return Key;
} }
}; };

View File

@ -158,6 +158,7 @@ bool GatherInformation(NavicatKeygen::Product& product,
<< "5. SQLServer" << std::endl << "5. SQLServer" << std::endl
<< "6. SQLite" << std::endl << "6. SQLite" << std::endl
<< "7. MariaDB" << std::endl << "7. MariaDB" << std::endl
<< "8. MongoDB" << std::endl
<< std::endl; << std::endl;
while (true) { while (true) {
@ -193,6 +194,9 @@ bool GatherInformation(NavicatKeygen::Product& product,
case 7: case 7:
product = NavicatKeygen::Product::MariaDB; product = NavicatKeygen::Product::MariaDB;
break; break;
case 8:
product = NavicatKeygen::Product::MongoDB;
break;
default: default:
throw std::invalid_argument("Invalid index"); throw std::invalid_argument("Invalid index");
} }
@ -449,4 +453,4 @@ ON_tmain_ERROR:
if (cipher) if (cipher)
delete cipher; delete cipher;
return 0; return 0;
} }