f-scripts Official Web Page

Last update 2008-02-05

Contents

  1. Preface
  2. General Setup Procedure
  3. Programs:

Preface

This is my personal collection of "scripts" written for glftpd sites. Be aware that they are coded by myself (except for some public domain code) and therefore will probably not work for you nor work how you would expect them to.

I have written these programs because I feel the majority of the available scripts for glftpd are of low quality, being a few lines of bash code. Few scripts show a love for code elegance, performance while keeping simplicity and maintaining site security. My "scripts" are (mostly) not really scripts because they are written in C and need to be compiled into binaries. This approach is greatly superior to bash scripting where every line of code will load, launch, run, terminate a number of separate processes.

Again I warn you, that installing a number of these programs requires more knowledge than average site scripts, for you are generally required to configure the sitebot's tcl code on your own. But rest assured that by following the detailed instructions the remaining parts of the are child's play.

Support Forum

f-scripts now has a brand-new, shiny official support and FAQ forum at www.high-society.at/forum/. Please visit if you need further help setting up these scripts.

General Setup Procedure

Most of the available programs follow a common configuration method: Each f-script includes a config.h-sample which needs to be copied to config.h and edited appropriately. The config.h-sample are verbosely commented and contain the complete set of configuration options for each program. Edit this file with your favorite unix editor e.g. nano, pico, mcedit, sed.

The second step is to compile the code. This is automatically done by running make. If gcc throws a very long list of warnings or errors then you are probably missing the -dev package of an essential library as glibc, openssl or pcre. Please check the first few error message on which of these libraries need to be installed.

After successful compilation of a binary, you may install the program in its default place in /glftpd/bin by running make install, or in case you use different paths, you need to copy it into the right place by hand.

If you change settings in the config.h you have to recompile the binary using make and reinstall it using make install. This is necessary because the data of config.h is compiled into the binary.

Available Programs

f-pretraffic

f-pretraffic is for outgoing files, what zipscript is for incoming files: a statistic generator to show off speeds with a sitebot.

This script will watch the glftpd.log file for PRE: lines written by the pre script. It extracts the preed release name and size from those lines. Then it will watch the xferlog for outgoing transfers of that release. After a specific time (default is min 5min after pre, min 2min after last transfer), when all outgoing pretraffic should be finished, it will calculate a summary of the outgoing downloads. Among the stats are: number of times a release was downloaded, fastest user who downloaded, number of unique downloaders.

Key features:

2004-11-21 f-pretraffic-v1.0.zip 12kb

f-speed

A sane implementation of !speed and !bw

The current widely used !speed implementation goes like this:
The eggdrop calls a "sitewho" binary, which outputs a formatted user listing, then tcl parses and picks out the interesting variables, reformats them to finally output them to the channel. I cannot see a reason behind this reformatting and no special maskings applied.

Key features:

2008-02-05 f-speed-v1.2.zip 17kb - Changes

2004-11-17 f-speed-v1.0.zip 11kb

f-ftpbnc

A fully functional ftp port "bouncer" for glftpd and compatible ftp-daemons. It is written from scratch and uses a special state-machine driven structure.

Key features:

2008-01-30 f-ftpbnc-v1.6.zip 28kb - Changes

2005-10-30 f-ftpbnc-v1.5.zip 28kb - Changes

2005-07-04 f-ftpbnc-v1.1.zip 21kb - Changes

2004-11-09 f-ftpbnc-v1.0.zip 19kb

eggdrop Blowcrypt HOWTO

We all know EFnet is plain text from head to toe. Instead of letting Big Brother intensively watch your every notion, one can fight him with technology. In this case a simple crypto (blowfish) extension to make channels and queries more private, while staying on the big (and more or less stable) EFnet.

This HOWTO is a step-by-step tutorial on implementing blowcrypt using tcl in the dZSbot.tcl. It requires little tcl knowledge.

2003-04-04 eggblowcrypt-v1.0.txt 6kb

f-antileechracer

Meant to stop leech users from racing newly uploaded files from your site. It does this by checking the file's date before each RETR command. To minimize the delay a cscript RETR pre has on overall site speeds, this script is written to be utmost fast. It is pure C and uses the C preprocessor to only include the options you really need. At the same time reads no external config or userfiles (unless configed to). I highly discourage use of bash scripts as cscripts because it will slow down "feeled" site speed.

Another (not so obvious) use of this script is to disable racing from a nfs mounted read-only section. See the ONLYLEECHCHECK option in config.h.

2004-03-23 f-antileechracer-v1.0.zip 11kb

f-dirprecheck

The pre_dir_check script is an essential part of any good glftpd configuration: It will check directory names on mkdiring and by blocking stupid attempts keeps the site clean.

As a pre_dir_script is run on each mkdir on the ftp site, it must be very fast, as to not hinder performance. But at the same time powerful enough to allow detailed customization. This is script is a trade-off between the two. It has five check stages:

  1. A set of fast static check for NUKE upload or (incomplete)- uploads.
  2. Checking in the current directory, previous directories or other sections for duplicates.
  3. Run the new directory through a compiled-in set of regular expressions to block unwanted directories.
  4. Prevent mkdir of a directory with the same name as its parent. Deep annoying paths like ABC/ABC/ABC/ cannot be created.
  5. Added cross-section checking for multi-section site so that a rls cannot be in uploaded in two sections at once.

Together these stages keep a site sufficiently clean.

2005-09-04 f-dirprecheck-v1.1.zip 13kb - Changes

2004-03-23 f-dirprecheck-v1.0.zip 12kb

f-ircpasschk

Released due to recent events: This script is a remedy for the insecure IRC !invite user pass found on most sitebots. To cure this weakness, this passchk does not use plain text username and password. Instead it will authenticate a user by checking a hashed string containing his username, password and the sitename.

2004-03-23 f-ircpasschk-v1.0.zip 12kb


Valid XHTML 1.1! Valid CSS!