Networking Forums

Networking Forums > Computer Networking > Linux Networking > Automating FTP session from a log file

Reply
Thread Tools Display Modes

Automating FTP session from a log file

 
 
Stefanus J Franslay
Guest
Posts: n/a

 
      08-24-2004, 08:58 AM
Hi,

I have a log file that was created by capturing a live ftp session. The log
file contains the FTP commands that was send to the server such as USER,
PASS, LIST and QUIT (instead of ls and bye).
Now I want to create a program/script that would take in this log file and
automatically replay the ftp session. Does anybody has an idea of how to do
this?

Thanks in advance.

-Johny



 
Reply With Quote
 
 
 
 
P Gentry
Guest
Posts: n/a

 
      08-24-2004, 11:18 PM
"Stefanus J Franslay" <(E-Mail Removed)> wrote in message news:<cgf003$r1d$(E-Mail Removed)>...
> Hi,
>
> I have a log file that was created by capturing a live ftp session. The log
> file contains the FTP commands that was send to the server such as USER,
> PASS, LIST and QUIT (instead of ls and bye).
> Now I want to create a program/script that would take in this log file and
> automatically replay the ftp session. Does anybody has an idea of how to do
> this?
>
> Thanks in advance.
>
> -Johny


What do you "expect" with an interactive protocol?

$ info expect
 
Reply With Quote
 
Frank da Cruz
Guest
Posts: n/a

 
      08-25-2004, 01:12 PM
On 2004-08-24, P Gentry <(E-Mail Removed)> wrote:
: "Stefanus J Franslay" <(E-Mail Removed)>
: wrote in message news:<cgf003$r1d$(E-Mail Removed)>...
:> I have a log file that was created by capturing a live ftp session. The log
:> file contains the FTP commands that was send to the server such as USER,
:> PASS, LIST and QUIT (instead of ls and bye).
:> Now I want to create a program/script that would take in this log file and
:> automatically replay the ftp session. Does anybody has an idea of how to do
:> this?
:>
:> Thanks in advance.
:>
:> -Johny
:
: What do you "expect" with an interactive protocol?
:
: $ info expect
:
Automating an FTP session by sending FTP protocol commands with 'expect'
would be a novel approach. A more sensible one is here:

http://www.columbia.edu/kermit/ftpscripts.html

- Frank
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      08-25-2004, 07:21 PM
Frank da Cruz <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>.. .
> On 2004-08-24, P Gentry <(E-Mail Removed)> wrote:
> : "Stefanus J Franslay" <(E-Mail Removed)>
> : wrote in message news:<cgf003$r1d$(E-Mail Removed)>...
> :> I have a log file that was created by capturing a live ftp session. The log
> :> file contains the FTP commands that was send to the server such as USER,
> :> PASS, LIST and QUIT (instead of ls and bye).
> :> Now I want to create a program/script that would take in this log file and
> :> automatically replay the ftp session. Does anybody has an idea of how to do
> :> this?
> :>
> :> Thanks in advance.
> :>
> :> -Johny
> :
> : What do you "expect" with an interactive protocol?
> :
> : $ info expect
> :
> Automating an FTP session by sending FTP protocol commands with 'expect'
> would be a novel approach. A more sensible one is here:
>
> http://www.columbia.edu/kermit/ftpscripts.html
>
> - Frank


Looks good -- thanks.

But if working from a log file ... ? I'll have to look into it.

Anyway, your link looks generally better (much better) -- not that I
script ftp sessions except as lab exercises for the students to
introduce them to expect ;-)

regards,
prg
email above disabled
 
Reply With Quote
 
Frank da Cruz
Guest
Posts: n/a

 
      08-26-2004, 04:23 PM
On 2004-08-25, P Gentry <(E-Mail Removed)> wrote:
: Frank da Cruz <(E-Mail Removed)> wrote in message
: news:<(E-Mail Removed)>.. .
: ...
:> Automating an FTP session by sending FTP protocol commands with 'expect'
:> would be a novel approach. A more sensible one is here:
:>
:> http://www.columbia.edu/kermit/ftpscripts.html
:
: Looks good -- thanks.
:
: But if working from a log file ... ? I'll have to look into it.
:
: Anyway, your link looks generally better (much better) -- not that I
: script ftp sessions except as lab exercises for the students to
: introduce them to expect ;-)
:
Then you might have more fun with Kermit too. You can easily write a
Kermit script that reads the logfile (FOPEN, FREAD, FCLOSE), extracts the
FTP protocol commands, and translates them to the equivalent FTP client
commands using (say) an associative array:

http://www.columbia.edu/kermit/ckermit70.html#x7.10.10

See the Kermit script tutorial and library:

http://www.columbia.edu/kermit/ckscripts.html

- Frank
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating Telnet or SSH Samuel Linux Networking 4 09-14-2007 05:35 PM
Automating Microsoft Client and File & Print Sharing Installation =?Utf-8?B?SmVmZg==?= Windows Networking 1 09-16-2005 11:34 PM
Automating Microsoft Client and File & Print Sharing Installation =?Utf-8?B?SmVmZg==?= Windows Networking 0 09-16-2005 04:54 PM
Automating WPA-PSK installation on domain PCs? DrBunsen Wireless Networks 3 08-01-2005 09:09 PM
automating VPN connection joe bennett Windows Networking 0 12-18-2003 11:26 PM



1 2 3 4 5 6 7 8 9 10 11