home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
nopm01.zip
/
tn_patch.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
2002-02-21
|
1KB
|
51 lines
/*
* original cmd by Jugulator. thanks to nikl ;)
---
this is patcher for telnetd.exe
---
*/
Parse Arg filename;
Say '-----------------------------------------------';
Say ' patcher for telnetd.exe IBM for textmode env. ';
Say '-----------------------------------------------';
Say '';
if filename = '' then
Do
Say 'Usage: tn_patch PATH\telnetd.exe';
End
Else
Do
Say 'Trying to fix "'||filename||'"';
'@unlock '||filename||'>nul';
If Rc <> 0 then
Do
Say 'Cannot find or unlock file!';
End
Else
Do
rc = Stream(filename, 'c', 'open');
if rc = 'READY:' then
Do
sz = Chars(filename);
t = Pos( X2C('3200C706'), CharIn(filename,1,sz) );
If t > 0 Then
Do
Call CharOut filename, X2C('1E'), t;
Say 'Fix done!';
End
Else
Do
Say 'Failure!';
Say "Maybe telnetd.exe is already patched.";
End;
Call Stream exe, 'c', 'close';
End
Else
Do
Say 'File open error!';
End;
End;
End;