<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: A really fun programming project. Operation spamstopper! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146435#M717934</link>
    <description>I have taken the last shell script and made changes. I'm still a little stuck.&lt;BR /&gt;&lt;BR /&gt;I messed $IPB line for a while.&lt;BR /&gt;What I want it to do is this:&lt;BR /&gt;&lt;BR /&gt;If the IP line outputs 192.168.0.15&lt;BR /&gt;I want the IPB line to ouput 192.168.0&lt;BR /&gt;B stands for block.&lt;BR /&gt;&lt;BR /&gt;Believe it or not I can't figure it out.&lt;BR /&gt;&lt;BR /&gt;In Linux shell scripting the tabs come out as \t. This is a Linux issue and I'll go to that forum for help there.&lt;BR /&gt;&lt;BR /&gt;The \t comes out as a proper tab with the Korn shell and HP-UX&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Linux version. HP-UX working version uses /usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;INPUTFILE=/var/mail/spam&lt;BR /&gt;TFILE1=/tmp/spam1.$$.dat&lt;BR /&gt;TFILE2=/tmp/spam2.$$.dat&lt;BR /&gt;&lt;BR /&gt;cat $INPUTFILE | grep -i received &amp;gt; $TFILE1&lt;BR /&gt;&lt;BR /&gt;while read LINE&lt;BR /&gt;do&lt;BR /&gt;  IP=`expr "${LINE}" : ".*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*"`&lt;BR /&gt;  IPB=`expr "${LINE}" : ".*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*"`&lt;BR /&gt;  if [ ${?} -eq 0 ]&lt;BR /&gt;  then&lt;BR /&gt;    echo ${IP} "\t\tWe charge \$900 storage fee per unsolicited message." &amp;gt;&amp;gt; $TFILE2&lt;BR /&gt;#    echo ${IPB} "\t\tWe charge \$900 storage fee per unsolicited message." &amp;gt;&amp;gt; $TFILE2&lt;BR /&gt;  fi&lt;BR /&gt;done &amp;lt; $TFILE1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm handing out points to those whose scripts I've tested. If you don't get a rabbit testing did not produce proper output. &lt;BR /&gt;&lt;BR /&gt;Karthik SS's sed version produced a little more than IP addresses. &lt;BR /&gt;&lt;BR /&gt;This is the output&lt;BR /&gt;&lt;BR /&gt;Received:&lt;BR /&gt;from&lt;BR /&gt;met.police.uk&lt;BR /&gt;(modemcable090.154-70-69.mc.videotron.ca&lt;BR /&gt;[69.70.154.90])&lt;BR /&gt;Received:&lt;BR /&gt;from&lt;BR /&gt;&lt;BR /&gt;It was hard work.  This is so much fun I'm going to keep trying until I've tested everyone's work.&lt;BR /&gt;&lt;BR /&gt;That will take time so be patient. I may be acting anal, but I think its important to test the scripts and give rabbbits to those that produce near perfect output.&lt;BR /&gt;&lt;BR /&gt;I'm having fun. How about you?&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Wed, 17 Dec 2003 23:28:28 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2003-12-17T23:28:28Z</dc:date>
    <item>
      <title>A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146412#M717911</link>
      <description>I have a rather extensive database of spammers in my /etc/mail/access database.&lt;BR /&gt;&lt;BR /&gt;I've compiled it all by hand.&lt;BR /&gt;&lt;BR /&gt;I got the bright idea to create am account on my server called spam.&lt;BR /&gt;&lt;BR /&gt;I forward all unsolicited emails to that account.&lt;BR /&gt;&lt;BR /&gt;I'm attaching a nice sample file.&lt;BR /&gt;&lt;BR /&gt;I have processed it as follows and need help to accomplish my goals.&lt;BR /&gt;&lt;BR /&gt;cat filename | grep -i recieved&lt;BR /&gt;&lt;BR /&gt;gets this data.&lt;BR /&gt;&lt;BR /&gt;Received: (from invest@localhost)&lt;BR /&gt;Received: from met.police.uk (modemcable090.154-70-69.mc.videotron.ca [69.70.154.90])&lt;BR /&gt;Received: from 102.183.181.197 by smtp.jur.kun.nl;&lt;BR /&gt;Received: (from invest@localhost)&lt;BR /&gt;Received: from wozenilek.de ([211.114.193.243])&lt;BR /&gt;Received: from 110.186.71.219 by smtp.cc.shibaura-it.ac.jp;&lt;BR /&gt;Received: (from invest@localhost)&lt;BR /&gt;Received: from dublinia.ie (OL186-15.fibertel.com.ar [24.232.15.186])&lt;BR /&gt;Received: from 34.83.110.48 by smtp.optifit.de;&lt;BR /&gt;Received: (from invest@localhost)&lt;BR /&gt;Received: from augddzpd.regenerousity.com ([65.208.147.35])&lt;BR /&gt;Received: from investmenttool.com (66.92.143.194)&lt;BR /&gt;Received: from yjuhr.regenerousity.com (HELO yjuhr) (169.254.98.41)&lt;BR /&gt;&lt;BR /&gt;What I actually need is those numeric IP addresses.&lt;BR /&gt;&lt;BR /&gt;My current format has me input into the access file this data:&lt;BR /&gt;&lt;BR /&gt;169.254.98.41&lt;BR /&gt;169.254.98&lt;BR /&gt;&lt;BR /&gt;This blocks the originating IP and its 255 class C address block. Its like using a nuclear weapon but thus far its been 95% effective.&lt;BR /&gt;&lt;BR /&gt;Intended output is thus&lt;BR /&gt;&lt;BR /&gt;169.254.98.41 &lt;TAB&gt; &lt;TAB&gt; We charge $500 storage fee per unsolicited message.&lt;BR /&gt;&lt;BR /&gt;Want a rabbit? Take this file and give me a shell script to give me my output. I'll insert the checks so none of yahoos mail servers and my mailservers end up getting blocked.&lt;BR /&gt;&lt;BR /&gt;I know. I'm lazy, but I'm under the weather and tired of cut and paste.&lt;BR /&gt;&lt;BR /&gt;I will test scripts prior to awarding points. All efforts get something.&lt;BR /&gt;&lt;BR /&gt;If perl is better, go for it, I need those numeric IP addresses. I don't care about the domain name, most of those are forged anyway.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/TAB&gt;&lt;/TAB&gt;</description>
      <pubDate>Tue, 16 Dec 2003 21:27:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146412#M717911</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-16T21:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146413#M717912</link>
      <description>It would become something like this:&lt;BR /&gt;cat filename | grep -i 'received' | perl -n -e 'print /.*[^0-9]([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)[^0-9].*/ ; print "\t\tWe charge $500 storage fee per unsolicited message.\n"' | grep '^[0-9]'&lt;BR /&gt;&lt;BR /&gt;The latter will filter out errors due to lines not containing a IP addres...&lt;BR /&gt;&lt;BR /&gt;Only lines it will fail are ones ending with an IP address, but since there are none in your example...</description>
      <pubDate>Wed, 17 Dec 2003 03:07:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146413#M717912</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2003-12-17T03:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146414#M717913</link>
      <description>I think this does what you want.&lt;BR /&gt; &lt;BR /&gt;perl -n -e 'if(/.*\D(\d+\.\d+\.\d+\.\d+).*/){print "$1\t\tWe charge $500 storage fee per unsolicited message\n"}' datafile</description>
      <pubDate>Wed, 17 Dec 2003 03:25:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146414#M717913</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-17T03:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146415#M717914</link>
      <description>Duh!&lt;BR /&gt; &lt;BR /&gt;Please change the "$500" to "\$500" otherwise you'll be storing for free!</description>
      <pubDate>Wed, 17 Dec 2003 03:30:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146415#M717914</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-17T03:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146416#M717915</link>
      <description>Hi SEP,&lt;BR /&gt;i wanted to do it using shell-scripting. Not so nice and compact like perl, but an interesting exercise!&lt;BR /&gt;&lt;BR /&gt;sed 's/[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/X&amp;amp;X/g' BEASE_TEXT_FILE.txt | tr "X" "\012" | egrep [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the above simple :) set of command extract the IP ADDRESS, the remainig is trivial....&lt;BR /&gt;&lt;BR /&gt;MEGACOMMAND | while read IPADDR&lt;BR /&gt;do&lt;BR /&gt;echo "$IPADDR   We charge \$500 storage fee per unsolicited message. "&lt;BR /&gt;done &amp;gt; YOUR_SUBSEQUENT_PROCESSING_CMD_FILE&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  Massimo</description>
      <pubDate>Wed, 17 Dec 2003 08:06:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146416#M717915</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-12-17T08:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146417#M717916</link>
      <description>Ok,&lt;BR /&gt; &lt;BR /&gt;The shell route looks fun so &lt;BR /&gt; &lt;BR /&gt;cat filename | grep -i received | while read a; do IP=`expr "$a" : ".*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\)"`; [ $IP ] &amp;amp;&amp;amp; /usr/bin/echo "$IP\t\tWe charge \$500 storage fee per unsolicited message."; done&lt;BR /&gt; &lt;BR /&gt;Thi sdoe sthe whole thing in a one line shell script.  The /usr/bin/echo is important because the shell builtin one doesn't interpret the \t as a tab.</description>
      <pubDate>Wed, 17 Dec 2003 08:51:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146417#M717916</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-17T08:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146418#M717917</link>
      <description>Mark, I say just one thing: Beaten :)&lt;BR /&gt;&lt;BR /&gt;Your expr is very nice, i was looking for something similar but i didn't know, so i wordarounded...&lt;BR /&gt;&lt;BR /&gt;Thanks for the lesson :)&lt;BR /&gt;&lt;BR /&gt;  Massimo</description>
      <pubDate>Wed, 17 Dec 2003 09:07:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146418#M717917</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-12-17T09:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146419#M717918</link>
      <description>Massimo :)&lt;BR /&gt; &lt;BR /&gt;Actually, I don't think it's fool-proof but I think that given that SEP is grepping "received" lines from an e-mail we'll probably get away with it.&lt;BR /&gt; &lt;BR /&gt;I thought about trying to get his exceptions list in there as well.  I can feel it's a simple thing to do if we have a file of IP's that we don't charge for storage :) but I just can't see it !</description>
      <pubDate>Wed, 17 Dec 2003 09:13:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146419#M717918</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-12-17T09:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146420#M717919</link>
      <description>Not an answer - but just curious how you are trapping "unsolicited" email to spam@yourdomian.com&lt;BR /&gt;&lt;BR /&gt;You have to be careful with automation....&lt;BR /&gt;&lt;BR /&gt;What if someone has a case of fat finger syndrome - and mis-types your email address - I assume that if the user does not exist - then it goes to your spam account - and then you automatically block them!&lt;BR /&gt;&lt;BR /&gt;I too block a lot of spam and have some pretty cool rules in place...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 09:45:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146420#M717919</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-12-17T09:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146421#M717920</link>
      <description>Caveat 1:&lt;BR /&gt;&lt;BR /&gt;When you cut and paste the script, keep in mind that its a 2 line script so you may have to join lines after the cut and paste.&lt;BR /&gt;&lt;BR /&gt;Caveats 2 &amp;amp; 3:&lt;BR /&gt;In creating your original file you want to make sure you're only grabing the originator and not the poor guy grabbed on a hop.&lt;BR /&gt;&lt;BR /&gt;Also, you may encourage them to send you more spam if you make them mad, though I salute your valor.&lt;BR /&gt;&lt;BR /&gt;Here is the script:&lt;BR /&gt;&lt;BR /&gt;grep [0123456789] $1 | sed -e"s/\[//g" -e"s/\]//g" -e "s/(//g" -e"s/)//g" &amp;gt; .um2&lt;BR /&gt;awk ' { for (idx1=1;idx1&amp;lt;=NF;idx1++) {if (match($idx1,"[0-9][0-9]*\.[0-9][0-9]*\&lt;BR /&gt;.[0-9][0-9]*\.[0-9][0-9]*")&amp;gt;0) {printf ("%s\t\t We charge $500 storage fee per u&lt;BR /&gt;nsolicited message\n",$idx1)};} }' &amp;lt;.um2</description>
      <pubDate>Wed, 17 Dec 2003 09:53:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146421#M717920</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2003-12-17T09:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146422#M717921</link>
      <description>Here's one that has stumped me - I get about 5000 of these as day:&lt;BR /&gt;&lt;BR /&gt;Dec 17 07:13:46 myserver sendmail[2555]: hBHFDj9J002555: &lt;W_GALLAGHERIV&gt;... User unknown&lt;BR /&gt;Dec 17 07:13:46 myserver sendmail[2555]: hBHFDj9J002555: from=&amp;lt;&amp;gt;, size=3587, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[213.86.143.191]&lt;BR /&gt;&lt;BR /&gt;Sort of brute force guessing for users....&lt;BR /&gt;&lt;BR /&gt;According to the RFC  - I am not allowed to block from=&amp;lt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Anyone else have this issue?&lt;BR /&gt;&lt;BR /&gt;I've thought of adding ip's to my iptables - and blocking there - cause with sendmail I am just wasting cpu...&lt;BR /&gt;&lt;BR /&gt;SEP - sorry if I'm out of line posting in your thread - but I thought this was a good topic...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;&lt;BR /&gt;&lt;/W_GALLAGHERIV&gt;</description>
      <pubDate>Wed, 17 Dec 2003 10:09:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146422#M717921</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2003-12-17T10:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146423#M717922</link>
      <description>I have no problem with any of the posts, even the last.&lt;BR /&gt;&lt;BR /&gt;I will test these today if possible. I don't have the file at work, but can obtain it via ftp.&lt;BR /&gt;&lt;BR /&gt;I think there are very good applications for this utility once its done. That perl answer looks wonderful.&lt;BR /&gt;&lt;BR /&gt;I think there are going to be a lot of rabbits hopping around this script.&lt;BR /&gt;&lt;BR /&gt;Once I get something working, I'll award 10 points. Anything that tests out correctly but  isn't used will get 9. If it fails on testing ,I'll be creative.&lt;BR /&gt;&lt;BR /&gt;I may need additional help to have the script check a list of ips that can not be added to the bounce list(my dad's ip, my own ip block for example.).&lt;BR /&gt;&lt;BR /&gt;I shall get back to you.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Dec 2003 11:45:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146423#M717922</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-17T11:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146424#M717923</link>
      <description>Attached is a perl script that I've been using for a couple years to pull IPs directly from a unix mailbox containing only offensive material. I hope it is self-explanatory.&lt;BR /&gt;&lt;BR /&gt;perl direct.pl &amp;lt; mailbox &amp;gt; iplist</description>
      <pubDate>Wed, 17 Dec 2003 13:33:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146424#M717923</guid>
      <dc:creator>Jordan Bean</dc:creator>
      <dc:date>2003-12-17T13:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146425#M717924</link>
      <description>Jordon, &lt;BR /&gt;&lt;BR /&gt;I love it.&lt;BR /&gt;&lt;BR /&gt;I may need to name a child after you.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 17 Dec 2003 13:42:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146425#M717924</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-17T13:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146426#M717925</link>
      <description>I use this to validate IP's and subnet masks:&lt;BR /&gt;&lt;BR /&gt;###############################################################################&lt;BR /&gt;# validate IP address&lt;BR /&gt;###############################################################################&lt;BR /&gt;sub ValidateIPaddr {&lt;BR /&gt;   ############################################################################&lt;BR /&gt;   # save the "passed" String IP address&lt;BR /&gt;   ############################################################################&lt;BR /&gt;      my ($IPaddrSTR) = @_;&lt;BR /&gt;   ############################################################################&lt;BR /&gt;   # validate the IP address - notes: ZERO (0) leading IP addresses are octal&lt;BR /&gt;   #                           and we are NOT going to handle that - though it&lt;BR /&gt;   #                           can easily be done - I consider that to be an&lt;BR /&gt;   #                           error because system routines do not return IP's&lt;BR /&gt;   #                           in octal string format!!!  ie: 192.168.026.0 is&lt;BR /&gt;   #                           NOT 192.168.26.0, it is 192.168.22.0 (decimal)&lt;BR /&gt;   ############################################################################&lt;BR /&gt;      if( $IPaddrSTR !~ m/^ ( \d | 1?\d\d | 2[0-4]\d | 25[0-5] )&lt;BR /&gt;                        \.  ( \d | 1?\d\d | 2[0-4]\d | 25[0-5] )&lt;BR /&gt;                        \.  ( \d | 1?\d\d | 2[0-4]\d | 25[0-5] )&lt;BR /&gt;                        \.  ( \d | 1?\d\d | 2[0-4]\d | 25[0-5] )&lt;BR /&gt;                        $&lt;BR /&gt;                        /xo) {&lt;BR /&gt;         return(1); # wrong anwser&lt;BR /&gt;      } else {&lt;BR /&gt;         return(0);&lt;BR /&gt;      }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 17 Dec 2003 13:56:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146426#M717925</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2003-12-17T13:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146427#M717926</link>
      <description>I'm going to have to buy some more rabbits.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 17 Dec 2003 14:30:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146427#M717926</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-17T14:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146428#M717927</link>
      <description>Hi SEP,&lt;BR /&gt;&lt;BR /&gt;I know that this is a STUPID script. But unfortunately it works :-(&lt;BR /&gt;&lt;BR /&gt;for i in `cat ssk`&lt;BR /&gt;do&lt;BR /&gt;echo $i&lt;BR /&gt;done | grep [0-9].[0-9].[0-9].[0-9]|grep -v - | sed s/\(//g | sed s/\)//g | sed s/'\['//g | sed s/'\]'//g | sed s/\$/"`echo "\t\t"`We charge \$500 storage fee per unsolicited message."/g&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And the output comes like this,&lt;BR /&gt;69.70.154.90            We charge $500 storage fee per unsolicited message.&lt;BR /&gt;102.183.181.197         We charge $500 storage fee per unsolicited message.&lt;BR /&gt;211.114.193.243         We charge $500 storage fee per unsolicited message.&lt;BR /&gt;110.186.71.219          We charge $500 storage fee per unsolicited message.&lt;BR /&gt;24.232.15.186           We charge $500 storage fee per unsolicited message.&lt;BR /&gt;34.83.110.48            We charge $500 storage fee per unsolicited message.&lt;BR /&gt;65.208.147.35           We charge $500 storage fee per unsolicited message.&lt;BR /&gt;66.92.143.194           We charge $500 storage fee per unsolicited message.&lt;BR /&gt;169.254.98.41           We charge $500 storage fee per unsolicited message.&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Wed, 17 Dec 2003 16:55:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146428#M717927</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-12-17T16:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146429#M717928</link>
      <description>Of course it has 2 tabs between the IP Addr and the message :-)&lt;BR /&gt;&lt;BR /&gt;69.70.154.90            We charge $500 storage fee per unsolicited message.&lt;BR /&gt;102.183.181.197         We charge $500 storage fee per unsolicited message.&lt;BR /&gt;&lt;BR /&gt;-Karthik S S</description>
      <pubDate>Wed, 17 Dec 2003 16:59:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146429#M717928</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-12-17T16:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146430#M717929</link>
      <description>I can do it with shell.&lt;BR /&gt;&lt;BR /&gt;I can do it with perl.&lt;BR /&gt;&lt;BR /&gt;I can do it whiled standing on my head or sitting down.&lt;BR /&gt;&lt;BR /&gt;This is truly a wonderful forum and I'm going to be a better shell programmer and perl programmer.&lt;BR /&gt;&lt;BR /&gt;I'm going to combine the concepts and create a perl version I can run via the web and a shell version.&lt;BR /&gt;&lt;BR /&gt;I'm going to add a check for a list of IP adresses to not ban, and build in the part that writes a second line knocking out the entire class C block the spam came from.&lt;BR /&gt;&lt;BR /&gt;I know its a nuclear weapon, but it is powerful.&lt;BR /&gt;&lt;BR /&gt;I'm under the weather and have maintenance until late this evening. I'll try and turn this around and hand out those rabbits before close of business Thursday.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 17 Dec 2003 17:14:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146430#M717929</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-17T17:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: A really fun programming project. Operation spamstopper!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146431#M717930</link>
      <description>Oh:&lt;BR /&gt;&lt;BR /&gt;Karthik S S&lt;BR /&gt;&lt;BR /&gt;I missed your congrats thread.&lt;BR /&gt;&lt;BR /&gt;Congrats. &lt;BR /&gt;&lt;BR /&gt;Nice hat. &lt;BR /&gt;&lt;BR /&gt;Enjoy Hogwarts.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 17 Dec 2003 17:16:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-really-fun-programming-project-operation-spamstopper/m-p/3146431#M717930</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-12-17T17:16:42Z</dc:date>
    </item>
  </channel>
</rss>

