OldCog has asked for the wisdom of the Perl Monks concerning the following question:

Hi: I'm new to the forum and Perl. I'm a retired programmer with familiarity with Delphi,Clipper,FoxPro2,a little VBasic,Dos,Win31,Windows background. I've created a few HTML pages so far. I'm running XPPro SP2, Mozilla, and Outlook. I hope to load up a test IIS as soon as I create more disk space. I've just purchased a beginners Perl developers book (O'Reilly Lama), and that's as far as I've gone so far. I've got ActivePerl loaded and so far the "Hello world" code works on it. I'm anxious to go into the "meat" of the Perl. I was disappointed I could not find little published on DBI in the local shops. So for my problem, it just so happens that I'm starting Perl when I've got a spammer hacking into the system on occasion. (CNCGroup out of China.) So I'm wondering what Perl can do for me in user end system Monitoring, which isn't as fun as what as I intended to start with, creating pages,etc. What I need is a set of utilities that intercept my modem activity, and can control modem processes. That is, before the system can handle the info, I could simply terminate a process if I can determine the user is one who is listed on my database of IP addresses, or is within a domain. Back in the old days(you'll hear that alot from me.Ha!!!) we had a simple DOS utility that did just this for the old pre-internet COMPUTEL systems. There could exist Windows System utilities that accomplish this I suppose, and simply call the Windows Shell through Perl. This would be fine for the purpose of my stand alone problem, but I'd prefer to be cross platform. So I hope I'm clear hear and sorry if I'm not. I'm trying to clear the cob webs out of the noggin as I go along as it's been awhile since I programmed. Thanks for the help. Andy

Replies are listed 'Best First'.
Re: Using Perl to fight Spam
by moritz (Cardinal) on Jan 26, 2008 at 20:47 UTC
    Welcome to Perl land ;-)

    For starters I don't think you need a DBI book - there is very much online about it, and the DBI documentation is quite a good start.

    I don't quite understand your security problem, could you describe what's the problem, and how you want to improve your situation?

    It seems like you want to add another software layer, and hope that it improves security. Usually that doesn't work. It sounds like adding more walls to house to increase stability, when in fact the base needs to be reinforced.

    (BTW you can add paragraphs to your nodes with the <p> tags, that helps to improve readability. See Writeup Formatting Tips for details.)

      For starters I don't think you need a DBI book
      Agreed. And the only DBI book is way outdated and will be a waste of money IMHO. I'd like to see a newer edition though...
      For perl based spam protection try ASSP. It can probably do what you want already with very little work. Not to mention it's very very good :) http://assp.sourceforge.net/
Re: Using Perl to fight Spam
by pc88mxer (Vicar) on Jan 27, 2008 at 03:00 UTC
    This is probably more of an OS problem than a perl problem. That is, you first need to figure out how to determine which user is using your modem. Under a Unix-like system there are OS calls that can be made to figure this out (commands like fuser and ps), but I'm not sure what facilities exist for WinXP.

    Secondly, you might be better off just patching your OS and software so the guy can't break in. You might have re-install Windows and all of your apps, but you would be solving a lot of problems all at once by making your system secure. And even if you do figure out the modem thing, what will prevent the hacker from creating other mischief if you don't close up the security hole that's allowing him into your box in the first place?

    By the way, when you say "modem", are we talking about a telephone modem (and not a cable or DSL modem)? And is the hacker coming in through your broadband connection to use your telephone modem? to send spam?

Re: Using Perl to fight Spam
by Popcorn Dave (Abbot) on Jan 27, 2008 at 06:00 UTC
    I wish I had a Perl solution that I could point you to, but in the meantime you might try both Peer Guardian and a firewall - if you don't have one already. I've had good success with Sunbelt's Kerio firewall and the best thing is that both programs are free.

    HTH!


    Revolution. Today, 3 O'Clock. Meet behind the monkey bars.

    I would love to change the world, but they won't give me the source code

Re: Using Perl to fight Spam
by ww (Archbishop) on Jan 26, 2008 at 20:48 UTC
    See:
    1. c:\perldoc dbi which may diminish your dissatisfaction with the local book, perhaps better than book$.
    2. c:\perldoc win32 for one tool that may help you in the (hacker? spammer? which?) arena.