HP3000-L Archives

December 2003, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Thu, 18 Dec 2003 15:17:52 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (94 lines)
Passwords for the FTP server's user id have always bothered me, being
clear text passwords in your job stream. If you don't have a fancy and
rather expensive job scheduler, then prompting for the password will not
work for unattended (Automated) processing, so what do you do?

In this (No 3rd party software wanted) example the password is X123y
-----------------
!job jaobname,user.acct
!Setvar pass
'![chr(%130)]![chr(%61)]![chr(%62)]![chr(%63)]![chr(%171)]'
!echo open 10.10.10.10 > ftpcmd
!echo user myusername >> ftpcmd
!echo !pass >> ftpcmd
------------------
Admittedly most of us on the 3000-l will know that these are octal
values of ASCII characters. It's a quick-n-dirty method that attempts to
hide a strings of ASCII characters, or passwords, it's better than
spelling it out in the job stream file.

A better method that I have used on M.P.E. is to create an image
database that has a ftpsession master (Manual Master), and a FTP-file
detail Dataset. A logging Dataset is a good idea also. The session-mstr
contains a unique session-id x(32), ipaddr, username and password,
directory, and so on. The dtl Dataset contains session-id (as a path to
the session master), localfile, hostfile, ASCII/binary, put/get, maybe
even the "REC=" parameters, think about it. Write a program that will
read your FTPDB by session-id, create and write to ftpcmd
(new/temporary) based on the records linked to the session-id, and start
an FTP (Child process) using this file as input, GETvar FTP@ to check on
success or fail. In you job stream all you got to do is:
-----------------
!RUN filetran;info="the-session-id"
!if ftplasterr <> 0 then
bla,bla,bla....
------------------

my $0.02,
Michael.


>>> Robert Mills <[log in to unmask]> 12/17/03
08:39AM >>>
!job ftp,user.account
!echo open [ip address] > ftpcmd
!echo user [login name] [password] >> ftpcmd
!echo exitonerror >> ftpcmd
!# following command not necessary if files will sit in login root
directory.
!echo cd [directory] >> ftpcmd
!echo put [local file 1] [remote file 1] >> ftpcmd
!echo put [local file 2] [remote file 2] >> ftpcmd
!echo put [local file 3] [remote file 3] >> ftpcmd
!echo quit >> ftpcmd
!ftp < ftpcmd
!if ftplasterr <> 0 then
!  # place error reporting code here.
!  endif
!eoj

regards,

Robert W.Mills
Systems Development Manager
Windsong Services
(01689) 870622 x3005


Edward Effinger <mailto:[log in to unmask]> wrote on 17
December
2003 14:15:

> Hi.
>
> I am currently ftp'ing 3 files from our HP929 to another site on a
> daily basis.
>
> How might I automate this process?
>
> The 3 files are always the same name and the other ftp site requires
a
> login and password.
>
> Thanks for any advice received
> Ed
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2