Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FolderPath "C:\\Program Files\\InstantSkillz"
- #define LogPath "C:\\Program Files\\InstantSkillz\\Info.txt"
- using namespace std;
- char szSerial[256];
- char szUserName[256];
- char szPassword[256];
- DWORD dwSerialNum;
- ofstream ofile;
- void __cdecl add_log (char *file, const char *fmt, ...)
- {
- ofile.open( file , ios::app);
- if( fmt == NULL )
- return;
- if(ofile != NULL)
- {
- va_list va_alist;
- char logbuf[256] = {0};
- va_start (va_alist, fmt);
- vsnprintf(logbuf + strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
- va_end (va_alist);
- ofile << logbuf << endl;
- }
- if(ofile)
- ofile.close();
- }
- BOOL FolderExists(char *strFolderName)
- {
- return GetFileAttributes(strFolderName) != INVALID_FILE_ATTRIBUTES;
- }
- char *GetSerialNumber(void)
- {
- DWORD Serial = GetVolumeInformationA("C:\\", 0, 0, &dwSerialNum, 0, 0, 0, 0);
- if( Serial != NULL )
- {
- sprintf(szSerial, "%d", dwSerialNum );
- cout << "Serial Sucessfully Gotten." << endl;
- }
- else
- {
- cout << "Failed To Get Serial!" << endl
- << "Program Closing" << endl;
- ExitProcess(0);
- }
- return szSerial;
- }
- int main(void)
- {
- //CIN USERNAME
- //CIN PASSWORD
- //SEND TO PHP
- //GET ECKO BACK IF THEY ARE VIP
- //IF VIP CREATE DIRECTORY WITH USER PASS AND GUID
- //COPY GUID TO CLIPBOARD
- if( FolderExists(FolderPath) )
- {
- cout << "Directory Found Logging Guid" << endl;
- Sleep(100);
- add_log(LogPath, GetSerialNumber());
- cout << "Guid Logged Sucessfully" << endl;
- Sleep(100);
- }
- else
- {
- cout << "Directory Not Found Creating Directory" << endl;
- Sleep(100);
- CreateDirectory(FolderPath, NULL);
- cout << "Directory Created Sucessfully" << endl;
- Sleep(100);
- add_log(LogPath, GetSerialNumber());
- cout << "Guid Logged Sucessfully" << endl;
- Sleep(100);
- }
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment