![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-25 23:44 |
47,812 topics / 349,910 posts / today 0 new / 48,264 members |
| DOS批处理 & 脚本技术(批处理室) » Here is the JS program to detect and remove the Jinwei (logo_1.exe) virus: ```javascript // Here is the code to detect and handle the Jinwei (logo_1.exe) virus function detectJinweiVirus() { var fileToCheck = "logo_1.exe"; if (fileExists(fileToCheck)) { // Assume there is a function to remove the virus, here is a placeholder removeVirus(fileToCheck); } } function fileExists(filename) { // Simple check for file existence, actual implementation may vary try { var fso = new ActiveXObject("Scripting.FileSystemObject"); return fso.FileExists(filename); } catch (e) { return false; } } function removeVirus(filename) { try { var fso = new ActiveXObject("Scripting.FileSystemObject"); fso.DeleteFile(filename); } catch (e) { // Handle deletion error } } detectJinweiVirus(); ``` |
| Printable Version 4,725 / 14 |
| Floor1 chainliq | Posted 2006-10-22 11:07 |
| 高级用户 Posts 244 Credits 635 From 广西贵港 | |
|
A few days ago, I got this ghost virus in the internet cafe. I tried all kinds of methods but couldn't clear it. Later, I found such a script file elsewhere. It's very powerful for killing viruses and won't damage the original application!
TaskKill("logo1_.exe"); TaskKill("rundl132.exe"); var window, lstKill, pnlScan, form1 = new Form; form1.Run(); function Form() { var IE = WSH.GetObject("", "InternetExplorer.Application"); IE.ToolBar = 0; IE.StatusBar = 0; IE.Width = 350; IE.Height = 360; IE.Navigate("about:blank"); var document = IE.document; document.body.scroll = "no"; document.body.style.font = "9pt 宋体"; window = document.frames; document.body.charset = "gb2312"; document.bgColor = "menu"; document.body.style.border = 0; document.title = "Logo1_.exe 病毒清除工具"; this.Run = function() { var btnKill = new Button("清除病毒"); var filebox = new FileBox; var grpScan = new Group; var grpKill = new Group("快速清除病毒"); var dirPath = new TextBox; var btnScan = new Button("开始扫描"); pnlScan = new Panel; lstKill = new ListBox; dirPath.value = "D:\\"; grpScan.Text.data = "目录扫描"; pnlScan.Text.data = "准备就绪"; lstKill.style.width = "100%"; lstKill.style.height = "2in"; AddControl(grpKill); grpKill.Add(filebox); grpKill.Add(btnKill); AddControl(grpScan); grpScan.Add(dirPath); grpScan.Add(btnScan); grpScan.Add(pnlScan); grpScan.Add(lstKill); btnKill.onclick = btnKill_Clicked; btnScan.onclick = btnScan_Clicked; IE.Visible = true; try { while(!window.closed) { if(btnScan.disabled) { try { var FSO = new ActiveXObject("Scripting.FileSystemObject"); var Folder = FSO.getFolder(dirPath.value); FolderList(Folder); } catch(err) { window.alert(err.message); } btnScan.disabled = false; window.alert("扫描完成。"); } WSH.Sleep(1000); } } catch(err) {} function btnKill_Clicked() { var FilePath = filebox.value; if(FilePath && Check(FilePath)) { if(window.confirm("发现病毒,是否清除?")) { try { Backup(FilePath); } catch(Err){} while(Check(FilePath)) Clear(FilePath); window.alert("清除了一个病毒。"); } } else { window.alert("未发现病毒。"); } } function btnScan_Clicked() { while(lstKill.options.length) lstKill.options.remove(0); btnScan.disabled = true; } } function AddControl(obj) { document.body.appendChild(obj); } function FileBox() { var obj = document.createElement("input"); obj.type = "file"; return obj; } function Button(text) { var obj = document.createElement("input"); obj.type = "button"; obj.value = text; return obj; } function TextBox() { return document.createElement("input"); } function Panel() { var Div = document.createElement("div"); Div.Add = function(Obj) { this.appendChild(Obj); } Div.Text = document.createTextNode(); Div.Add(Div.Text); Div.style.overflow = "hidden"; return Div; } function Group(Title) { var fieldset = document.createElement("fieldset"); var legend = document.createElement("legend"); fieldset.Text = document.createTextNode(); fieldset.Text.data = Title; legend.appendChild(fieldset.Text); fieldset.Add = function(Obj) { this.appendChild(Obj); } fieldset.Add(legend); fieldset.style.marginBottom = "2mm"; return fieldset; } function ListBox() { var select = document.createElement("select"); select.multiple = true; select.Add = function(text) { var opt = window.Option(text); select.options.add(opt); } return select; } } function TaskKill(Process) { var WinMgmts = GetObject("WinMgmts://127.0.0.1"); var ProcList = WinMgmts.ExecQuery("select * from win32_process"); var ProcList = new Enumerator(ProcList); while(!ProcList.atEnd()) { if(ProcList.item().Name.toLowerCase() == Process.toLowerCase()) ProcList.item().terminate(); ProcList.moveNext(); } } function Check(SourcePath) { var Code = "MZKERNEL32.DLL\x00\x00LoadLibraryA\x00\x00\x00\x00GetProcAddress\x00\x00|\x00\x00BKwdwing@"; var Stream = new ActiveXObject("Adodb.Stream"); Stream.Open(); Stream.Charset = "gb2312"; Stream.LoadFromFile(SourcePath); var Body = Stream.ReadText(60); Stream.Close(); Body = Body.replace(/[\s\S]\x00\x00BK/, "|\x00\x00BK"); return Body == Code; } function Clear(SourcePath) { var Stream = new ActiveXObject("Adodb.Stream"); Stream.Open(); Stream.LoadFromFile(SourcePath); var Body = Stream.ReadText(500 * 1024); Stream.Close(); var Match = ""; while(Match.length < 21) Match += "\x00"; Match += "MZ"; var C = 0, Temp = ""; while(C< Body.length && Temp.indexOf(Match) <0) { var Uni = Body.substr(C, 1000); C += 1000; Temp += Decode(Uni); } var Position = Temp.indexOf(Match) + 21; Stream.Type = 1; Stream.Open(); Stream.LoadFromFile(SourcePath); Stream.Position = Position; Body = Stream.Read(); Stream.Position = 0; Stream.SetEOS(); Stream.Write(Body); Stream.SaveToFile(SourcePath, 2); Stream.Close(); } function Backup(SourcePath) { var FSO = new ActiveXObject("Scripting.FileSystemObject"); var File = FSO.GetFile(SourcePath); File.Copy(SourcePath + ".logo1_vir", false); } function Decode(text) { return text.replace(/([\u0000-\uffff])/g, function($1) { var uni = $1.charCodeAt(0).toString(16); while(uni.length < 4) uni = "0" + uni; uni = uni.replace(/(\w{2})(\w{2})/g, "%$2%$1"); return unescape(uni); }); } function ScanFiles(Folder) { var Files = new Enumerator(Folder.Files); while(!Files.atEnd()) { if(Files.item().Name.slice(-4).toLowerCase() == ".exe") { var Path = Files.item().Path; pnlScan.Text.data = Path; if(Check(Path)) { try { Backup(Path); } catch(err){} while(Check(Path)) Clear(Path); lstKill.Add(Path + " (OK)"); } WSH.Sleep(50); } Files.moveNext(); } } function FolderList(Folder) { ScanFiles(Folder); var Folders = new Enumerator(Folder.SubFolders); WSH.Sleep(50); while(!Folders.atEnd()) { if(Folders.item().Path.match(/\\/g).length > 255) continue; pnlScan.Text.data = Folders.item().Path + "\\"; FolderList(Folders.item()); Folders.moveNext(); } } If internet cafe users want to clear the client machine, they can modify this line, set it to start at boot, and then it can hide the virus killing: IE.Visible = true; Change this line to: btnScan.disabled = true; You can change the one to be killed yourself! Save it as **.js Then call the following batch file to clear virus garbage @echo off del 盘付:\*.logo1_vir /f/s/q/a del 盘付:\_desktop.ini /f/s/q/a You can Attachments logo_1.exe彻底查杀-叼.rar (2.46 KiB) |
|
| Floor2 lxmxn | Posted 2006-10-22 12:08 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Downloaded, thanks to the楼主~ |
|
| Floor3 gxfc | Posted 2006-10-22 13:29 |
| 新手上路 Posts 11 Credits 17 | |
|
Let's try it. It's better not to damage the original application.
|
|
| Floor4 chainliq | Posted 2006-10-24 22:24 |
| 高级用户 Posts 244 Credits 635 From 广西贵港 | |
|
Haha, the topic didn't get much response. It seems that everyone has many ways to deal with this virus. I don't know if someone can give a few more examples!
|
|
| Floor5 electronixtar | Posted 2006-10-24 22:39 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
http://www.cn-dos.net/forum/viewthread.php?tid=23352&fpage=1&highlight=js%2Belectronixtar
Transferred from 51js.com, hope to note it. This JS code has been posted 3 times in the Batch Processing Room, moderator please merge them. [ Last edited by electronixtar on 2006-10-24 at 10:40 PM ] |
|
| Floor6 deadfat | Posted 2007-03-24 03:55 |
| 新手上路 Posts 1 Credits 2 | |
|
Thanks for sharing
|
|
| Floor7 icm | Posted 2007-03-24 04:46 |
| 新手上路 Posts 6 Credits 12 | |
| Floor8 qiukong983 | Posted 2007-04-04 02:26 |
| 新手上路 Posts 1 Credits 2 From 泸州 | |
|
Good
|
|
| Floor9 a201341717 | Posted 2007-04-04 02:37 |
| 贫困用户 Posts 20 Credits -2 | |
![]() |
|
| Floor10 fhygogo | Posted 2007-04-04 23:51 |
| 新手上路 Posts 1 Credits 2 | |
|
Grateful...!!
|
|
| Floor11 zy88889999 | Posted 2007-07-01 21:03 |
| 新手上路 Posts 1 Credits 2 | |
| Floor12 83738396 | Posted 2007-09-10 15:35 |
| 新手上路 Posts 1 Credits 2 | |
|
Thanks
|
|
| Floor13 star85 | Posted 2007-09-10 17:12 |
| 初级用户 Posts 11 Credits 31 | |
|
Excuse me, what was it compiled with?
|
|
| Floor14 67411666 | Posted 2007-10-14 16:32 |
| 初级用户 Posts 25 Credits 45 | |
| Floor15 stonemiss | Posted 2010-02-01 10:17 |
| 新手上路 Posts 1 Credits 1 | |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |