File: GetConf

package info (click to toggle)
proftpd 1.2.0pre9-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,392 kB
  • ctags: 2,648
  • sloc: ansic: 24,012; sh: 1,754; makefile: 536; perl: 281
file content (30 lines) | stat: -rwxr-xr-x 589 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl
# $Id: GetConf,v 1.2 1999/09/12 17:04:55 macgyver Exp $
#
# GetConf: Obtain a list of all ProFTPD configuration directives.
# Author: MacGyver aka Habeeb J. Dihu <macgyver@tos.net>
# Copyright(C) 1999, MacGyver.  All Rights Reserved.
#

foreach $arg (sort @ARGV) {
    open(FILE, $arg) || die("Unable to open $arg: $!");
    
    while(<FILE>) {
	next unless /^\s*static\s*conftable\s*([^\s_]*)_.*/;

	print "Module $1:\n";
	
	while(<FILE>) {
	    last if /\}\;/;
	    
	    if(/\{\s*"(.*)".*\}/) {
		print "  $1\n";
	    }
	}
	
	print "\n";
    }
    
    close(FILE);
}