This commit is contained in:
cora32 2015-03-23 20:11:00 +03:00
parent 2cbae2ce6d
commit 517484797c
8 changed files with 15 additions and 21 deletions

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
#include "Connector.h" #include "Connector.h"
#include "SSHAuth.h"
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
int _pingMyTarget(const char *ip) int _pingMyTarget(const char *ip)
@ -227,7 +228,7 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
return buffer->size(); return buffer->size();
} }
int Connector::_ConnectToPort(string ip, int port, char *hl) int Connector::_ConnectToPort(std::string ip, int port, char *hl)
{ {
if(gPingNScan) if(gPingNScan)
{ {

View File

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

View File

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

View File

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

View File

@ -751,7 +751,7 @@ std::string toLowerStr(const char *str)
} }
void _connect() { void _connect() {
string ip = ""; std::string ip = "";
while (globalScanFlag) { while (globalScanFlag) {
std::unique_lock<std::mutex> lk(Threader::m); std::unique_lock<std::mutex> lk(Threader::m);
Threader::cv.wait(lk, []{return Threader::ready; }); Threader::cv.wait(lk, []{return Threader::ready; });
@ -2065,7 +2065,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
if(!globalScanFlag) return 0; if(!globalScanFlag) return 0;
verboseProgressDNS(--gTargets, mask, top_level_domain, saveMask); 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; ++indexIP;
@ -2193,7 +2193,7 @@ int startScan(char* args) {
++indexIP; ++indexIP;
tAddr.s_addr = ntohl(i); tAddr.s_addr = ntohl(i);
res = string(inet_ntoa(tAddr)); res = std::string(inet_ntoa(tAddr));
verboseProgress(gTargets--, res.c_str()); verboseProgress(gTargets--, res.c_str());
Threader::fireThread(res, (void*(*)(void))_connect); Threader::fireThread(res, (void*(*)(void))_connect);
@ -2398,7 +2398,7 @@ int startScan(char* args) {
++indexIP; ++indexIP;
tAddr.s_addr = ntohl(i); 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()); verboseProgress(gTargets--, res.c_str());
Threader::fireThread(res, (void*(*)(void))_connect); Threader::fireThread(res, (void*(*)(void))_connect);
} }