mirror of
https://github.com/outbackdingo/amnezia-client.git
synced 2026-01-27 02:18:09 +00:00
added a check that S1 + messageInitiationSize should not be equal to S2 + messageResponseSize (#754)
This commit is contained in:
@@ -89,14 +89,20 @@ void InstallController::install(DockerContainer container, int port, TransportPr
|
||||
QString junkPacketCount = QString::number(QRandomGenerator::global()->bounded(3, 10));
|
||||
QString junkPacketMinSize = QString::number(50);
|
||||
QString junkPacketMaxSize = QString::number(1000);
|
||||
QString initPacketJunkSize = QString::number(QRandomGenerator::global()->bounded(15, 150));
|
||||
QString responsePacketJunkSize = QString::number(QRandomGenerator::global()->bounded(15, 150));
|
||||
|
||||
int s1 = QRandomGenerator::global()->bounded(15, 150);
|
||||
int s2 = QRandomGenerator::global()->bounded(15, 150);
|
||||
while (s1 + AwgConstant::messageInitiationSize == s2 + AwgConstant::messageResponseSize) {
|
||||
s2 = QRandomGenerator::global()->bounded(15, 150);
|
||||
}
|
||||
|
||||
QString initPacketJunkSize = QString::number(s1);
|
||||
QString responsePacketJunkSize = QString::number(s2);
|
||||
|
||||
QSet<QString> headersValue;
|
||||
while (headersValue.size() != 4) {
|
||||
|
||||
auto max = (std::numeric_limits<qint32>::max)();
|
||||
headersValue.insert(QString::number(QRandomGenerator::global()->bounded(1, max)));
|
||||
headersValue.insert(QString::number(QRandomGenerator::global()->bounded(5, max)));
|
||||
}
|
||||
|
||||
auto headersValueList = headersValue.values();
|
||||
|
||||
Reference in New Issue
Block a user