Forum Moderators: open
This is a proxy server that will replace all occurences of Aaron on a web page with Nick ;)
#!/usr/bin/perl -w
#
use strict;
use HTTP::Daemon;
use HTTP::Status;
use LWP::UserAgent;
#
my $ua = new LWP::UserAgent;
my $server = HTTP::Daemon->new(LocalPort => 8080)
or die "Couldnīt start server\n";
#
while (my $client = $server->accept) {
CONNECTION:
while (my $answer = $client->get_request) {
if ($answer->method eq 'GET' and $answer->uri =~ /http:/) {
my $rq = new HTTP::Request('GET', $answer->url, $answer->headers);
my $r = $ua->request($rq);
if ($r->headers->header('Content-Type') =~ 'text/html') {
my $html = $r->content;
$html =~ s/Aaron/Nick/g;
$r->content($html);
}
$client->send_response($r);
} else {
$client->send_error(RC_FORBIDDEN);
}
}
$client->close;
undef $client;
}
but any tips about how a plugin do it? i did lookup msnd but didn't noticed anyting about inserting htmlcode/script by plugin.
As for the browser plugin I donīt really remember how to do it, but I think I remember that there is a way to register a callback that get called prior to rendering the html code in IE. I tried to find some code where I used that feature and that I wrote two years ago but couldnīt find it. I know there is something about that in MSDN but donīt have the time to look.
Sorry that I canīt be of more help.
Andreas