home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
PCBSEC20.ZIP
/
PCBSEC.PPE
(
.txt
)
< prev
next >
Wrap
PCBoard Programming Language Executable
|
1995-01-15
|
5KB
|
327 lines
;------------------------------------------------------------------------------
; .ss.
; `²²'
; .,sS$Ss,,s$ .,sS$$$Ss. .,sS$Ss,,s$ .ss. .sSs.
; .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
; $$$' .$$$' $$$²Sçsµ²' .$$$' .$$$'.$$$' .$$$' `$$b.
; $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$' ;$$$
; `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
; .sS²°$$$²²°"' d²°'
; .$$² .$$'
; $$$.,d$$'
; `²S$$S²'
;------------------------------------------------------------------------------
; P.P.L.X. 2.OO (C)1996 - Lone Runner / AEGiS CoRP'96
;------------------------------------------------------------------------------
; PPE 3.O1 (Encryption type I) - Analysis ON - Postprocessing ON
;------------------------------------------------------------------------------
Boolean BOOLEAN001
Date DATE001
Date DATE002
Integer INTEGER001
Integer INTEGER002
Integer INTEGER003
Integer INTEGER004
Integer INTEGER005
Integer INTEGER006
Integer INTEGER007
Integer INTEGER008
String STRING001
String STRING002
String STRING003
String STRING004
String STRING005
String STRING006
String STRING007
String STRING008
String STRING009
String STRING010
String STRING011
String STRING012
String STRING013
String STRING014
String STRING015
String STRING016
String STRING017
String STRING018
String STRING019
String STRING020
String STRING021
String STRING022
String STRING023
String STRING024
String STRING025
String STRING026
String STRING027
String STRING028
;------------------------------------------------------------------------------
STRING002 = PPEPath() + "CONFIG.SEC"
STRING005 = PPEPath() + "EXITMSG.SEC"
STRING007 = PPEPath() + "ONETIME.SEC"
STRING010 = PPEPath() + "PDATE.SEC"
STRING014 = PPEPath() + "ZIPPWDS.SEC"
STRING015 = PPEPath() + "PASSWORD.SEC"
STRING021 = PPEPath() + "TEMPMSG.SEC"
STRING025 = PPEPath() + "WELCOME.SEC"
STRING028 = PPEPath() + "ZNAME.SEC"
STRING006 = "Program modified... terminating for security reasons."
STRING016 = "Archive password WILL be visible to the SysOp! "
STRING017 = "Archive password WILL NOT be visible to the SysOp!"
STRING019 = ""
FOpen 1, STRING002, 0, 0
If (Ferr(1)) Then
PrintLn "Error - CONFIG.SEC missing/corrupt - Exiting..."
Log "** Error - CONFIG.SEC missing/corrupt - PPE abandoned.", 1
End
Endif
FGet 1, STRING003
FGet 1, STRING018
FGet 1, STRING001
FGet 1, STRING020
FGet 1, BOOLEAN001
FGet 1, INTEGER003
FGet 1, STRING004
FClose 1
INTEGER004 = 0
INTEGER005 = 0
INTEGER006 = 0
For INTEGER008 = 1 To Len(STRING016)
INTEGER005 = INTEGER005 + Asc(Mid(STRING016, INTEGER008, 1))
INTEGER006 = INTEGER006 + Asc(Mid(STRING017, INTEGER008, 1))
INTEGER004 = (INTEGER005 + INTEGER006) / Len(STRING017)
INTEGER004 = XOr(INTEGER004, 256)
Next
If (((INTEGER004 <> 430) || (INTEGER005 <> 4293)) || (INTEGER006 <> 4438)) Then
PrintLn STRING006
End
Endif
If (Exist(STRING007)) Then
FOpen 1, STRING007, 2, 3
FGet 1, DATE002
Frewind 1
FPut 1, Date()
FClose 1
Else
FCreate 1, STRING007, 2, 3
FPut 1, Date()
DATE002 = Date()
FClose 1
Endif
If (Exist(STRING021)) Delete STRING021
If (DATE002 < Date()) Then
PrintLn "Standby... purging outdated files..."
FOpen 2, STRING010, 0, 3
FAppend 3, STRING021, 1, 3
:LABEL001
If (Ferr(2)) Goto LABEL003
FGet 2, STRING012
STRING011 = Left(STRING012, 12)
STRING013 = Right(STRING012, 8)
If (STRING013 < String(Date())) Then
If (Exist(STRING003 + STRING011)) Delete STRING003 + STRING011
Goto LABEL002
Endif
FPutLn 3, STRING012
:LABEL002
Goto LABEL001
:LABEL003
FClose 3
FClose 2
Delete STRING010
Rename STRING021, STRING010
Endif
FOpen 1, STRING028, 0, 0
If (Ferr(1)) Then
PrintLn "Error - ZNAME.SEC missing/corrupt - Exiting..."
Log "** Error - ZNAME.SEC missing/corrupt - PPE abandoned.", 1
End
Endif
FGet 1, STRING023
FClose 1
StartDisp 1
If (Exist(STRING025)) Then
DispFile STRING025, 1
Else
PrintLn "ASCII xmit or type message now... ESC will terminate entry."
Endif
PrintLn
PrintLn "PCBSec - Encrypted E-Mail for PCBoard - Programmed by Madison Farrell, III"
PrintLn "Distributed Freely For The Use Of PCBoard SysOps -- 2.0"
PrintLn
If (BOOLEAN001 == 1) Then
PrintLn STRING016
Else
PrintLn STRING017
Endif
Newline
FCreate 1, STRING020, 1, 3
While (INTEGER001 <> 27) Do
INTEGER001 = MGetByte()
STRING019 = STRING019 + Chr(INTEGER001)
Print Chr(INTEGER001)
If (INTEGER001 == 13) Then
PrintLn
FPut 1, STRING019
STRING019 = ""
Endif
If (Len(STRING019) == 80) Then
FPut 1, STRING019
STRING019 = ""
Endif
EndWhile
FClose 1
If (Exist(STRING015)) DispFile STRING015, 1
While (STRING008 == "") Do
InputStr "password: _", STRING008, 14, 69, Mask_Pwd(), 64 + 1 + 2 + 4
EndWhile
STRING001 = STRING001 + STRING008 + " " + STRING003 + STRING023 + " " + STRING020
Shell 1, INTEGER002, STRING018, STRING001
INTEGER007 = S2I(STRING023, 10)
INTEGER007 = INTEGER007 + 1
If (INTEGER007 > 99999999) Then
INTEGER007 = 0
Endif
STRING024 = I2S(INTEGER007, 10)
If (Len(STRING024) < 8) Then
For INTEGER008 = 1 To 8 - Len(STRING024)
STRING027 = STRING027 + "0"
Next
Endif
STRING024 = STRING027 + STRING024
FCreate 1, STRING028, 1, 3
FPut 1, STRING024
FClose 1
FAppend 1, STRING010, 1, 3
STRING024 = STRING024 + "." + STRING004
INTEGER003 = String(INTEGER003)
DATE001 = Date() + INTEGER003
FPutLn 1, STRING024 + String(DATE001)
FClose 1
If (BOOLEAN001 == 1) Then
FAppend 1, STRING014, 1, 3
FPutLn 1, STRING023 + "." + STRING004 + " - " + STRING008
FClose 1
Endif
While (STRING022 == "") Do
InputStr "Message To: _", STRING022, 14, 20, Mask_Ascii(), 2 + 4 + 8
EndWhile
PrintLn
STRING009 = STRING008
If (BOOLEAN001 == 0) Then
STRING026 = ""
While (STRING026 == "") Do
InputStr "Send password (Y/N): _", STRING026, 14, 1, "YyNn", 4 + 2 + 8
If (STRING026 == "N") STRING009 = "<NOT GIVEN FOR SECURITY REASONS>"
EndWhile
Endif
FCreate 1, STRING021, 1, 3
FPutLn 1, Chr(13)
FPutLn 1, "A secured message for you has been transmitted to the system."
FPutLn 1, "You may download the message as you would any other file."
FPutLn 1, Chr(13)
FPutLn 1, "The filname is: " + STRING023 + "." + STRING004
FPutLn 1, "This file will be deleted on: " + String(DATE001)
FPutLn 1, Chr(13)
FPutLn 1, "Decode password: " + STRING009
FPutLn 1, Chr(13)
FClose 1
Message CurConf(), STRING022, U_Name(), "Encrypted Message", "R", 0, 0, 0, STRING021
Delete STRING021
If (Exist(STRING005)) Then
DispFile STRING005, 1
Else
PrintLn "User notified..."
Endif
End
;------------------------------------------------------------------------------
;
; Usage report (before postprocessing)
;
; ■ Statements used :
;
; 4 End
; 34 Goto
; 44 Let
; 1 Print
; 14 PrintLn
; 26 If
; 3 DispFile
; 4 FCreate
; 4 FOpen
; 3 FAppend
; 11 FClose
; 10 FGet
; 5 FPut
; 12 FPutLn
; 1 StartDisp
; 4 Delete
; 2 Log
; 3 InputStr
; 1 Newline
; 1 Shell
; 1 Message
; 1 Rename
; 1 Frewind
;
;
; ■ Functions used :
;
; 1 /
; 46 +
; 2 -
; 9 ==
; 4 <>
; 5 <
; 2 <=
; 1 >
; 4 >=
; 22 !
; 4 &&
; 4 ||
; 7 Len(
; 2 Mid()
; 1 Left()
; 1 Right()
; 3 Ferr()
; 6 Chr()
; 2 Asc()
; 6 Date()
; 1 U_Name()
; 4 String()
; 1 Mask_Pwd()
; 1 Mask_Ascii()
; 1 CurConf()
; 9 PPEPath()
; 6 Exist()
; 1 I2S()
; 1 S2I()
; 1 XOr()
; 1 MGetByte()
;
;------------------------------------------------------------------------------
;
; Analysis flags : S
;
; S - Shell to DOS ■ 5
; This may be normal if the PPE need to execute an external command,
; but may be actually anything... nasty (formating HD, rebooting,...)
; or usefull (sorting, maintenance,...). Check!
; ■ Search for : SHELL
;
;------------------------------------------------------------------------------
;
; Postprocessing report
;
; 2 For/Next
; 4 While/EndWhile
; 15 If/Then or If/Then/Else
; 0 Select Case
;
;------------------------------------------------------------------------------
; AEGiS Corp - Break the routines, code against the machines!
;------------------------------------------------------------------------------