🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #198008

Re: Shell Script Question

#198008
From: Anonymous via the Cypherpunks To...
Date: Mon, 05 Dec 2005 15:04
180 lines
4793 bytes
On Mon, 05 Dec 2005 13:20:05 +0100, Nomen Nescio wrote:

> On Sun, 04 Dec 2005 19:13:23 +0000, TwistyCreek wrote:
> 
>> retired hobbyist wrote:
>> 
>>>  I am trying to run mixmaster via a little shell script, which asks me
>>>  for the file name of the file that I want mixmaster to mail.
>>>  
>>>  If I run the command in the konsole, it works, but if I run it with
>>>  the shell, the shell doesn't seem to be interpreting the asterisk
>>>  wildcard.
>> 
>> Something makes Mixmaster choke on Pan's file names when run outside the
>> console (from a script). Ran across the same problem myself. It might
>> have something to do with the @ character, but I'm not sure. Here's how
>> I got around it. Note, this is from memory I'm not near the box where I
>> set this up. Not cut and paste, so run at your own risk. ;)
>> 
>> #################################################### ## Begin script to
>> deal with Pan file names and send ## Mix messages from Pan's sendlater
>> directory ####################################################
>> #!/bin/bash cd ~/.pan/messages/folders/pan.sendlater for a in `ls *.msg`
>>   do
>>     pynoner $a
>>     mv $a tmp.msg
>>     ~/Mix/mixmaster tmp.msg
>>     rm tmp.msg
>> done;
>> exit 0
>> 
>> ########################################### # End script
>> ###########################################
>> 
>> The 'pynoner' command is a Python script I use to sanitize messages
>> saved with Pan's 'Send Later' option so I don't have to mess with
>> different posting profiles, remembering to remove signatures, stuff like
>> that. I just hit the "later" button and let cron check the folder from
>> time to time for messages. ;)
>> 
>> Here's a python script that should work. Again, from memory and untested
>> as it appears here.
>> 
>> ##################################################### # Begin pynoner -
>> Python script to scrub normal posts
>> #####################################################
>> 
>> #! /usr/bin/python
>> 
>> import string
>> import os
>> import sys
>> lines = 0
>> 
>> infile = open(sys.argv[1], 'r')
>> message = infile.readlines()
>> infile.close()
>> outfile = open("tempfile.txt", 'w')
>> outfile.write('To: mail2news@dizum.com\n') while
>> (message[lines].strip()):
>> 	if message[lines].startswith('Subject: '):
>> 		outfile.write(message[lines])
>> 	if message[lines].startswith('Newsgroups: '):
>> 		outfile.write(message[lines])
>> 	if message[lines].startswith('References: '):
>> 		outfile.write(message[lines])
>> 	if message[lines].startswith('Followup-To: '):
>> 		outfile.write(message[lines])
>> 	lines+=1
>> for x in range(len(message[lines:])):
>> 	if message[lines].startswith('-- '):
>> 		outfile.close()
>> 		break
>> 	outfile.write(message[lines])
>> 	x += 1
>> 	lines += 1
>> outfile.close()
>> os.remove(sys.argv[1])
>> os.rename('tempfile.txt', sys.argv[1])
>> 
>> ##################################################### # End pynoner
>> #####################################################
>> 
>> Hope this helps! Hope it works too. ;)
> 
> Thank you again for these scripts.
> 
> The two of them are working in tandem, and are impressive in the way they
> turn Pan into a remailer: using the two scripts, or even the first one by
> itself, I can now compose or reply to a usenet post and send it with
> complete anonymity through a chain of remilers, and do it as easily as I
> would if I were sending it in the clear.

Can something like this be used with windows?





















































































Technical Details
Message-ID: <20051205150459.D19E6170EF@mail.cypherpunks.to>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.kawaly.20141024.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!news.dizum.com!sewer-output!mail2news
References: <20051204174726.71683.qmail@web36405.mail.mud.yahoo.com>

Show Full Headers
Complete Article Headers
Message-ID: <20051205150459.D19E6170EF@mail.cypherpunks.to>
Subject: Re: Shell Script Question
Date: Mon, 05 Dec 2005 15:04:59 +0000
From: Anonymous via the Cypherpunks Tonga Remailer <nobody@cypherpunks.to>
References: <20051204174726.71683.qmail@web36405.mail.mud.yahoo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.kawaly.20141024.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!news.dizum.com!sewer-output!mail2news
Comments: This message did not originate from the Sender address above.
 It was remailed automatically by anonymizing remailer software.
 Please report problems or inappropriate use to the
 remailer administrator at <abuse@cypherpunks.to>.
Newsgroups: alt.privacy.anon-server
Mail-To-News-Contact: abuse@dizum.com
Organization: mail2news@dizum.com
Lines: 180