This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4b26d7d
Showing
7 changed files
with
1,140 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# урокцифры.фсб | ||
Генерация сертификатов урокцифры.рф | ||
|
||
![Screenshot](https://i.ibb.co/rpY00HJ/screen.png) | ||
|
||
Генерирует сертификат без необходимости прохождения урока/теста. | ||
Все поля кроме "Мыло" могут быть заполнены любыми данными. | ||
Чтобы не палить своё мыло, можно указать временное, | ||
например, с сайта [10minutemail.net](https://10minutemail.net/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
object fMain: TfMain | ||
Left = 0 | ||
Top = 0 | ||
BorderIcons = [biSystemMenu] | ||
BorderStyle = bsSingle | ||
Caption = #1091#1088#1086#1082#1094#1080#1092#1088#1099'.'#1092#1089#1073 | ||
ClientHeight = 250 | ||
ClientWidth = 225 | ||
Color = clBtnFace | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -11 | ||
Font.Name = 'Tahoma' | ||
Font.Style = [] | ||
OldCreateOrder = False | ||
Position = poDesktopCenter | ||
PixelsPerInch = 96 | ||
TextHeight = 13 | ||
object Label1: TLabel | ||
Left = 9 | ||
Top = 124 | ||
Width = 40 | ||
Height = 13 | ||
Alignment = taRightJustify | ||
AutoSize = False | ||
Caption = #1046#1077#1088#1090#1074#1072 | ||
end | ||
object Label2: TLabel | ||
Left = 9 | ||
Top = 97 | ||
Width = 40 | ||
Height = 13 | ||
Alignment = taRightJustify | ||
AutoSize = False | ||
Caption = #1050#1083#1072#1089#1089 | ||
end | ||
object Label3: TLabel | ||
Left = 9 | ||
Top = 148 | ||
Width = 40 | ||
Height = 13 | ||
Alignment = taRightJustify | ||
AutoSize = False | ||
Caption = #1055#1086#1083 | ||
end | ||
object Получить: TButton | ||
Left = 7 | ||
Top = 221 | ||
Width = 210 | ||
Height = 25 | ||
Caption = #1055#1086#1083#1091#1095#1080#1090#1100' '#1089#1077#1088#1090#1080#1092#1080#1082#1072#1090' '#1085#1072' '#1084#1099#1083#1086 | ||
Default = True | ||
TabOrder = 0 | ||
OnClick = ПолучитьClick | ||
end | ||
object Регион: TLabeledEdit | ||
Left = 56 | ||
Top = 8 | ||
Width = 161 | ||
Height = 21 | ||
EditLabel.Width = 35 | ||
EditLabel.Height = 13 | ||
EditLabel.Caption = #1056#1077#1075#1080#1086#1085 | ||
LabelPosition = lpLeft | ||
TabOrder = 1 | ||
end | ||
object Город: TLabeledEdit | ||
Left = 56 | ||
Top = 35 | ||
Width = 161 | ||
Height = 21 | ||
EditLabel.Width = 31 | ||
EditLabel.Height = 13 | ||
EditLabel.Caption = #1043#1086#1088#1086#1076 | ||
LabelPosition = lpLeft | ||
TabOrder = 2 | ||
end | ||
object Имя: TLabeledEdit | ||
Left = 55 | ||
Top = 167 | ||
Width = 162 | ||
Height = 21 | ||
EditLabel.Width = 19 | ||
EditLabel.Height = 13 | ||
EditLabel.Caption = #1048#1084#1103 | ||
LabelPosition = lpLeft | ||
TabOrder = 3 | ||
end | ||
object Мыло: TLabeledEdit | ||
Left = 55 | ||
Top = 194 | ||
Width = 162 | ||
Height = 21 | ||
EditLabel.Width = 28 | ||
EditLabel.Height = 13 | ||
EditLabel.Caption = #1052#1099#1083#1086 | ||
LabelPosition = lpLeft | ||
TabOrder = 4 | ||
end | ||
object Жертва: TComboBox | ||
Left = 55 | ||
Top = 116 | ||
Width = 162 | ||
Height = 21 | ||
Style = csDropDownList | ||
ItemIndex = 2 | ||
TabOrder = 5 | ||
Text = #1056#1086#1076#1080#1090#1077#1083#1100 | ||
Items.Strings = ( | ||
#1059#1095#1077#1085#1080#1082 | ||
#1059#1095#1080#1090#1077#1083#1100 | ||
#1056#1086#1076#1080#1090#1077#1083#1100) | ||
end | ||
object Класс: TComboBox | ||
Left = 55 | ||
Top = 89 | ||
Width = 162 | ||
Height = 21 | ||
Style = csDropDownList | ||
ItemIndex = 2 | ||
TabOrder = 6 | ||
Text = '8-11' | ||
Items.Strings = ( | ||
'1-4' | ||
'5-7' | ||
'8-11') | ||
end | ||
object Школа: TLabeledEdit | ||
Left = 55 | ||
Top = 62 | ||
Width = 162 | ||
Height = 21 | ||
EditLabel.Width = 34 | ||
EditLabel.Height = 13 | ||
EditLabel.Caption = #1064#1082#1086#1083#1072 | ||
LabelPosition = lpLeft | ||
TabOrder = 7 | ||
end | ||
object Пол: TComboBox | ||
Left = 55 | ||
Top = 140 | ||
Width = 162 | ||
Height = 21 | ||
Style = csDropDownList | ||
ItemIndex = 0 | ||
TabOrder = 8 | ||
Text = #1052#1091#1078#1089#1082#1086#1081 | ||
Items.Strings = ( | ||
#1052#1091#1078#1089#1082#1086#1081 | ||
#1046#1077#1085#1089#1082#1080#1081) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
unit uMain; | ||
|
||
interface | ||
|
||
uses | ||
Winapi.Windows, System.SysUtils, System.RegularExpressions, System.StrUtils, | ||
System.Classes, Vcl.Controls, Vcl.Forms, System.Net.HttpClient, Vcl.StdCtrls, | ||
Vcl.ExtCtrls; | ||
|
||
type | ||
TfMain = class(TForm) | ||
Получить: TButton; | ||
Регион: TLabeledEdit; | ||
Город: TLabeledEdit; | ||
Имя: TLabeledEdit; | ||
Мыло: TLabeledEdit; | ||
Жертва: TComboBox; | ||
Label1: TLabel; | ||
Класс: TComboBox; | ||
Label2: TLabel; | ||
Школа: TLabeledEdit; | ||
Label3: TLabel; | ||
Пол: TComboBox; | ||
procedure ПолучитьClick(Sender: TObject); | ||
end; | ||
|
||
var | ||
fMain: TfMain; | ||
|
||
implementation | ||
|
||
{$R *.dfm} | ||
|
||
function RandStr: string; | ||
var | ||
i: Byte; | ||
begin | ||
SetLength(Result, Succ(Random(10))); | ||
for i := 1 to Length(Result) do | ||
repeat | ||
Result[i] := Chr(Random(256)); | ||
until CharInSet(Result[i], ['А'..'Я', 'а'..'я', 'Ё', 'ё']); | ||
end; | ||
|
||
procedure TfMain.ПолучитьClick(Sender: TObject); | ||
|
||
function Дисциплины: string; | ||
var | ||
i: Integer; | ||
begin | ||
Result := EmptyStr; | ||
i := Random(4); | ||
repeat | ||
Result := Result + '"' + RandStr + '",'; | ||
Dec(i); | ||
until i = 0; | ||
Delete(Result, Result.Length, 1); | ||
end; | ||
|
||
const | ||
ЖЕРТВЫ: array[0..2] of string = ('student', 'teacher', 'parent'); | ||
var | ||
SS: TStringStream; | ||
begin | ||
SS := TStringStream.Create(Format('{"age_group":%d,"type":"%s","region":"%s","state":"%s"' | ||
+ ',"vk_id":%s,"class_no":%d,"school":"%s","discipline":[%s],"children_ages":[%s],"student_info":[{"age":%s,"sex":"%s"}]}', | ||
[Succ(Класс.ItemIndex), ЖЕРТВЫ[Жертва.ItemIndex], Trim(Регион.Text), | ||
Trim(Город.Text), Random(MaxInt).toString, Succ(Random(11)), Trim(Школа.Text), Дисциплины, | ||
(7 + Random(11)).toString, (18 + Random(50)).toString, | ||
IfThen(Пол.ItemIndex = 0, 'male', 'female')]), TEncoding.UTF8); | ||
try | ||
with THTTPClient.Create do | ||
try | ||
ContentType := 'application/json; charset=utf-8'; | ||
UserAgent := 'Mozilla/5.0 Mail.Ru Отъебись!!!'; | ||
try | ||
with Post('https://form.datalesson.ru/api/v1/auth', SS) do | ||
begin | ||
with TRegEx.Match(ContentAsString(), 'user_id\"\:\"([^\"]+)') do | ||
if Success then | ||
begin | ||
SS.Clear; | ||
SS.WriteString(Format('{"name":"%s","email":"%s"}', [Trim(Имя.Text), | ||
Trim(Мыло.Text)])); | ||
SS.Position := 0; | ||
with Post(Format('https://form.datalesson.ru/api/v1/certificates/student/%s/send', | ||
[Groups[1].Value]), SS) do | ||
begin | ||
if ContentAsString().Equals('{"data":{}}') then | ||
Application.MessageBox(PChar(Format('СертиФикат выслан на почту "%s"', | ||
[Trim(Мыло.Text)])), 'Готово', MB_ICONINFORMATION) | ||
else | ||
Application.MessageBox(PChar('Не сожрал:'#13#10 + | ||
ContentAsString(TEncoding.UTF8)), 'Ошибка', MB_ICONERROR); | ||
end; | ||
end | ||
else | ||
Application.MessageBox(PChar('Не сожрал:'#13#10 + ContentAsString(TEncoding.UTF8)), | ||
'Ошибка', MB_ICONERROR); | ||
end; | ||
except | ||
raise Exception.Create('Ошибка отправки'); | ||
end; | ||
finally | ||
Free; | ||
end; | ||
finally | ||
FreeAndNil(SS); | ||
end; | ||
end; | ||
|
||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program óðîêöèôðû.ôñá; | ||
|
||
uses | ||
Vcl.Forms, | ||
uMain in 'uMain.pas' {fMain}; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.MainFormOnTaskbar := True; | ||
Application.CreateForm(TfMain, fMain); | ||
Application.Run; | ||
end. |
Oops, something went wrong.