FTP Server logon message variables?

BatmanNate

Lifer
Jul 12, 2000
12,444
2
81
Hi,

I've picked up FTP serving again, and I recall when I used to run my server (using Serv-U 2) I was able to display to the user variable information in the logon message by putting certain commands in there. These variables included:

Number of users on server
Current bandwidth used by server
Server Uptime
Client IP address

Does anyone know how to do this? It would be greatly appreciated!
 

jkukowsk

Member
Mar 4, 2002
85
0
0
RTFM!

If it's like Bullet Proof it should tell you everything you need to know in the help file.
 

BatmanNate

Lifer
Jul 12, 2000
12,444
2
81


<< RTFM!

If it's like Bullet Proof it should tell you everything you need to know in the help file.
>>



Thank you for the rude reply. I looked through the BPFTP manual prior to posting, and could find nothing on the topic, hence this post.
 

jkukowsk

Member
Mar 4, 2002
85
0
0
It wasn't a rude reply it was the truth. If you are running Bullet Proof FTP server look in the help file under "How To?" then at "Message Files"

----------------------------------------------------------------------------------

There are 3 types of message files:

Login message file: sent by the event manager after the welcome message

ChangeDir message file: sent each time a user changes his current directory

Links File: processed while sending directory list

Note: the ChangeDir file can also be a file without a specific path, in that case the server will check any directory for this file and process it in case it exists. Using this method you can add specific files with different messages to every directory.
Alternatively you could place a message file (maybe called 'chgdir_msg.txt') e.g. in your upload directory exclusively so people would only see a message when they would enter it to upload files. In any case you should set this file's attribute to 'hidden' and also check 'Hide files/dirs with 'hidden' attribute set' under 'Setup User/Group accounts | Miscellaneous'.
The first two message files support many tags:


%MAXUSERS = the maximum number of users which can be connected to the server at the same time
%LOCALIP = the IP address of the server
%UIP, %CLIENTIP = the IP address of the client
%CLIENTIP_000 = returns formated ip like 192.168.000.010 (for use with filename and sorting).

%UHOSTNAME = the hostname of the client
%UNAME = the user's account name
%USPEEDLIMIT = the maximum speed the user will be able to send/receive at
%CNOW = the number of users currently connected
%CALL = the total number of user connections to the server since startup
%C24H = the number of connections during the last 24h
%UTIMEOUT = current user TimeOut

%URATIOCREDIT = current user ratio credit (if ratio is enabled)
(%URATIOCREDITxx with xx=KB, MB,GB)

%UQUOTACURRENTxx (with xx=KB, MB, GB) = current quota
%UQUOTAMAXxx (with xx=KB, MB, GB) = max quota

%UHOME = current user home dir (if showrelativepath is disabled)
%UCURRENTDIR = current user dir
%URATIO = current upload/download ratio
%URATIOUP = current upload ratio
%URATIODOWN = current download ratio

%WELCOMEIP = create a file named "welcome_<ip>.txt" (welcome_192.168.0.128.txt) and server will send it as welcome message for ip (to be used with virtual server).

%SERVERSECS = \
%SERVERMINS = time the server is online
%SERVERHOURS = /
%SERVERDAYS =/

%SERVERTIMEUP = server uptime since online
%SERVERTOTUPTIME = server total uptime since installation

%TOPDAY, %TOPWEEK, %TOPMONTH, %TOPALL = merge .top file in the message

-= All Session =-

(xx = KB,MB,GB)

%SERVERxxUP = uploaded to the server (all sessions)
%SERVERxxDOWN = downloaded from the server (all sessions)
%SERVERxxALL = transferred to the server = %SERVERxxUP + %SERVERxxDOWN

-= Server Session =-

%SESSIONxxUP = Kb uploaded to the server by clients
%SESSIONxxDOWN = Kb downloaded from the server by clients
%SESSIONxxALL = Kb transferred to the server = %SESSIONKBUP + %SESSIONKBDOWN

%SESSIONxxTOTAL = Kb transferred by the server including uploads, downloads,
directory listings, answers to commands ...

%SESSIONFILESUP = number of files uploaded to the server
%SESSIONFILESDOWN = number of files downloaded from the server
%SESSIONFILESALL = %SESSIONFILESUP + %SESSIONFILESDOWN

%SESSIONAVG = average bytes transferred by the server

-= Time/Date =-

%TIME_EX = reports formated time as "hhmmss"

%TIME, %SERVERTIME = server's machine time

%DATE_EX_DMY, _YMD, _MDY = returns formatted date : 2000-11-30 for example (D=day, M=month, Y=year)

%SERVERDATE = server's machine date
%SERVERLOCALHOST = server's local hostname
%SERVERVERSION = server version

%DISK = if 'Show Relative Paths' is not enabled return disk drive
%DFREE, %DFREEKB, %DFREEMB, %DFREEGB = free space in current directory (byte, Kbyte, Mbyte, Gbyte)

%DFREEx (x=drive letter) = report free drive space on x (also avail. : %DFREExKB, %DFREExMB, %DFREExGB).

-= user =-

%FUP = number of files uploaded by current user (current session)
%FDOWN = number of files downloaded by current user (current session)
%FTOT = %FUP + %FDOWN (current session)

%BUP, %KBUP, %MBUP, %GBUP = number of bytes uploaded by current user (current session)
%BDOWN, %KBDOWN, %MBDOWN, %GBDOWN = number of bytes downloaded by current user (current session)
%BTOT = %BUP + %BDOWN (current session)
(%KBTOT, %MBTOT, %GBTOT)

%BDOWNALL, %KBDOWNALL, %MBDOWNALL, %GBDOWNALL = uploaded by current user (all session)
%BUPALL, %KBUPALL, %MBUPALL, %GBUPALL = uploaded by current user (all session)

