#1  
Old 9th May 2006, 17:57
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,148
Thanks: 4
Thanked 55 Times in 51 Posts
Default Auto-Verify at Spamcop

Hiya

I have gotten myself now a spamcop account where I just can forward spam to. However for spamcop to finally accept the spams I do have to go on their site and then manually submit (just pressing a button) my spam.

Now, I thought this should be automated:

1.) I put the spam into a "spamfolder"
2.) A cron goes through the spamfolder and forwards all spam to the special spamcop email address that I was given upon registration
3.) Spamcop.net returns an email containing a link to manually verify this is spam
--> Now comes the tricky part
4.) Open that link and then submit the form (if any is present)

Any suggestions on how this can be done (especially part 4)?
Reply With Quote
Sponsored Links
  #2  
Old 9th May 2006, 18:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Have a look at Snoopy: http://sourceforge.net/projects/snoopy/
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 16th May 2006, 16:55
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,148
Thanks: 4
Thanked 55 Times in 51 Posts
Default

Back from the hospital - server still running - and having some "nice" amount of spam accumulated I will ahve a look at snoopy and try to automate this

Thx for pointing this out to me.
Reply With Quote
  #4  
Old 19th May 2006, 20:15
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,148
Thanks: 4
Thanked 55 Times in 51 Posts
Default

Hmmm, I'm at a deadend right now.

I have this spam here (not yet submitted) and DON'T SUBMIT IT!!!:
http://www.spamcop.net/sc?id=z948064...0cd56c1bd80f5z

and I have written a small php script to be found here:

http://www.roleplayer.org/spamcop/in...0cd56c1bd80f5z

which is looks like this:

PHP Code:
<?php

function displayArray($aArray) {
    if (
is_array($aArray) && (count($aArray) > 0)) {
        print(
"<table border=1>");
        print(
"<tr><th>Key</th><th>Value</th></tr>");
        foreach (
$aArray as $aKey => $aValue) {
            print(
"<tr>");
            if (!
is_array($aValue)) {
                if (empty(
$aValue)) {
                    print(
"<td>$aKey</td><td><i>$aValue</i></td>");
                } else {
                    print(
"<td>$aKey</td><td>$aValue</td>");
                }
            } else {
                print(
"<td>$aKey(array)</td><td>");
                
displayArray($aValue);
                print(
"</td>");
            }
            print(
"</tr>");
        }
        print(
"</table>");
    } else {
        print(
"<i>empty or invalid</i>");
    }
}

$offender = array("type""master""info""sc_comment");
$form_vars = array("action""spamid""crc""date""source""reports");

$data $_GET["data"];

$data explode("sc?id="$data);
$data $data[1];

echo 
"SC-ID: " $data;

if(
$data == "") {
    echo 
"done";
    exit;
}

echo 
"<hr>";

require_once(
"Snoopy.class.php");

$snoopy = new Snoopy;

$snoopy->fetch("http://www.spamcop.net/sc?id=" $data);

$results $snoopy->results;

$results explode('<form action="/sc"'$results);
$results $results[1];

if(
$results == "") {
    echo 
"done";
    exit;
}

$i substr_count($results'name="send');

while (
$i 0) {

    foreach(
$offender as $val) {

        
// Get Field Value
        
$findme 'name="' $val $i '"';
        
$offset strlen($findme);
        
$pos_start strpos($results$findme) + $offset;
        
$pos_end strpos($results">"$pos_start);
        
$res substr($results$pos_start$pos_end);    
        
$res explode('"'$res);
        
$res $res[1];

        
$submit_vars["send".$i] = "on";
        
$submit_vars[$val.$i] = $res;

    }

    
$i--;

}

$submit_vars["submit"] = "Send Spam Report(s) Now";

foreach(
$form_vars as $val) {

    
// Get Field Value
    
$findme   'name="' $val '"';
    
$offset strlen($findme);
    
$pos_start strpos($results$findme) + $offset;
    
$pos_end strpos($results">"$pos_start);
    
$res substr($results$pos_start$pos_end);    
    
$res explode('"'$res);
    
$res $res[1];

    
$submit_vars[$val] = $res;

}

displayArray($submit_vars);


$snoopy = new Snoopy;
    
$submit_url "http://www.spamcop.net/sc";


if(
$snoopy->submit($submit_url,$submit_vars)) {
    while(list(
$key,$val) = each($snoopy->headers)) {
        echo 
$key.": ".$val."<br>\n";
    }
    echo 
"<p>\n";
    echo 
"<PRE>".htmlspecialchars($snoopy->results)."</PRE>\n";
} else {
    echo 
"error fetching document: ".$snoopy->error."\n";
}


?>
So I'm parsing all the relevant information and submit that stuff through putty however it does not work. You see in the array all data that is being posted by POST
Reply With Quote
  #5  
Old 22nd May 2006, 10:57
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,148
Thanks: 4
Thanked 55 Times in 51 Posts
 
Default

This thread here can be closed --> http://www.howtoforge.com/forums/showthread.php?t=4442
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
auto start script linuxuser1 Desktop Operation 7 23rd May 2009 14:12
req: Bash / Script to auto kill PID if it's needed.... edge Programming/Scripts 8 14th March 2006 00:31
reason: 550 Sender verify failed misterm Installation/Configuration 0 13th March 2006 18:05
Virtual Users And Domains With Postfix, Courier And MySQL: POP/IMAP auto reply todgerme HOWTO-Related Questions 3 11th March 2006 14:53
Auto kill a 'hangin' process after xx minutes.. edge Server Operation 0 10th March 2006 20:16


All times are GMT +2. The time now is 15:30.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.