diff --git a/Rocksolid_Light/tools/nocem/nocemlist.php b/Rocksolid_Light/tools/nocem/nocemlist.php new file mode 100755 index 0000000..7d4b574 --- /dev/null +++ b/Rocksolid_Light/tools/nocem/nocemlist.php @@ -0,0 +1,127 @@ +#!/usr/bin/php +"; +$organization = ""; +$from = "from_address "; +$from_email = "\n"); +fwrite($header_file, "From: $from\n"); +fwrite($header_file, "Newsgroups: $spamgroup\n"); +fwrite($header_file, "Subject: @@NCM NoCeM notice $thishash spam/hide ($count $article)\n"); +fwrite($header_file, "Content-Type: text/plain; charset=utf-8; format=flowed\n"); +fwrite($header_file, "Content-Transfer-Encoding: 8bit\n"); +fwrite($header_file, "Organization: $organization\n"); +fclose($header_file); + +fwrite($nocem_file, "You may use this for hiding articles using NoCeM.\n"); +fwrite($nocem_file, "$scope.\n"); +fwrite($nocem_file, "This list is generated by $from_email.\n\n"); + +fwrite($nocem_file, "This message was signed using the following key:\n"); +fwrite($nocem_file, "$signing_key\n\n"); + +fwrite($nocem_file, "The GPG key needed to verify the signature of cancels\n"); +fwrite($nocem_file, "issued by $from_email is available at:\n"); +fwrite($nocem_file, "$key_location\n\n"); + +fwrite($nocem_file, "For information contact $contact.\n\n"); + +fwrite($nocem_file, "@@BEGIN NCM HEADERS\n"); +fwrite($nocem_file, "Version: 0.93\n"); +fwrite($nocem_file, "Issuer: $from_email\n"); +fwrite($nocem_file, "Type: spam\n"); +fwrite($nocem_file, "Action: hide\n"); +fwrite($nocem_file, "Count: ".$count."\n"); +fwrite($nocem_file, "Notice-ID: ".$thishash."\n"); + +fwrite($nocem_file, "@@BEGIN NCM BODY\n"); + +foreach($nocem_list as $list) { + fwrite($nocem_file, $list); +} + +fwrite($nocem_file, "@@END NCM BODY"); +fclose($nocem_file); +?> diff --git a/Rocksolid_Light/tools/nocem/nocempost.sh b/Rocksolid_Light/tools/nocem/nocempost.sh new file mode 100644 index 0000000..6bb8690 --- /dev/null +++ b/Rocksolid_Light/tools/nocem/nocempost.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +gpglocaluser="XXXXXXXX" +nntpserver="news.example.com" +nntpuser="nntpusername" +nntppassword="nntppassword" + +gpg2 --local-user $gpglocaluser --clearsign -a nocem.out + +newsserver=$nntpserver +today=$(date -u +%F-%H:%M) +id=$(od -xvAn -N8 < /dev/urandom | tr -cd 0-9a-f) +rpost $newsserver -U $nntpuser -P $nntppassword <<%end +$(