Metropoli BBS
VIEWER: pcbtest.bat MODE: TEXT (LATIN1)
rem  This is an example of an upload processor batch file that comes with
rem  PCBOARD v15.22, modifyed for usage with PPECHK.EXE to check all uploaded
rem  PPE's for BACKDOORS ...




@echo off

echo þ Checking for included FILEif %2 == UPLOAD pcbdesc %1 %3

testfile %1 arc zip
if errorlevel == 98 goto end
if errorlevel == 2 goto zip
if errorlevel == 1 goto arc
goto end

:zip
echo þ Testing ZIP file integrity
pkunzip -t %1 > pcbfail.txt
pkunzip %1 c:\temp file_id.diz *.ppe *.ppd
if errorlevel == 1 goto end
del pcbfail.txt
goto end

:arc
echo þ Testing ARC file integrity
arc -t %1 > pcbfail.txt
arc e %1 c:\temp
if errorlevel == 1 goto end
del pcbfail.txt
goto end

:END
:PPECHECK
echo binhere
if exist c:\temp\*.ppe goto FOUNDPPE
GOTO END2
:FOUNDPPE
ECHO FOUNDPPE!
FOR %%C IN (C:\TEMP\*.PPD) DO PPECHK %%C
IF ERRORLEVEL==3 GOTO FOUNDBACK
IF ERRORLEVEL==2 ECHO þ Suspicious PPE! (Maybe a STAT/USERS etc. PPE)
IF ERRORLEVEL==1 ECHO þ No backdoor found in PPE :)
GOTO END2
:FOUNDBACK
ECHO @X84PPE CONTAINS BACKDOOR!!! >>C:\TEMP\FILE_ID.DIZ
ECHO þ BACKDOOR found in PPE!!!
testfile %1 arc zip
if errorlevel == 98 goto end2
if errorlevel == 2 PKZIP -u %1 c:\temp\file_id.diz
if errorlevel == 1 arc a %1 c:\temp\file_id.diz
:END2
IF EXIST C:\TEMP\FILE_ID.DIZ DEL C:\TEMP\FILE_ID.DIZ
IF EXIST C:\TEMP\*.PPE DEL C:\TEMP\*.PPE
IF EXIST C:\TEMP\*.PPD DEL C:\TEMP\*.PPD

[ RETURN TO DIRECTORY ]