MAJOR=4
MINOR=3
DEVNAME=tty3
     ˆÅÄË‚lAÃÂÈ 	    ‹      ½•_o›0Åßû)<?ì-\’ÐVmS*-ZšD)Ó6M{p°	V�Aæ¦I÷éÇŸlÉ¦dë¦(/p�s¿s±0{NÑçéyÝ�ÈôÃÛÑp@hàc FaûÀsÜ.ÀÝ˜š"× «ÕÊYõ�Ü. šAŠ™ö D«bt
œ±ú^pFX*¹¨Î„¡B-ƒ¡rMò„@¾ÄR	éÁ²´ L¬—B‚Vs£û`$jea�ØŒAÛYyÁÆŒÍsñ\¿£û_~U[Äç�m]Ú€aJž¸VãSÌ0•-HicŸ‚ŠsSÂ\sóè,TB	×èÓ/ÃÁäk¥Lëî€q’Z™øôÍÀßLü[Œy&ðýšûV3â%’,*QR?´âõí°aØjBYÆV¨r³•Bq7jœë²àUÖó*AjwU­Düm<þeÓÛÙÝ8
‡³v$¢¶ØÒ½èëÐ`Ê­4HBeeŒ¹}Þð·f¯Í¼,n~\’�U‹i@H‡ìUþC$”kÜ�}Šö†A™š£tRlë]Ößàzn¯×q¯:îq¯®½B=çòý©R”EÍ_�A~étOG.u³<þŸõqæï�.oøùqÈI×=¹V‰D•5ë[gþ§[E¼áçG"?wú á�6[ƒfƒcÐn¢ßp_.t§    6   ˆl–Ãa¾” TÐ?JqAàp-©‹Fÿ�þY À³�€Ž€£~YHçÍ„šiïÌÃÉ 0     #! /usr/bin/perl
# ---------------------------------------------------------------------------
#
# USAGE: xferstats <options>
#
# OPTIONS:
#       -f <filename>   Use <filename> for the log file
#       -r              include real users 
#       -a              include anonymous users 
#       -h		include report on hourly traffic
#       -d		include report on domain traffic
#       -t		report on total traffic by section
#	-i 		report incoming traffic only (uploads)
#	-o		report outgoing traffic only (download)
#	-e		report deleted files only (just for complete)
#       -D <domain>     report only on traffic from <domain>
#				this option leads to problems with the local
#				domain: e.g. test.com is counted under test
#				and not recognized under com, -D com will give
#				you only statistics about com excluding
#				test.com! use -A com for correct results.
#       -A <address>    report only on traffic from addresses ends matching
#				<address> e.g. -A test.domain.com will report
#				only on addresses ending with test.domain.com
#       -l <depth>      Depth of path detail for sections
#       -s <section>    Section to report on, For example: -s /pub will report
#				only on paths under /pub
#       -u <user>       Report traffic for specified user.
#
# ---------------------------------------------------------------------------
# 04.09.2013: minor change by Andretta Paolo and TJ Saunders
# - enabled -d (not working)
# - corrected -i & -o (not working)
# - added -e
#
# ---------------------------------------------------------------------------
# 05.09.01: minor change by Jamie Fifield (fifield@chebucto.ns.ca):
# - added option u which singles out the data for a single user
#
# ---------------------------------------------------------------------------
# 30.09.98: changes by Jan Menzel (jan.menzel@gmx.net):
#  -documented problems with option -D
#  -fixed same problems with spaces in the filenames (lines which are not
#     exactly 16 elements long are skipped in earlier versions)
#  -added option A which compares the addresses end with a given pattern
#  -added option i and o which reports either incoming or outgoing traffic only

@mydom = split(/\./, `dnsdomainname`);
$mydom2 = pop(@mydom); chop($mydom2);
$mydom1 = pop(@mydom);

# If you want to specify $mydom1 and $mydom2 manually you should edit the
# next two lines to customize for your domain. This will allow your domain
# to be separated in the domain listing.
# $mydom1 = "debian";
# $mydom2 = "org";

# edit the next line to customize for your default log file
$usage_file = "/var/log/proftpd/xferlog";

# Edit the following lines for default report settings.
# Entries defined here will be over-ridden by the command line.

$opt_a = 0;
$opt_h = 0; 
$opt_d = 0;
$opt_t = 1;
$opt_l = 3;
$opt_r = 0;

use Getopt::Std;
getopts('f:rahdD:l:s:A:iotu:e');

if ($opt_r) { $real = 1;}
if ($opt_a) { $anon = 1;}
if ($real == 0 && $anon == 0) { $anon = 1; }
if ($opt_f) {$usage_file = $opt_f;}
if ($opt_i) {$opt_i = 1;}
if ($opt_o) {$opt_o = 1;}
if ($opt_e) {$opt_e = 1;}

open (LOG,$usage_file) || die "Error opening usage log file: $usage_file\n";

if ($opt_o) {
   print "Transfer totals include outgoing traffic only.\n\n";
}

if ($opt_i) {
   print "Transfer totals include incoming traffic only.\n\n";
}

if ($opt_e) {
   print "Transfer totals include deleted files only.\n\n";
}

if ($opt_D) {
   $opt_D =~ tr/A-Z/a-z/;
   print "Transfer t