打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
制作自己的QQ登陆器的关键代码
userphoto

2011.12.07

关注

都说QQ登陆器可以防止QQ密码被盗,网上下的,担心有后门,这里自己写个QQ登陆器,关键代码如下:

// Base64加密

function Base64(Src: string): string;
const
   DataSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
var
   i, ModLen: integer;
   Current: string;
   Buf: array[1..3] of Byte;
   NewBuf: array[1..4] of Byte;
begin
   result := '';
   if Src = '' then
      exit;
   ModLen := Length(Src) mod 3;
   while Length(Src) > 0 do
   begin
      FillChar(Buf, 3, #0);
      Current := Copy(Src, 1, 3);
      Src := Copy(Src, 4, Length(Src) - 3);
      for i := 1 to 3 do
         Buf[i] := Ord(Current[i]);
      NewBuf[1] := Buf[1] shr 2;
      NewBuf[2] := (Buf[1] shl 6 shr 2 or Buf[2] shr 4) and $3F;
      NewBuf[3] := (Buf[2] shl 4 shr 2 or Buf[3] shr 6) and $3F;
      NewBuf[4] := Buf[3] and $3F;
      for i := 1 to 4 do
         result := result + DataSet[NewBuf[i] + 1];
   end;
   if ModLen >= 1 then
      result[Length(result)] := '=';
   if ModLen = 1 then
      result[Length(result) - 1] := '=';
end;

//得到加密后的密码

function getmpass(qqpws:string):string  ;
type
  md5x = array[0..15] of char;
var
  md5: TIdHashMessageDigest5;
begin
  md5 := TIdHashMessageDigest5.Create;
  result:=Base64(md5x(md5.HashValue(QQPws))) ;
  md5.Free;
end;

//登陆按钮的单击事件

procedure TForm1.Button1Click(Sender: TObject);
  var qqdl,qqdl1:string;
begin
QQNum:=edit2.text;
QQPw:=getmpass(edit3.Text);
qqdl:= ' /START QQUIN:' + edit2.text + ' PWDHASH:' +QQPw + ' /STAT:41';
qqdl1:= ' /START QQUIN:' + edit2.text + ' PWDHASH:' +QQPw + ' /STAT:40';
if checkbox1.Checked then
 Winexec(pchar(edit1.text+qqdl1),5) else
  Winexec(pchar(edit1.text+qqdl),5)

end;

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
巧妙编程实现QQ安全登录
11种QQ技术?,让你?QQ?高手
深入解析Apache Mina源码(4)——Mina编解码以及对粘包和断包的处理
我写的多线程环形缓冲,没有用锁。大家看看有没有错误和优化的地方? - C/C - Ch...
Mina编程的两个注意点
《UTF-8与GB2312之间的互换》的改进
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服