BA fix + QoS fix.

This commit is contained in:
cora32 2015-03-01 15:01:24 +03:00
parent 74f57482fd
commit a6803828be
4 changed files with 43 additions and 34 deletions

View File

@ -754,7 +754,11 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
strcpy(localBuff, recvBuff);
};
if (strstri(recvBuff, "http/1.1 401") != NULL
|| strstri(recvBuff, "http/1.0 401") != NULL)
|| strstri(recvBuff, "http/1.0 401") != NULL
|| (strstri(recvBuff, "200 ok") != NULL
&& strstri(recvBuff, "<statusValue>401</statusValue>") != NULL
&& strstri(recvBuff, "<statusString>Unauthorized</statusString>") != NULL)
)
{
Sleep(200);
} else
@ -808,10 +812,10 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
)
&& strstri(recvBuff, "http/1.1 401 ") == NULL
&& strstri(recvBuff, "http/1.0 401 ") == NULL
&& strstr(headerMsg, "<statusValue>401</statusValue>") == NULL
&& strstr(headerMsg, "<statusString>Unauthorized</statusString>") == NULL
&& strstr(headerMsg, "неправильны") == NULL && strstr(headerMsg, "Неправильны") == NULL
&& strstr(headerMsg, "Неправильны") == NULL
&& strstri(recvBuff, "<statusValue>401</statusValue>") == NULL
&& strstri(recvBuff, "<statusString>Unauthorized</statusString>") == NULL
&& strstri(recvBuff, "неправильны") == NULL
&& strstri(recvBuff, "Неправильны") == NULL
&& dataSz > 13
)
{
@ -834,8 +838,8 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
}
else
{
if (strstri(headerMsg, "неправильны") == NULL
&& strstri(headerMsg, "Неправильны") == NULL)
if (strstri(recvBuff, "неправильны") == NULL
&& strstri(recvBuff, "Неправильны") == NULL)
{
ZeroMemory(pass, sizeof(pass));
sprintf(pass, "%s - Password found: %s", ip, tPass);

View File

@ -2505,7 +2505,7 @@ void _getLinkFromJSLocation(char *dataBuff, char *str, char *tag, char *ip, int
)
{
strcpy(dataBuff, "/");
strncat(dataBuff, tempBuff + 1, sz - 1);
strncat(dataBuff, tempBuff, sz);
}
else strncpy(dataBuff, tempBuff, sz);
};

View File

@ -180,13 +180,15 @@ void setSceneArea()
ui->graphicsVoice->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
ui->graphicsVoice->setRenderHints(QPainter::TextAntialiasing);
ui->graphicsVoice->setCacheMode(QGraphicsView::CacheNone);
ui->graphicsVoice->raise();
sceneGrid = new QGraphicsScene();
sceneGrid2 = new QGraphicsScene();
sceneGraph = new QGraphicsScene();
sceneUpper = new QGraphicsScene();
sceneUpper->setSceneRect(0, 0, ui->graphicLog_Upper->width(), ui->graphicLog_Upper->height());
sceneGrid->setSceneRect(0, 0, ui->graphicLog_Upper->width(), ui->graphicLog_Upper->height());
sceneActivity = new QGraphicsScene();
sceneActivityGrid = new QGraphicsScene();
sceneTextPlacer = new QGraphicsScene();
@ -1916,14 +1918,13 @@ void nesca_3::slotSaveImage(QAction *qwe)
{
QObject *smB = this->sender();
int ci = ui->tabMainWidget->currentIndex();
QDate QD = QDate::currentDate();
QTime QT = QTime::currentTime();
if(smB == menuPS)
{
if(ME2ScanFlag || VoiceScanFlag)
{
QString fn = QString::number(QD.day()) + "." + QString::number(QD.month()) + "." + QString::number(QD.year()) + "-h" + QString::number(QT.hour()) + ".m" + QString::number(QT.minute()) + "_" + (ME2ScanFlag ? QString("ME2") : QString("Voice")) + "_" + (ci == 0 ? ui->lineEditStartIPDNS->text() : ui->ipLine->text()) + ".png";
QString fn = QString::number(QT.msec()) + "_" + (ME2ScanFlag ? QString("ME2") : QString("Voice")) + "_" + (ci == 0 ? ui->ipLine->text() : ui->lineEditStartIPDNS->text()) + ".png";
int ax = 27;
int ay = 2;
int w = ui->graphicLog->width() + 30;
@ -1933,6 +1934,7 @@ void nesca_3::slotSaveImage(QAction *qwe)
int spY = 108;
int wsp = 40;
int hsp = 70;
if(VoiceScanFlag)
{
hOffset = -60;
@ -1941,10 +1943,10 @@ void nesca_3::slotSaveImage(QAction *qwe)
wsp = 0;
hsp = -3;
};
QImage image(ui->graphicTextPlacer->width() + 5, ui->graphicTextPlacer->height() + hOffset, QImage::Format_RGB32);
QPainter painter(&image);
image.fill(NULL);
image.fill(QColor(0,0,0));
QPixmap pixmap(ui->graphicTextPlacer->width() + 5, ui->graphicTextPlacer->height() + hOffset);
QPainter painter(&pixmap);
pixmap.fill(QColor(0, 0, 0));
sceneTextPlacer->render(&painter, QRect(spX, spY, w + wsp, h + hsp));
sceneUpper->render(&painter, QRect(ax, ay, w, h));
sceneVoice->render(&painter, QRect(ax, ay, w, h));
@ -1957,32 +1959,35 @@ void nesca_3::slotSaveImage(QAction *qwe)
tr("Save image"),
QDir::currentPath() + "/" + fn,
".png",
(QString *)"*.png"
(QString*)&tr("*.png")
);
if(filename != "") image.save(filename + ".png");
if (filename != "") pixmap.save(filename);
}
else
{
QString fn = QString::number(QD.day()) + "." + QString::number(QD.month()) + "." + QString::number(QD.year()) + "-h" + QString::number(QT.hour()) + ".m" + QString::number(QT.minute()) + "_" + (PieStatFlag ? "PieStat" : "QOS") + "_"+ (ci == 0 ? ui->lineEditStartIPDNS->text() : ui->ipLine->text()) + ".png";
QImage image(ui->graphicLog->width(), ui->graphicLog->height(), QImage::Format_ARGB32_Premultiplied);
QPainter painter(&image);
image.fill(NULL);
image.fill(QColor(0,0,0));
QString fn = QString::number(QT.msec()) + "_" + (PieStatFlag ? "PieStat" : "QOS") + "_" + (ci == 0 ? ui->ipLine->text() : ui->lineEditStartIPDNS->text()) + ".png";
QPixmap pixmap(ui->graphicLog->width(), ui->graphicLog->height());
QPainter painter(&pixmap);
pixmap.fill(Qt::black);
sceneGrid->render(&painter);
sceneGrid2->render(&painter);
sceneGrid2->render(&painter);
sceneUpper->render(&painter);
sceneVoice->render(&painter);
sceneGraph->render(&painter);
sceneGrid->render(&painter);
sceneGrid2->render(&painter);
painter.end();
QString filename = QFileDialog::getSaveFileName(
this,
tr("Save image"),
QDir::currentPath() + "/" + fn,
".png",
(QString *)"*.png"
(QString*)&tr("*.png")
);
if(filename != "") image.save(filename + ".png");
if (filename != "") pixmap.save(filename);
};
};
}

View File

@ -1228,7 +1228,7 @@ border-radius: 3px;</string>
<string notr="true">color: rgb(216, 216, 216); background-color: rgba(2, 2, 2, 0);</string>
</property>
<property name="text">
<string>ms</string>
<string>sec</string>
</property>
</widget>
<widget class="QLineEdit" name="threadDelayBox">