Remove some unused files
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cd404f354e
commit
b316845360
@ -1,45 +0,0 @@
|
||||
use Cwd qw (abs_path);
|
||||
use File::Basename qw (dirname);
|
||||
|
||||
my $root;
|
||||
BEGIN { $root = abs_path (dirname (__FILE__)) };
|
||||
use lib "$root/tools";
|
||||
|
||||
use ExtUtils::MakeMaker;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my %att = (
|
||||
NAME => 'FSFE Website', # Shut up MM warning only
|
||||
# The version of MakeMaker is sadly too old for MIN_PERL_VERSION
|
||||
# MIN_PERL_VERSION => 5.008,
|
||||
PREREQ_FATAL => 1,
|
||||
PREREQ_PM => {
|
||||
'Exporter' => 0,
|
||||
'Carp' => 0,
|
||||
'CGI' => 0,
|
||||
'Cwd' => 0,
|
||||
'DateTime' => 0, # Tested with 0.53
|
||||
'Encode' => 0, # Tested with 2.35
|
||||
'Fcntl' => 0,
|
||||
'File::Basename' => 0,
|
||||
'File::Copy' => 0,
|
||||
'File::Find::Rule' => 0,
|
||||
'File::Path' => 0,
|
||||
'Getopt::Std' => 0,
|
||||
'IO::Handle' => 0,
|
||||
'IO::Select' => 0,
|
||||
'HTML::TreeBuilder::XPath' => 0,
|
||||
'POSIX' => 0,
|
||||
'Socket' => 0,
|
||||
'Template' => 2.0, # Tested with 2.22
|
||||
'Text::Format' => 0,
|
||||
'URI' => 0, # tested with 1.54
|
||||
'XML::LibXSLT' => 0,
|
||||
'XML::LibXML' => 0
|
||||
});
|
||||
|
||||
MM->new (\%att) and print "All OK!\n";
|
||||
|
||||
# NO WriteMakefile! We do PREREQ checking only
|
@ -1,74 +0,0 @@
|
||||
#! /usr/bin/perl
|
||||
# This was taken from http://www.stopforumspam.com/forum/viewtopic.php?id=210
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
#
|
||||
# SpammerChk -- A PERL module for querying the StopForumSpam API
|
||||
# KEG -- 21 August 2008 -- Version 1.0.0
|
||||
#
|
||||
# Usage:
|
||||
# use SpammerChk;
|
||||
# $result = isSpammerIP(<IP address>);
|
||||
# $result = isSpammerEmail(<email address>);
|
||||
# $result = isSpammerUser(<username>);
|
||||
#
|
||||
# $result is either true or false
|
||||
#
|
||||
# Purpose:
|
||||
# This was written to allow dynamic checking of attempted YABB
|
||||
# Bulletin Board registrations against spammer reports in the
|
||||
# StopForumSpam database. The YABB software includes separate
|
||||
# sections for checking against the local ban lists for IP, email,
|
||||
# and username. This module was written to allow a final remote
|
||||
# check against reported spammers for each section.
|
||||
#
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
package SpammerChk;
|
||||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(isSpammerIP isSpammerEmail isSpammerUser);
|
||||
|
||||
use strict;
|
||||
use LWP::UserAgent;
|
||||
use XML::Simple;
|
||||
|
||||
my $url = 'http://www.stopforumspam.com/api';
|
||||
|
||||
sub isSpammerIP {
|
||||
my $ip = shift;
|
||||
return querySpammer($url . '?ip=' . $ip);
|
||||
}
|
||||
|
||||
sub isSpammerUser {
|
||||
my $user = shift;
|
||||
return querySpammer($url . '?username=' . $user);
|
||||
}
|
||||
|
||||
sub isSpammerEmail {
|
||||
my $address = shift;
|
||||
return querySpammer($url . '?email=' . $address);
|
||||
}
|
||||
|
||||
sub querySpammer {
|
||||
|
||||
my $reqURL = shift;
|
||||
my $response;
|
||||
|
||||
my $ua = LWP::UserAgent->new;
|
||||
|
||||
$ua->agent("SpammerChk/1.0.0");
|
||||
$ua->from('webmaster@fsfe.org');
|
||||
$ua->max_size(8192);
|
||||
|
||||
$response = $ua->get($reqURL);
|
||||
|
||||
if ($response->is_success) {
|
||||
|
||||
my $xml = new XML::Simple;
|
||||
my $data = $xml->XMLin($response->content);
|
||||
return $data->{'appears'} eq 'yes';
|
||||
|
||||
} else { return ""; }
|
||||
}
|
||||
1; # ??
|
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
c=/home/www/fsfe.org_htdig/htdig.conf
|
||||
l="$(printf %s "$QUERY_STRING" |sed -rn '1s;^(.*&)?l=([a-z-]+)(&.*)?$;\2;p')"
|
||||
q="$(printf %s "$QUERY_STRING" |sed -rn '1s;^(.*&)?q=([^&]+)(&.*)?$;\2;p')"
|
||||
|
||||
# htdig forces default config file if reading cgi-variabled directly
|
||||
# this would prevent multisite usage, overriding request instead
|
||||
unset REQUEST_METHOD
|
||||
|
||||
printf %s\\n\\n "Content-Type: text/html;charset=utf-8"
|
||||
|
||||
# htdig tries to escape non ascii characters.
|
||||
# since it is however not utf-8 clean it tends to escape single
|
||||
# octets in multibyte character sequences,
|
||||
# hence we use xmllint and sed to unescape the characters again
|
||||
/usr/lib/cgi-bin/htsearch -c "$c" "restrict=${l:-en}.html&words=${q}" \
|
||||
| tail -n+3 \
|
||||
| sed -r 's;&euro\;;\xa4;g' \
|
||||
| xmllint --html --encode iso-8859-1 - \
|
||||
| sed -r '2s;charset=iso-8859-1;charset=utf-8;' \
|
||||
| sed "s;#LANG;${l};"
|
Loading…
x
Reference in New Issue
Block a user