home *** CD-ROM | disk | FTP | other *** search
- Program RemovePhoneBookPassword;
-
- { A small Terminate utility to remove forgotten passwords on phonebooks }
- { Made 1995 by Bo Bendtsen, SerWiz Comm, Free to modify and distribute }
-
- Type
- PhoneHeadRec = Record
- Encrypted : Boolean;
- Seed : Longint;
- Version : String[5];
- Comment : String[26];
- Password : Longint;
- Num : Integer;
- CurMonth : Byte;
- MonthCosts : Array[1..12] of Longint;
- PhonePos : Integer;
- ScrPos,
- WritePos : Byte;
- RangeStart,
- RangeStop : Integer;
- End;
-
- Var
- PhoneFile : File;
- PHead : PhoneHeadRec;
-
- Begin
-
- If Paramcount<>1 Then
- Begin
- WriteLn;
- WriteLn('■ Terminate Phone Password clearing');
- WriteLn;
- WriteLn(' Syntax : CLEARPWD phonebook');
- WriteLn(' Example : CLEARPWD TERMINAT.FON');
- Halt;
- End;
-
- Assign(PhoneFile,Paramstr(1));
- {$I-} Reset(PhoneFile,1); {$I+}
- If IOResult=0 Then
- Begin
- {$I-} BlockRead(PhoneFile,PHead,Sizeof(PHead)); {$I+}
- If IOResult<>0 Then WriteLn('Error in start of phonebook')
- Else Begin
- Phead.Password:=0;
- Seek(PhoneFile,0);
- BlockWrite(PhoneFile,PHead,Sizeof(PHead));
- Close(PhoneFile);
- WriteLn('Password cleared');
- End;
- End
- Else WriteLn('Could not open ',Paramstr(1));
-
- End.
-