🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #10755

Re: Binaries in NN?

#10755
From: J. Porter Clark
Date: Sun, 09 Jul 2006 03:45
78 lines
4476 bytes
Aaron Hsu <spam@sacrificumdeo.net> writes:

>Is there any chance of using nn to decode binaries? I noticed what
>seemed to be the ability to decode uuencoded articles, but I was
>hoping maybe there might be some method of decoding multi-part
>binaries in Yenc format or some such.

>If nn does not do this natively (and I wouldn't really blame it for
>not doing this, after all, nn is meant for *reading* news), is there a
>way to select a group of articles matching certain headers and
>download the appropriate parts in such form that they can be processed
>by an external program? Does anyone have any experience with this?

nn can handle uuencoded articles, and that's about it.  (There
are some cases of uuencoding that it misbehaves on.)

The best way I've found to handle yEncs is to save each article
into a separate file using "*" in the save filename (like "q*"),
then use a separate program (like "ydecode -k q*") to decode the
pieces.

There are some problems:

  1. The ydecode program that was written by Don Moore
  <bboy@bboy.net> seems to think that all article files are in
  "wire format" and need unescaping of dots at the beginning of
  the lines. nn already does the unescaping--what newsreader
  doesn't?--so I've had to patch ydecode.c to make it work (see
  below).  (There is a yydecode program out there, but I had
  similar problems with it.)

  2. ydecode does not handle extra copies of the same parts
  well.  So don't do that.  Sometimes this is hard to avoid,
  particularly when the poster is using a "stuttering" posting
  program.

  3. Sometimes there is corruption from missing parts or
  whatever.  If the file was posted with par2 files, what I do
  is to use ydecode -k to decode all of the files, good or bad,
  rename all the *.bad-* files to their proper names, and use
  the par2 program to attempt to recover the data.  Occasionally
  this even works!

I'm not an expert on this process, because I do it very
infrequently, so it could be that there is a much better way to
make it work.

I have never attempted downloading a MIME-encoded multipart
binary that turned out to be worth even half the trouble.

--- work/yencode-0.46/src/ydecode.c.orig	Fri Mar 15 23:29:14 2002
+++ work/yencode-0.46/src/ydecode.c	Sun Sep 28 09:47:03 2003
@@ -461,9 +461,9 @@
 					else if (*b == '\t')
 						Verbose("%s:%lu:%d: %s", y->input_filename, lineno + y->line_offset, linect+1,
 								  _("line begins with an unescaped TAB"));
-					else if (*b == '.' && *(b+1) != '.')
+/*					else if (*b == '.' && *(b+1) != '.')
 						Verbose("%s:%lu:%d: %s", y->input_filename, lineno + y->line_offset, linect+1,
-								  _("line begins with an unescaped single dot"));
+								  _("line begins with an unescaped single dot"));	jpc */
 				}
 				if (*(b+1) == '\r' || *(b+1) == '\n')
 				{
@@ -478,8 +478,8 @@
 
 			/* If this is the beginning of a line, and it's a plain dot, and the next character is also a dot,
 				move one character forward. */
-			if (linect == 0 && *b == '.' && *(b+1) == '.')
-				b++;
+/*			if (linect == 0 && *b == '.' && *(b+1) == '.')
+				b++;	jpc */
 
 			/* For all relevant characters, set char_escaped if it was escaped (for strict checking line length) */
 			if (*b != '\n' && *b != '\r')

-- 
J. Porter Clark <jpc@suespammers.org>
Technical Details
Message-ID: <HZ_rg.1168$rZ3.368@fe03.lga>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!transit4.readnews.com!news-out.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!hwmnpeer01.lga!news.highwinds-media.com!hw-filter.lga!fe03.lga.POSTED!53ab2750!not-for-mail
References: <rZidnT18G4BO9y3ZnZ2dnUVZ_qmdnZ2d@gvtc.com>

Show Full Headers
Complete Article Headers
Message-ID: <HZ_rg.1168$rZ3.368@fe03.lga>
Subject: Re: Binaries in NN?
Date: Sun, 09 Jul 2006 03:45:43 GMT
From: jpc@suespammers.org (J. Porter Clark)
References: <rZidnT18G4BO9y3ZnZ2dnUVZ_qmdnZ2d@gvtc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!transit4.readnews.com!news-out.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!hwmnpeer01.lga!news.highwinds-media.com!hw-filter.lga!fe03.lga.POSTED!53ab2750!not-for-mail
Newsgroups: news.software.nn
Keywords: multi part binaries decode yenc nn
Organization: http://www.angelfire.com/ego/porterclark/
User-Agent: nn/6.7.3
Lines: 78
X-Trace: idmkcnjgmiagocdegipmdeaccfclggkikgbnhidffogagmddgbkjcdnikodalfacfjiiogejoimhdcaiiaapnpaejcogbjiioleldjjegeeioagaogimgndfglalhbgpbcfagklmibllijll
NNTP-Posting-Date: Sat, 08 Jul 2006 20:45:43 MST