Page 1/2 of code that uses scripts and batch processing to clear traces on your computer

Source: Internet
Author: User

I. Possible leak points and locations

In Windows, there are two possible secrets: one is in a folder and the other is in the registry.

1. folder: the files we browsed are displayed in the "documents" in the "Start" menu. If they are exposed, the secrets will not be kept and should be deleted. The content in the document is placed in the c: \ windows \ recent folder; installProgramTemporary files generated during file editing are stored in the c: \ windows \ Temp folder. files are not deleted and saved in the recycle bin, items in the recycle bin are stored in the C: \ recycled folder (implicitly). When you browse the website online, Windows will go to c: \ windows \ history and C: in the \ windows \ Temporary Internet Files folder, save the web pages you have viewed. Inadvertently, Microsoft will also give you some cookies from the Internet, which are placed in c: \ windows \ cookies.

2. In the Registry: the address of the website that has been entered in the address bar of IE browser and the "Real Name of the network" that was born later ".

In fact, the Windows registry itself is a big junk warehouse with garbage in it. You can find it when you are free. This article only points out the first and second places, aiming to guide you through the analogy and know how to clear the places in the registry that may cause us to leak data.

We know that using a Windows operating system can cause personal secrets to leak when you open files, enter various passwords, or chat with friends via QQ. For the sake of security, if you are on a public computer, you should erase the traces behind these operations when you leave. Below are possible leaks and solutions.

In fact, the Windows registry itself is a big junk warehouse with garbage in it. You can find it when you are free. This article only points out the first and second places, aiming to guide you through the analogy and know how to clear the places in the registry that may cause us to leak data.

Ii. Example

This function uses two files: The vbs script file Reg. vbs (you can customize the file name) and the batch file Reg. BAT (you can customize the file name ).

1. The vbs script file is as follows:

Dim wshshell

Set wshshell = wscript. Createobject ("wscript. Shell ")

Wshshell. regwrite "HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ Run \ Reg", "Reg. vbs"

Wshshell. regwrite "HKLM \ Software \ Microsoft \ Windows \ CurrentVersion \ runonce \ deldel", "Reg. Bat"

Wshshell. regwrite "hkcu \ Software \ Microsoft \ Internet Explorer \ main \ Start page", "about: blank"

Wshshell. regwrite "hkcu \ Software \ Microsoft \ Internet Explorer \ typedurls \",""

Wshshell. regdelete "hkcu \ Software \ Microsoft \ Internet Explorer \ typedurls \"

Wshshell. regwrite "hkcu \ Software \ Microsoft \ Internet Explorer \ typedurls \",""

Wshshell. regwrite "hkcu \ Software \ 3721 \ inputcns \",""

Wshshell. regdelete "hkcu \ Software \ 3721 \ inputcns \"

Wshshell. regwrite "hkcu \ Software \ 3721 \ inputcns \",""

The first two behaviors of this script define variables. Please write them as follows. Starting from the third line, it is the processing of the Registry. Rows 3 and 4 Add a process file automatically run when the computer is started in the registry. One is that the script itself is Reg. vbs, and the other is the reg. bat batch file. The fifth act restores the IE start page to "about: blank"; the sixth, seventh, and eighth actions clear the web address names that have been browsed in the address bar of the IE browser; actions 9, 10, and 11 Clear the real name of the network in the IE Address Bar.

Here, you must master the following points:

1) Here we use the vbs script language, VBScriptCodeIt is interpreted and executed locally through Windows Script Host. The execution of vbs is inseparable from Windows Script Host (wsh). wsh is a language-independent script interpretation mechanism provided by Microsoft Based on the 32-bit Windows platform, it enables the script to run directly on a Windows desktop or command prompt. Wsh allows you to manipulate wsh objects, ActiveX objects, registries, and file systems. In Windows, wsh can also be used to access the Windows NT Active Directory Service. Wsh depends on the Visual BASIC script and JScript engine provided by ie3.0 and later versions. Therefore, wsh can be installed only after ie3.0 and later versions are installed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.