|
本帖最后由 sparkguo 于 2019-4-4 10:48 编辑
最近对PE 有点兴趣,在论坛里面下载了一个高手的PE拆开学习了一下,发现ljycslg 大神的PE 有些看不懂,代码如下:
_SUB Insdriver (应该是安装驱动的代码)
NAME &&fname=%~1
FIND [ $custom=%&fname% | $custom_64=%&fname% ], CALL hwids &&ID1
FIND# $Z=Z%2, EXEC =!%programfiles%\7-zip\7z.exe x %1 -o%temp%\pe-driver\%&fname% # EXEC =!%programfiles%\7-zip\7z.exe x %1 -o%2
FIND# $Z=Z%2, EXEC =!dpinst.exe /S /Path %temp%\pe-driver\%&fname% # EXEC =!dpinst.exe /S /Path %2
WAIT 500
FIND [ $custom=%&fname% | $custom_64=%&fname% ], CALL hwids &&ID2
FIND |%&ID1%<%&ID2%, EXEC -hide -wait dpinst.exe /S /Path %temp%\pe-driver\%&fname%
FIND# $DRIVERS_USB=%&fname%, EXEC =!dpinst.exe /S /Path %temp%\pe-driver\%&fname%
FIND# $Z=Z%2, FILE %temp%\pe-driver
_END
_SUB hwids (完全看不懂)
EXEC* &&all=!devcon findall *
READ -,0,&&line,%&all%
MSTR &&Q=<1>%&line%
ENVI-ret %1=%&Q%
_END
_SUB autorun (应该是网克有关的)
REGI $HKLM\SYSTEM\CurrentControlSet\Control\PEBootServerAddr,&&ServerAddr
REGI $HKCU\Software\TightVNC\Control\ReverseConnectionHistory\0=%&ServerAddr%
exec =!tftp -i %&ServerAddr% get pxeautorun.txt %windir%\system32\pxeautorun.cmd
wait 500
ifex %windir%\system32\pxeautorun.cmd, exec pxeautorun.cmd %&ServerAddr%
exit file
_END
以上三段代码麻烦老师们逐句注释一下
ID1 ID2 完全不知道是什么 |
|