%TMIN = minutes since current user is connected
%TSEC = seconds since current user is connected (not equal to %TMIN * 60)

-= Server =-

%SITEWHO = who's online.

%PCPROC = type and number of server &uuml;rocessor (Intel, AMD, Cyrix ... K6, Pentium II, ...)
%PCRAM = amount of physical memory

%OSVER = Windows version (95, 98, NT, Service Pack if available ...)

%S_IP = server IP separated by commas


A typical login file could be:
==========================================
Hello, user from %UIP !
You are user #%CNOW of %MAXUSERS maximum users
It is %SERVERTIME, we are the %SERVERDATE.
==========================================
You are connected to %SERVERVERSION, this server has %PCPROC and %PCRAM Kb of Ram.
This server has already served %SESSIONKBUP Kb to client and received %SESSIONKBDOWN Kb
at an average rate of %SESSIONAVG Kb/s.
You will be disconnected after %UTIMEOUT s of inactivity.

Have a nice day on our server!

That's all for those files.
 

BatmanNate

Lifer
Jul 12, 2000
12,444
2
81
Thank you for the help. If you read the original post, I'm not using BPFTP by the way. Serv-U. Thanks!
 

jkukowsk

Member
Mar 4, 2002
85
0
0


<<

<< RTFM!

If it's like Bullet Proof it should tell you everything you need to know in the help file.
>>



Thank you for the rude reply. I looked through the BPFTP manual prior to posting, and could find nothing on the topic, hence this post.
>>



Sounded like you were using Bullet Proof right there.
 

BatmanNate

Lifer
Jul 12, 2000
12,444
2
81
BPFTP was the client, ServU was the server. They use a different command set apparently, b/c BP's variables don't operate under ServU.
 

jkukowsk

Member
Mar 4, 2002
85
0
0
From the Serv-U FTP Site:


Serv-U FTP Server can display various types of messages:



· Sign-on/sign-off messages

· User specific login messages

· Directory change messages



There are several symbolic parameters that can be entered in the message text. These parameters are expanded while being sent to a client. They all begin with '%'. Here is the complete list:

Time/date
%Time - displays the current time on your PC

%Date - displays the current date on your PC

Server statistics
%ServerDays - displays the number of days the server has been running

%ServerHours - displays the number of hours the server has been running

%ServerMins - displays the number of minutes the server has been up

%ServerSecs - displays the number of seconds the server has been up

%ServerKbUp - displays the no. Kbytes uploaded to the server since server start

%ServerKbDown - displays the no. Kb downloaded from the server since server start

%ServerFilesUp - displays the no. of files uploaded to the server since server start

%ServerFilesDown - displays the no. of files downloaded from the server since server start

%LoggedInAll - displays total no. of logged in users since server start

%ServerAvg - displays the average server throughput since server start

%ServerKBps - displays current server bandwidth use

Server settings
%MaxUsers - displays the maximum no. of users, as set in 'Settings - Domain'

%MaxAnonymous - the maximum no. of anonymous users, as set in 'Settings - Domain'

User info
%Name - displays the user's login name

%IP - displays the user's IP number or name if available

%Dir - displays the user's current directory

%Disk - displays the user's current disk drive

%DFree - displays the amount of free space on the user's current disk in Kb

%FUp - displays the number of files uploaded by the current user

%FDown - displays the number of files downloaded

%FTot - displays the total number of files transferred

%BUp - displays the number of Kbytes uploaded by the user

%Bdown - displays the number of Kbytes downloaded by the user

%BTot - displays the total number of Kbytes transferred

%TconM - displays the total connect time in minutes

%TconS - displays the connect time in seconds - to be used with '%tconm'

%RatioUp - displays the 'upload' ratio part for UL/DL ratios

%RatioDown - displays the 'download' ratio part for UL/DL ratios

%RatioCredit - displays the current download credit for UL/DL ratios (Kb or 'files')

%QuotaUsed - displays how much disk quota is used in Kb

%QuotaLeft - displays how much disk quota is left in Kb

%QuotaMax - displays the maximum amount of disk space that can be used in Kb

Number of users
%UNow - displays the current number of Serv-U users connected

%UAll - displays the number of users since the server was started

%U24h - displays the number of users in the last 24 hours

%UAnonAll - all currently logged in anonymous users

%UAnonThisIP - all anonymous users logged into this IP home

%UNonAnonAll - all non-anonymous users currently logged in

%UNonAnonThisIP - all non-anonymous users logged into this IP home

%UThisName - all current users with the current user name logged into this IP home



The file upload and download message directives are for the current session only (i.e. they do not show the aggregate over multiple sessions).



The '%ServerDays', '%ServerHours', '%ServerMins', and '%ServerSecs' directives are meant for use together. The number of hours is what's left after the number of days is subtracted, and the same goes for the number of minutes and seconds.



Example Message


Welcome to ftp.cat-soft.com, home of Serv-U!

Local time is %time, and %u24h users have visited over the last 24 hours. This server has been up for %ServerDays days, %ServerHours hours, %ServerMins min. and %ServerSecs sec.



Server stats:

Users logged in: %loggedInAll total

Current users: %Unow

Kb downloaded: %ServerKbDown Kb

Kb uploaded: %ServerKbUp Kb

Files downloaded: %ServerFilesDown

Files uploaded: %ServerFilesUp

Average througput: %ServerAvg Kb/sec

Current througput: %ServerKBps Kb/sec



Please keep in mind that the average client has only 80 characters per line, and the first four are taken up by the reply code. Please be brief, 70 characters should generally be considered a safe maximum.

 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |