China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-02 16:39
中国DOS联盟论坛 » 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(); ``` View 4,596 Replies 14
Original Poster Posted 2006-10-22 11:07 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
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, Credits to download 1 pts, Downloads: 325)
Floor 2 Posted 2006-10-22 12:08 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

Downloaded, thanks to the楼主~
Floor 3 Posted 2006-10-22 13:29 ·  中国 山西 阳泉 联通
新手上路
Credits 17
Posts 11
Joined 2006-10-22 13:10
19-year member
UID 67721
Gender Male
Status Offline
Let's try it. It's better not to damage the original application.
Floor 4 Posted 2006-10-24 22:24 ·  中国 广西 贵港 电信
高级用户
★★
学无尽止
Credits 635
Posts 244
Joined 2006-04-15 05:07
20-year member
UID 53857
Gender Male
From 广西贵港
Status Offline
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!
Floor 5 Posted 2006-10-24 22:39 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
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 ]

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 6 Posted 2007-03-24 03:55 ·  中国 陕西 西安 电信
新手上路
Credits 2
Posts 1
Joined 2007-03-23 14:48
19-year member
UID 82676
Gender Male
Status Offline
Thanks for sharing
Floor 7 Posted 2007-03-24 04:46 ·  中国 黑龙江 哈尔滨 联通
新手上路
Credits 12
Posts 6
Joined 2006-10-23 21:14
19-year member
UID 67907
Gender Male
Status Offline
Floor 8 Posted 2007-04-04 02:26 ·  中国 四川 自贡 联通
新手上路
Credits 2
Posts 1
Joined 2007-04-04 02:06
19-year member
UID 83886
Gender Male
From 泸州
Status Offline
Good
Floor 9 Posted 2007-04-04 02:37 ·  中国 湖南 长沙 联通
贫困用户
Credits -2
Posts 20
Joined 2007-01-30 23:49
19-year member
UID 78145
Gender Male
Status Offline
Recent Ratings for This Post ( 2 in total) Click for details
RaterScoreTime
NaturalJ0 -3 2007-04-04 03:05
baomaboy -4 2007-04-04 03:13
Floor 10 Posted 2007-04-04 23:51 ·  中国 山东 青岛 联通
新手上路
Credits 2
Posts 1
Joined 2007-04-04 23:12
19-year member
UID 83969
Gender Male
Status Offline
Grateful...!!
Floor 11 Posted 2007-07-01 21:03 ·  中国 广东 深圳 南山区 电信
新手上路
Credits 2
Posts 1
Joined 2007-07-01 20:43
19-year member
UID 92884
Gender Male
Status Offline
Floor 12 Posted 2007-09-10 15:35 ·  中国 广东 深圳 福田区 电信
新手上路
Credits 2
Posts 1
Joined 2007-09-10 14:58
18-year member
UID 97020
Gender Male
Status Offline
Thanks
Floor 13 Posted 2007-09-10 17:12 ·  中国 福建 福州 电信
初级用户
Credits 31
Posts 11
Joined 2007-09-10 16:43
18-year member
UID 97033
Gender Male
Status Offline
Excuse me, what was it compiled with?
Floor 14 Posted 2007-10-14 16:32 ·  中国 浙江 温州 电信
初级用户
Credits 45
Posts 25
Joined 2007-10-14 14:51
18-year member
UID 99720
Gender Male
Status Offline
Floor 15 Posted 2010-02-01 10:17 ·  中国 上海 电信
新手上路
Credits 1
Posts 1
Joined 2010-01-28 16:46
16-year member
UID 159654
Gender Male
Status Offline
Forum Jump: