1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IFTP Asks for User input - How to avoid?

Discussion in 'T&T - Scripting' started by ingarnt, Sep 1, 2011.

  1. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0
    Hi!

    I have a few issues with IFTP that someone hopefully can help me to solve?

    1. I would like to use IFTP for an automated file retrieval service, but when connecting to an FTPS Site which has a self-signed certificate, I get a warning asking to accept the certificate Yes/No. Any way I can automatically accept it? Even if I use /Q it prompts the user for a response.

    2. My FTP server uses TLS v1 as default, which IFTP does not seem to support (only SSL v2/V3). Any way to get IFTP to connect to an FTP site with TLS v1?


    Ingar.
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    From: ingarnt
    ...
    | 1. I would like to use IFTP for an automated file retrieval service,
    | but when connecting to an FTPS Site which has a self-signed
    | certificate, I get a warning asking to accept the certificate Yes/No.
    | Any way I can automatically accept it? Even if I use /Q it prompts
    | the user for a response.

    You may try this approach (no guarantees!):

    IFTPS ftp:... < yes

    Your 2nd question is for Rex Conn.

    BTW, your questions should be in the TC_Support forum. The "Tips" group is intended for tips you provide to others.
    --
    HTH, Steve
     
  3. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0
    Hi, thanks. I'll put my next questions in the right forum.

    I already tried < yes - (I think I used that method back in the good old 4DOS days) but it doesn't work now in TCC (I get "The system cannot find the file specified").

    Ingar
     
  4. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    | I already tried < yes - (I think I used that method back in the good old 4DOS days) but it
    | doesn't work now in TCC (I get "The system cannot find the file specified").

    Try a file containing the word YES, referred to as yes.txt below.

    iftps ftp:... < yes.txt

    Also, when you quote a message, only include the minimum necessary to understand the response, and NEVER quote the signature, nor the line separating the message text from the signature, in standard-compliant messages containing "-- ". Many mail packages, including the one I use, strip everything starting at the separator. I had to manually quote the above aegment.
    --
    Steve
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Or perhaps even

    Code:
    iftps ftp:... <<< yes
    
     
  6. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0
    Yeah, tried that aswell, no go. that makes it run, but IFTP still pauses at "Would you like to continue? (Y/N)?" I tried several variations of your suggestion with "y" "yes" "Y" etc in the file, but no luck.

    Thanks for the help though.
    --
    Ingar.
     
  7. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Well, if it doesn't read from stdin, there's always KEYSTACK....
     
  8. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0
    Hi! Thanks for the tip, but that did not work either. The pc-speaker makes an audible "beep" when I enter it like that, but IFTP still pauses at the Y/N dialog.
    --
    Ingar.
     
  9. samintz

    samintz Scott Mintz

    Joined:
    May 20, 2008
    Messages:
    1,177
    Likes Received:
    11
    Or even:

    Code:
    echo yes |! iftps ftp:...
    
    -Scott




    Quote:


    Originally Posted by Steve
    Fabian
    Try a file containing the word YES,
    referred to as yes.txt below.

    iftps ftp:...
    < yes.txt
    Or perhaps even

    Code:
    iftps ftp:...
    <<< yes
     
  10. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0
    Ok, thanks for all the tips. I actually opened the JP Help file, and made something (almost) work.

    start iftp "ftps://ib:ib@10.49.0.200" & keystack "y" enter /w50

    The above one works, but it opens iftp in a New TCC windows, but I want to open it in the current window. Running the command without "start" makes keystack run AFTER iftp has finished.. Any other tips?

    Thanks for the help so far.
    --
    Ingar
     
  11. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0

    Hi, thanks for the tip, but couldn't get this to work. It makes the pc-speaker beep once when executed, but the program still pauses at the "Y/N" prompt.
    --
    Ingar
     
  12. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    Put the KEYSTACK before the IFTP. Oh, and you probably want the /W50 before the "Y".
     
  13. ingarnt

    Joined:
    Aug 31, 2011
    Messages:
    7
    Likes Received:
    0
    Aha, success! Thanks :)

    Working solution:
    Code:
    keystack /w50 "y" enter & iftp "ftps://ib:ib@
    10.49.0.200"
    
    --
    Ingar
     

Share This Page