最通用的自删除代码收藏
<script type="text/javascript">function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
过win 98/2000/xp/2003 (Vista没有测试 因为我没有Vista) #include <windows.h> #pragma once void SelfDel() { int i; HANDLE hFile; DWORD dwWritten; char selfpathaaa[MAX_PATH]={0}; char command[2048]={0}; char name[]="afc9fe2f418b00a0.bat"; GetModuleFileName(NULL,selfpathaaa,MAX_PATH); lstrcpy(command,"@echo off/n/r"); for (i=0;i<10;i++) lstrcat(command,"@echo asdfhdsafjkahlsdjfhlk>>3596799a1543bc9f.aqq/n/r"); lstrcat(command,"@del 3596799a1543bc9f.aqq/n/r"); lstrcat(command,"@del /""); lstrcat(command,selfpathaaa); lstrcat(command,"/"/n/r"); lstrcat(command,"@del "); lstrcat(command,name); lstrcat(command,"/n/r@exit"); hFile=CreateFile(name,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,0,NULL); WriteFile(hFile,(LPCVOID)command,sizeof(command),&dwWritten,NULL); CloseHandle(hFile); WinExec(name,SW_HIDE); ExitProcess(NULL); }