📄 ychatu2.pas
字号:
unit YchatU2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, SkinCtrls, SkinBoxCtrls,
Mask, Menus, SkinMenus, DynamicSkinForm;
type
TForm2 = class(TForm)
Label1: TspSkinLabel;
Label2: TspSkinLabel;
CheckBox1: TspSkinCheckRadioBox;
Label3: TspSkinLabel;
BitBtn1: TspSkinButton;
BitBtn3: TspSkinButton;
CheckBox2: TspSkinCheckRadioBox;
CheckBox3: TspSkinCheckRadioBox;
Label9: TspSkinLabel;
RadioButton1: TspSkinCheckRadioBox;
Label4: TspSkinLabel;
ComboBox1: TspSkinComboBox;
Edit1: TspSkinPasswordEdit;
spDynamicSkinForm1: TspDynamicSkinForm;
spSkinPopupMenu1: TspSkinPopupMenu;
ClearList1: TMenuItem;
RadioButton4: TspSkinCheckRadioBox;
RadioPort80CheckBox: TspSkinCheckRadioBox;
StoreUsername: TspSkinCheckRadioBox;
MM: TspSkinCheckRadioBox;
RoomBox: TspSkinComboBox;
RoomButton: TspSkinButton;
AutoCaptcha: TspSkinCheckRadioBox;
spSkinLabel1: TspSkinLabel;
procedure BitBtn3Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure RadioButton3Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ClearList1Click(Sender: TObject);
procedure RadioButton4MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure spSkinButton1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure RoomButtonClick(Sender: TObject);
procedure ComboBox1CloseUp(Sender: TObject);
private
{ Private declarations }
public
SDown: Boolean;
procedure ProxyYMSGConnect;
procedure ProxySPRTConnect;
{ Public declarations }
end;
var
Form2: TForm2;
Const
ValidURLChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$-_@.&+-!*"''(),;/#?:';
// ProxyConnectStr = 'CONNECT %s HTTP/1.0'+#$0d+#$0a+'Host: %s'+#$0D#$0A#$0D#$0A;
implementation
uses YchatU1, YchatU10, YchatU41, ShoutBoxLogin, YchatU22, YchatU8, YchatU7;
{$R *.dfm}
function LowerCaseRep(const s: string): string;
asm
push ebx
push esi
push edi
mov esi, eax // s
mov eax, edx
test esi, esi
jz @nil
mov edx, [esi-4] // Length(s)
mov edi, eax // @Result
test edx, edx
jle @nil
mov ebx, edx
test edx, 3
jz @LengthOk // Jump if Length mod 4 = 0
or edx, 3 // Else requre Length mod 4 = 3
@LengthOk:
call System.@LStrSetLength
mov edi, [edi] // Result
mov [edi-4], ebx // Correct Result length
add ebx, -1
and ebx, -4
mov eax, [ebx+esi]
@Loop: mov ecx, eax
or eax, $80808080 // $C1..$DA
mov edx, eax
sub eax, $5B5B5B5B // $66..$7F
xor edx, ecx // $80
or eax, $80808080 // $E6..$FF
sub eax, $66666666 // $80..$99
and eax, edx // $80
shr eax, 2 // $20
xor eax, ecx // Lower
mov [ebx+edi], eax
mov eax, [ebx+esi-4]
sub ebx, 4
jge @Loop
pop edi
pop esi
pop ebx
ret
@Nil: pop edi
pop esi
pop ebx
jmp System.@LStrClr // Result:=''
end;
Procedure Tform2.ProxyYMSGConnect;
Var
YPort: Integer;
YHost: String;
Begin
// Form1.Ymsg.Port:=80;
YPort:=Form1.Ymsg.port;
YHost:=Form1.Ymsg.Host;
ProxyString:=Format(ProxyConnectStr,[YHost,YPort,YHost]);
// ProxyString:=Format(ProxyConnectStr,[YHost,YHost]);
Form1.Ymsg.Port:=StrToInt(Form10.Edit4.Text);
Form1.Ymsg.Host:=Form10.Edit3.Text;
Form1.Ymsg.Active:=True;
LoginStage:=0;
End;
Procedure Tform2.ProxySPRTConnect;
Var
YPort: Integer;
YHost: String;
Begin
// Form1.Ymsg.Port:=80;
YPort:=Form1.SPRT.port;
YHost:=Form1.SPRT.Host;
ProxyString:=Format(ProxyConnectStr,[YHost,YPort,YHost]);
// ProxyString:=Format(ProxyConnectStr,[YHost,YHost]);
Form1.SPRT.Port:=StrToInt(Form10.Edit4.Text);
Form1.SPRT.Host:=Form10.Edit3.Text;
Form1.SPRT.Active:=True;
LoginStage:=0;
End;
procedure TForm2.BitBtn3Click(Sender: TObject);
Var
N,RndServ: Integer;
CustID: String;
begin
If Form10.Advanced.Checked=False Then
GVN:=#$0F
else
GVN:=Chr(StrToInt(Form10.Edit9.Text));
Form22.Edit6.Text:='$'+IntToHex(Ord(GVN),2);
If Pos('::',RoomBox.Text)=0 Then
Begin
ShowMessage('Please select a valid room to Enter');
Form7.Show;
Exit;
End;
IF Pos('::',RoomBox.Text)>0 Then
If Form2.RoomBox.Items.IndexOf(RoomBox.Text)=-1 Then
Form2.RoomBox.Items.Add(RoomBox.Text);
ChatBuffer:='';
LogInStage:=1;
If Form2.MM.checked=False Then
Form1.Caption:='Y!mLite - '+ComboBox1.Text+' Now Entering: '+RoomBox.Text+'....';
LoggedInName:=ComboBox1.Text;
LoggedInName2:=ComboBox1.Text;
RoomName:=RoomBox.Text;
Form1.LastJoinRoom:=RoomName;
LoggedInPassword:=Edit1.Text;
LoggedInName:=LowerCase(LoggedInName);
Form37.Edit1.Text:=LoggedInName;
Form37.Edit2.Text:=LoggedinPassword;
Form37.Edit3.Text:='';
If RadioButton1.Checked=True Then
Form1.ConnectToYahooYMSG(LoggedInName,RoomName,LoggedinPassword);
If RadioButton4.Checked=True Then
Form1.ConnectToSPRT(LoggedInName,RoomName,LoggedinPassword,Cookie);
Close;
end;
procedure TForm2.BitBtn1Click(Sender: TObject);
begin
Close;
end;
Function IsItemIn(Str: String): Integer;
Var
N: Integer;
Begin
Result:=-1;
For N:=Form2.ComboBox1.Items.Count-1 downto 0 do
Begin
If Form2.ComboBox1.Items[N]=Str Then
Result:=N;
End;
End;
procedure TForm2.Button1Click(Sender: TObject);
begin
LoggedInName:=ComboBox1.Text;
RoomName:=RoomBox.Text;
LoggedInPassword:=Edit1.Text;
Form37.Edit1.Text:=LoggedInName;
Form37.Edit2.Text:=LoggedinPassword;
Form37.Edit3.Text:='';
Form1.CreateSkin(Form37);
Form37.ShowModal;
end;
procedure TForm2.RadioButton3Click(Sender: TObject);
begin
BitBtn3.Enabled:=True;
end;
procedure TForm2.RadioButton2Click(Sender: TObject);
begin
BitBtn3.Enabled:=True;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
If FileExists(Path+'ymsg.dll') Then
RadioButton1.Enabled:=True
else
Begin
If MessageDlg('YMSG Authentication DLL not Found, Would you like to download it now?',MtConfirmation,[mbyes,mbno],0)=IdYes Then
TFileDownload.Create('http://ymlitechat.com/ymlite/ymsg.dll','','80',0,Nil,False,True,True,False);
End;
end;
procedure TForm2.ClearList1Click(Sender: TObject);
begin
RoomBox.Items.Clear;
end;
procedure TForm2.RadioButton4MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
If Button = MbRight Then
IpAddress:='127.0.0.1';
end;
procedure TForm2.spSkinButton1Click(Sender: TObject);
begin
Form1.ShellExecute(handle,'open',Pchar('http://wap.oa.yahoo.com/raw?dp=page&pg=sign_in&src=msgr'),'','',0);
Form1.ReleaseMemory;
end;
procedure TForm2.FormShow(Sender: TObject);
begin
BitBtn3.SetFocus;
end;
procedure TForm2.RoomButtonClick(Sender: TObject);
begin
Form8.Show;
end;
procedure TForm2.ComboBox1CloseUp(Sender: TObject);
begin
Form1.OldCaptchaKey:='';
Form1.CaptchaImageStr:='';
Form2.AutoCaptcha.Checked:=False;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -