Daily Archives: 2017-01-24

You are browsing the site archives by date.

문서보안설정된 파일들만 추출하는 Enscript

예) Fasoo DRM 팔일

——————————————————

class MainClass {

void Main(CaseClass c) {

SystemClass::ClearConsole(SystemClass::SHOWCONSOLE);

String FolderPath=”C:\\TEST\\”;

for(ItemIteratorClass iter(c); EntryClass entry = iter.GetNextEntry();) {

String strExt = entry.Extension();

if(strExt==”ppt” || strExt==”xls” || strExt==”doc” || strExt==”pptx” || strExt==”xlsx” || strExt==”docx” || strExt==”pdf” || strExt==”hwp”) {

EntryFileClass entryFile();
entryFile.Open(entry);

long Signature = entryFile.ReadBinaryInt(4);

if(Signature == 0x5244209B) {

Console.WriteLine(entry.Name());
LocalFileClass File();
File.Open(FolderPath + entry.Name(), FileClass::WRITE);
File.WriteBuffer(entryFile);
File.Close();

}

}
}

}
}