Adobe Acrobat and Reader versions 2018.011.20063 and earlier, 2017.011.30102 and earlier, and 2015.006.30452 and earlier have an use after free vulnerability. Successful exploitation could lead to arbitrary code execution.
REM: Save a Pdf as JPEG. REM:Also Multipage PDF will can be changed. Then every page will be saved as single JPEG REM: The Filename you can change to your needs. REM: If you use Drag&drop or Filename as command REM: line argument the script will work with this file.
'*********Settings in File************************** FileNM = "C:\Users\muhe\Desktop\x.pdf"'//Filename for File to transfer if NO argument is given '****************************************************
set WshShell = CreateObject ("Wscript.Shell") set fs = CreateObject("Scripting.FileSystemObject") Set objArgs = WScript.Arguments if objArgs.Count = 1then FileNM = ObjArgs(0) Info = "Save as JPEG"&VbCr&_ "File Name: "&FileNM &vbCr&" Delete existing JPEG FILES with the same Name before!"&vbcr&" Start now?" OK = MsgBox(Info, vbQuestion+vbYesNo,"Insert Files") : if OK = vbNo then WScript.quit
'//Start or switch to Acrobat WshShell.run "Acrobat.exe" Whilenot WshShell.AppActivate("Adobe Acrobat") : Wscript.Sleep 1000 : Wend Set gApp = CreateObject("AcroExch.App")
Set BASFL = CreateObject("AcroExch.pdDoc") OK = BASFL.Open(FileNM) '//Open the PDF-File ifnot OK ThenifMsgBox("Error open Basic File") then Wscript.quit BASFL.OpenAVDoc(mid(FileNM,InstrRev(FileNM,"\")+1)) '// get the PDF-File into view WScript.Sleep 1000
'// to get this part working reliable(!) use WinAPI, WMI, or AutoITX.dll to check the forground window
WshShell.SendKeys "^+s"'// send keys for SaveAs WScript.Sleep 1000 WshShell.SendKeys "{tab}"'// goto Filetype WScript.Sleep 500 WshShell.SendKeys "J"'// switch filetype zu JPEG WScript.Sleep 500 WshShell.SendKeys "{tab}{Enter}"'// switsch to "Save" and save WScript.Sleep 1000
Set BASFL = nothing : set gApp = nothing
脚本来自网上,当时晚上随便看reader攻击面的时候随手找到的一个转换脚本,这个脚本的功能的调用Adobe Acrobat DC Pro的转换模块,把pdf转成图片。