- Jan
- 1
- 0
Hi all,
TCC/LE 9
I am trying to write a small btm file to extract user passwords from individual files in order to construct a single file containing all user names and passwords.
I have the following code:
set fd_pwdfile=%@fileopen[%sz_user\%sz_pwdfile,r,t]
do forever
set sz_pwdline=%@fileread[%fd_pwdfile]
if "%sz_pwdline" eq "**EOF**" .or. "%sz_pwdline" eq "" leave
set sz_pwdfield=%@word[":",0,%sz_pwdline]
iff "%sz_pwdfield" eq "POP3_access" then
set sz_pwdfield=%@word[":",1,%sz_pwdline]
set sz_pwd=%@strip[" ",%sz_pwdfield]
leave
endiff
enddo
The problem is that the passwords can have any character, including %, >, <, etc. I have solved processing of all special characters using setdos /X-5678, but I don't know how to by-pass processing of % symbol.
I have tried SETDOS /X-3, but this deactivated the variables.
Is there a way to process text strings containing the % symbol?
Thank you in advance.
TCC/LE 9
I am trying to write a small btm file to extract user passwords from individual files in order to construct a single file containing all user names and passwords.
I have the following code:
set fd_pwdfile=%@fileopen[%sz_user\%sz_pwdfile,r,t]
do forever
set sz_pwdline=%@fileread[%fd_pwdfile]
if "%sz_pwdline" eq "**EOF**" .or. "%sz_pwdline" eq "" leave
set sz_pwdfield=%@word[":",0,%sz_pwdline]
iff "%sz_pwdfield" eq "POP3_access" then
set sz_pwdfield=%@word[":",1,%sz_pwdline]
set sz_pwd=%@strip[" ",%sz_pwdfield]
leave
endiff
enddo
The problem is that the passwords can have any character, including %, >, <, etc. I have solved processing of all special characters using setdos /X-5678, but I don't know how to by-pass processing of % symbol.
I have tried SETDOS /X-3, but this deactivated the variables.
Is there a way to process text strings containing the % symbol?
Thank you in advance.