LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-21-2011, 12:12 PM   #1
aullah
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
How to capture Net::FTP session log to a file ?


hi all, can anybody show me how to capture the FTP session output from Net::FTP module to a text file or in a variable ?
 
Old 04-21-2011, 12:36 PM   #2
poorsod
LQ Newbie
 
Registered: Apr 2011
Posts: 16

Rep: Reputation: 3
Quote:
Originally Posted by aullah View Post
hi all, can anybody show me how to capture the FTP session output from Net::FTP module to a text file or in a variable ?
Use something like tcpdump to sniff all ftp traffic.
I think something like this will work (change 'eth0' to the name of the network interface that you're using):
Code:
tcpdump -i eth0 '(port ftp or ftp-data)' -w outputfile.cap
Of course if you have more than just that perl script using the ftp protocol you'll sniff some extra stuff you don't want. If you're only doing this once it'd be easier to just read the tcpdump man and make sure it'll filter by destination/src IP or something that identifies the specific session you want. You could also install an ftp proxy with logging capabilities and tell Net:FTP to go though it with the ftp_firewall attribute.

Last edited by poorsod; 04-21-2011 at 12:49 PM. Reason: close paranthesis
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a program that logs all net traffic to a log file manti111 Linux - General 8 08-14-2009 06:34 AM
Recieving a blank file during ftp session mrobertson Programming 4 07-06-2005 01:31 PM
ftp large file - lose net connect red hat 6 steve2k Linux - Networking 0 03-10-2004 10:28 AM
Log file for ftp scialom Linux - Software 1 08-11-2003 09:54 AM
perl, Net::Ftp, and Novell file modification time neo77777 Programming 0 01-30-2003 09:41 PM


All times are GMT -5. The time now is 01:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration