Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2376
  • Last Modified:

RSA SecurID Software Token Converter

Hello,

We are using RSA SecurID Software Token in our Organization to secure the connection to our system from outside the Network.

after some configuration on the Console there is a command have to be run on the CMD to generate the link

this is the Command

C:\path_name\TokenConverter user2-passwordtoken.sdtid -p t0kenpw1 -iphone -o
tokenfile.txt

Open in new window


The problem when i am going to create 20 soft token it a headache can i put the last command in a script and the script take any file with the extension .sdtid and generate the link and put it on txt file with the same name of the .sdtid file.
and the script should check all .sdtid files and converted to .txt files with the same name of the .sdtid files.

Regards,
0
fadyaz
Asked:
fadyaz
  • 2
  • 2
1 Solution
 
stergiumCommented:
hello.
I believe that you need something like this
@echo off
FOR /F "tokens=1 delims=," %%a IN (list.txt) DO  CALL :Sub_createtoken %%a  %%1
GoTo EOF
:Sub_createtoken
start "C:\path_name\TokenConverter user2-%2.sdtid -p t0kenpw1 -iphone -o %1.txt"
:EOF

Open in new window

you call your batch file with a file parameter and have a list.txt with every new line will be the output txt file with a comma on the end of the line.
i hope that helps
0
 
fadyazAuthor Commented:
Thanks for your reply your code is perfect but the problem with this variable user2-%2.sdtid i need it to take the files with extension autmatically vecuase the name will be with the users username .

Regards
0
 
stergiumCommented:
I did not understand what you needed.
this should work.
@echo off
dir *.sdtid  /b > list.txt
FOR /F "tokens=1 delims=" %%a IN (list.txt) DO  CALL :Sub_createtoken %%a  
GoTo EOF
:Sub_createtoken
SET X=%1
set x=%x:~0,6%
start  "C:\path_name\TokenConverter user2-%1 -p t0kenpw1 -iphone -o %X%.txt"
:EOF

Open in new window

it will create a list.txt file with the contents of the folder (*.sdtid files)  and for everyfile will run the command and finally creating the txt file using the filename of the sdtid original file.
0
 
fadyazAuthor Commented:
Thanks for your help Your Code create a list.txt and include all sdtid file name in it .

I didn't need this, exactly our scenario is after generate the sdtid file from the system in example fadyaz.sdtid

i should run this command for each sdtid

TokenConverter.exe fady.sdtid -p 1234 -android -o fadyaz.txt

i didn't need to run this command every time for every file.

i want to make a batch file to check the sdtid files in the same folder and run the converter for each one and make the output in the txt file with the same name of sdtid file.

Regards,
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now