Article View: alt.privacy.anon-server
Article #247505Re: uinmyn 0.06
From: Zax
Date: Thu, 24 Mar 2011 21:25
Date: Thu, 24 Mar 2011 21:25
65 lines
3523 bytes
3523 bytes
On Tue, 15 Mar 2011 10:46:23 +0000 (GMT), StealthMonger wrote in
Message-Id: <20110315104623.F320B81403@fleegle.mixmin.net>:
> Given a (short) list of URLs, uinmyn-fetch-body.py generates a random
> key for the encryption and hsub of the reply, saves the key in a local
> database, and constructs the body of the request, encrypted and ready
> to send through a remailer chain.
Hi StealthMonger,
Just taken a look at your uinmyn-fetch-body.py and would suggest you
consider the minor patch below.
In summary:
Using the long keyid to specify the GPG recipient instead of
send@is-not-my.name avoids a potential risk if anyone starts posting
fake Nymserver keys for the unwary to download.
I removed the Base64 import and used the internal encode('base64').
Don't think this makes much difference unless you're catching
exceptions. It just saves an import.
Casting the Base64 output as a string (using %s) prevents a potential
concatenation error should the Base64 output be all numeric, resulting
in "key" being an Integer. This would cause:
TypeError: cannot concatenate 'str' and 'int' objects
I also changed the gpgproc.stdin.write to the same format, more for
consistency than any actual issue.
--- uinmyn-fetch-body.py 2011-03-23 18:07:32.000000000 +0000
+++ uinmyn-fetch-body.sc.py 2011-03-24 20:44:30.000000000 +0000
@@ -12,23 +12,25 @@
# url@is-not-my.name, and writes it to standard output.
from os import urandom
-from base64 import standard_b64encode
import sys, os, time
import pprint
from subprocess import Popen, PIPE
UINMYN_PENDING_REQUESTS = sys.argv[1]
+NYMSERV_KEY = '94F204C28BF00937EFC85D1AFF4DB66014D0C447'
# same key for both encryption and hsub:
-key = standard_b64encode(urandom(15))
+key = urandom(15).encode('base64')
-gpgproc = Popen('gpg -e -a -r send@is-not-my.name --trust-model always
--no-emit-version --batch', shell=True, stdin=PIPE)
-gpgproc.stdin.write("KEY " + key + '\n')
+gpgcmd = 'gpg --armor --encrypt --recipient %s ' % NYMSERV_KEY
+gpgopts = '--trust-model always --no-emit-version --batch'
+gpgproc = Popen(gpgcmd + gpgopts, shell=True, stdin=PIPE)
+gpgproc.stdin.write("KEY %s\n" % key)
urls = [time.time()] # time-tag precedes the urls in the db entry
for line in sys.stdin.readlines():
urls.append(line.rstrip())
- gpgproc.stdin.write('SOURCE ' + line.rstrip() + '\n')
+ gpgproc.stdin.write('SOURCE %s\n' % line.rstrip())
gpgproc.stdin.close()
Technical Details
Message-ID:
<slrniondms.tct.admin@fleegle.mixmin.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin.stu.neva.ru!news.mixmin.net!.POSTED.fleegle.mixmin.net!not-for-mailReferences:
<20110315104623.F320B81403@fleegle.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <slrniondms.tct.admin@fleegle.mixmin.net> Subject: Re: uinmyn 0.06 Date: Thu, 24 Mar 2011 21:25:48 +0000 From: Zax <admin@mixmin.net> References: <20110315104623.F320B81403@fleegle.mixmin.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!goblin3!goblin1!goblin.stu.neva.ru!news.mixmin.net!.POSTED.fleegle.mixmin.net!not-for-mail Newsgroups: alt.privacy.anon-server Organization: Mixmin Injection-Date: Thu, 24 Mar 2011 21:25:48 +0000 (UTC) Injection-Info: news.mixmin.net; posting-host="fleegle.mixmin.net:2002:5285:676::1"; logging-data="21103"; mail-complaints-to="abuse@mixmin.net" User-Agent: slrn/pre1.0.0-26 (Linux) Lines: 64 X-Original-Bytes: 3300