blob: 917a4043ae4b1d96f5fddb7c8be32573ebf78fbb (
plain) (
blame)
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
31
|
--- ricochet.old Tue Jun 24 22:40:18 2003
+++ ricochet Wed Sep 24 16:33:42 2003
@@ -566,15 +566,14 @@
my ( $domain ) = @_;
$ua = new LWP::UserAgent;
$ua->agent("Ricochet/0.1 " . $ua->agent);
- my $req = new HTTP::Request POST => 'http://www.abuse.net/lookup.phtml';
- $req->content_type('application/x-www-form-urlencoded');
- $req->content("DOMAIN=$domain");
+ my $req = new HTTP::Request GET => "http://www.abuse.net/lookup.phtml?DOMAIN=$domain";
+ $ua->timeout(20);
my $res = $ua->request($req);
if ($res->is_success) {
my $content = $res->content;
return undef if $content =~ /no information for this domain/;
- my @matches = $content =~ /(\S+\@\S+)\s*<BR>/ig;
+ my @matches = $content =~ /<tt>(\S+\@\S+)<\/tt>/g;
return \@matches;
} else {
return undef;
@@ -607,7 +606,8 @@
sub initialize {
my $self = shift;
- my $rc = "$ENV{RICOCHET}" || "$ENV{HOME}/.ricochet"; $rc .= "/ricochetrc";
+ my $rc = "$ENV{RICOCHET}" || -d "$ENV{HOME}/.ricochet" ? "$ENV{HOME}/.ricochet" : "%%PREFIX%%/share/ricochet";
+ $rc .= "/ricochetrc";
Carp::croak "** Ricochet configuration file $rc doesn't exist. Aborting.\n" unless -e $rc;
open (RC, $rc);
grep {
|