Hầu hết chúng ta đã quen thuộc với các loại virus sử dụng để chặn các trang web Orkut và Youtube. Nếu bạn tò mò về việc tạo ra một loại virus như trên của riêng bạn, ở đây là làm thế nào nó có thể được thực hiện. Như thường lệ tôi đang sử dụng ngôn ngữ lập trình yêu thích của tôi 'C' để tạo ra trang web này chặn virus. Tôi sẽ cho một giới thiệu ngắn gọn về virus này trước khi tôi nhảy vào thuật ngữ kỹ thuật. Virus này đã được độc quyền tạo ra trong 'C'. Vì vậy, bất cứ ai có một kiến thức cơ bản của 'C' sẽ có thể hiểu được sự làm việc của virus này. Khi chương trình này được thực hiện, nó sẽ chặn tất cả những trang web được liệt kê trong các mã nguồn. Trong ví dụ sau đây, các trang web được liệt kê trong các mã nguồn là Google, Yahoo và Youtube. Khi bạn tải về mã nguồn của chương trình này, bạn có một sự lựa chọn để bao gồm danh sách của riêng bạn của trang web mà bạn muốn loại virus này để chặn. Tôi đã chỉ cần loại bỏ các mã nguồn của chương trình này từ bài này vì nó là lâu dài và làm cho bài nhìn lộn xộn. Bạn vẫn có thể tải về mã nguồn của chương trình virus này từ liên kết sau đây: Download Block_Site.rar ? Làm thế nào Chương trình Virus Làm việc Các hệ điều hành Windows có một tập tin gọi là HOSTS đặc biệt mà có thể được sử dụng để ngăn chặn bất kỳ tên máy hoặc tên miền (trang web nhất định ) bằng cách thêm các mục mới vào nó. Chương trình này hoạt động bằng cách thay đổi các tập tin HOSTS bằng cách thêm mục mới của các trang web được dự định sẽ được chặn. Các tập tin HOSTS được đặt tại: % windir% system32 drivers etc (Thông thường: C: windows system32 drivers etc) Vì vậy, khi bạn thực hiện chương trình này, tất cả nó là thêm các mục của danh mục các trang web (đã đề cập trong mã nguồn) đối với file HOSTS này. Một khi điều này được thực hiện, các trang web sẽ bị chặn từ máy tính của bạn. Vì vậy, không ai trong số các trình duyệt sẽ có thể tải các trang web trên máy tính của bạn. Để biết thêm thông tin về tập tin HOSTS, tôi khuyên bạn nên đọc bài khác của tôi trên Làm thế nào để sử dụng tập tin máy chủ để chặn các trang web. Bây giờ, như xa như các phần kỹ thuật này chương trình có liên quan, những người có một kiến thức làm việc của 'C' nên có thể dễ dàng hiểu được cách làm việc của virus này. Tuy nhiên, đối với những người mới làm quen với lập trình 'C', đây là thuật toán của chương trình này: • Xác định các ổ đĩa gốc. . tức là: Tìm ổ đĩa (C :, D :, E: hoặc F :) mà Windows được cài đặt • Điều hướng đến:% windir% -> system32 -> điều khiển -> vv • Mở / Tải file HOSTS. • sao chép một danh sách của những trang web được đề cập trong các ARRAY đến END của tập tin. • Lưu file và Exit. Làm thế nào để biên dịch các mã nguồn? Đối với một hướng dẫn biên soạn từng bước, tham khảo bài viết của tôi: Làm thế nào để biên dịch Chương trình C? thử nghiệm Virus: kiểm tra 1.To, chạy các mô-đun được biên dịch. Nó sẽ chặn các trang web được liệt kê trong mã nguồn. 2.Once bạn chạy file block_Site.exe, khởi động lại chương trình trình duyệt của bạn. Sau đó, gõ URL của trang web bị chặn và bạn sẽ thấy trình duyệt hiển thị lỗi "Trang không thể hiển thị". 3.To gỡ bỏ virus gõ lệnh sau trong Run. % Windir% system32 drivers etc 4.There , mở tập tin có tên "hosts" bằng notepad. Ở dưới cùng của tập tin mở, bạn sẽ thấy một cái gì đó như thế này: 127.0.0.1 google.com 5.Delete tất cả entry như vậy có chứa tên của các trang web bị chặn. NOTE: Bạn cũng có thể thay đổi ICON của virus để làm cho nó trông giống như một chương trình hợp pháp. Phương pháp này được mô tả trong bài viết: Làm thế nào để thay đổi ICON của một tập tin EXE?
đang được dịch, vui lòng đợi..