From 69d73e076adab0abb175d7fb858833c250949a0a Mon Sep 17 00:00:00 2001 From: cora32 Date: Mon, 23 Mar 2015 20:11:00 +0300 Subject: [PATCH] -- --- BasicAuth.h | 3 +-- BruteUtils.h | 2 ++ CheckKey_Th.h | 2 +- Connector.cpp | 3 ++- Connector.h | 12 +++--------- FTPAuth.h | 3 +-- SSHAuth.h | 3 +-- nesca_startModule.cpp | 8 ++++---- 8 files changed, 15 insertions(+), 21 deletions(-) diff --git a/BasicAuth.h b/BasicAuth.h index b10eaa5..e78e747 100644 --- a/BasicAuth.h +++ b/BasicAuth.h @@ -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" diff --git a/BruteUtils.h b/BruteUtils.h index 1580076..56c810c 100644 --- a/BruteUtils.h +++ b/BruteUtils.h @@ -1,6 +1,8 @@ #ifndef BRUTEUTILS_H #define BRUTEUTILS_H +#include "externData.h" + class BruteUtils { public: diff --git a/CheckKey_Th.h b/CheckKey_Th.h index d150d4a..e7fe606 100644 --- a/CheckKey_Th.h +++ b/CheckKey_Th.h @@ -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 { diff --git a/Connector.cpp b/Connector.cpp index 465a79c..9547b65 100644 --- a/Connector.cpp +++ b/Connector.cpp @@ -1,4 +1,5 @@ #include "Connector.h" +#include "SSHAuth.h" #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) int _pingMyTarget(const char *ip) @@ -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) { diff --git a/Connector.h b/Connector.h index 2ea66fd..2be5089 100644 --- a/Connector.h +++ b/Connector.h @@ -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 @@ -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 *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 diff --git a/FTPAuth.h b/FTPAuth.h index f35e7d0..9b97b98 100644 --- a/FTPAuth.h +++ b/FTPAuth.h @@ -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" diff --git a/SSHAuth.h b/SSHAuth.h index e454a24..b069ea1 100644 --- a/SSHAuth.h +++ b/SSHAuth.h @@ -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" diff --git a/nesca_startModule.cpp b/nesca_startModule.cpp index 7009697..5c9b749 100644 --- a/nesca_startModule.cpp +++ b/nesca_startModule.cpp @@ -751,7 +751,7 @@ std::string toLowerStr(const char *str) } void _connect() { - string ip = ""; + std::string ip = ""; while (globalScanFlag) { std::unique_lock lk(Threader::m); Threader::cv.wait(lk, []{return Threader::ready; }); @@ -2065,7 +2065,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 +2193,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 +2398,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); }