// Vnc Connector.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "windows.h" #include #include using namespace std; HANDLE File; char Buf[128]; char lpbuffer[128]; DWORD dwRead; int found = 0; int spaces = 0; int j = 0; int k = 0; void check(); void Makeip(); char result[15]; //: 219.128.254.40 - int _tmain(int argc, _TCHAR* argv[]) { Buf[127] = '\0'; File = CreateFile("part1.txt",GENERIC_READ, 0, NULL ,OPEN_ALWAYS , FILE_ATTRIBUTE_NORMAL , NULL); s: ReadFile(File , Buf , sizeof(Buf), &dwRead , NULL); // cout << Buf; Sleep(50); for(int i = 0; i < strlen(Buf); i++) { if(Buf[i] == ':') { found++; if(found == 2) { for(int j = 2; j < 15; j++) { if(Buf[i+j] == '-' || Buf[i+j] == 'V') { break; } else { // cout << Buf[i+j]; sprintf(&result[k++] , "%c", Buf[i+j]); } } } } } cout << result <