🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #61867

Re: programming yenc decoder

#61867
From: Curt Welch
Date: Fri, 08 Nov 2002 15:43
59 lines
2663 bytes
kjhjk <kjhjkNOSPAM@hotmail.com> wrote:
> Hi,
>
> can you help me to ydecode a file ?
>
> * source file begins with

Never put =ybegin on a line by itself in a news article if you
want people to see it.  Anyone using a newsreader which supports
yEnc will think the rest of your article is yEnc data.

> =ybegin part=1 line=128 size=146094 name=test
> =ypart begin=1 end=146094
> ))=J*:tpsp*+,+*r*r**)8&#8482;z��������J]XZ*blsw-*****:*r***
>
> * my decoder output :
>
> FF EO 00 10 4A 46 49 46 00 01 02 01 00 48
>
> 5 bytes before "JFIF" sequence (4A 46 49 46)

You only show 4 bytes before JFIF

> * another decoder output :
>
> FF D8 FF EO 00 10 4A 46 49 46 00 01 02 00 48
> 6 bytes before "JFIF" sequence (4A 46 49 46)
>
> there are 6 bytes

My decoder output this for the data you included above:

 ff ff e0 00 10 4a 46 49

Maybe that is what your's also did?

> * what's wrong with my code ?
>
>   if ($car=61)��
>             $i:=$i+1
>             $car:=Code ascii($ligne�$i&#8222;)
>             $outputcar:=$car-64-42
>
>           else
>             $outputcar:=$car-42
>         endif

Looks correct other than the strange stuff inside ascii().

The 6 byte version is a valid JPG file, the 5 byte version isn't.

The data you posted does decode to a 5 byte version.  There seems to be a
^B missing from the yEnc data in order to make it decode correctly.  What
happened to that missing ^B?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20021108104338.720$GI@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <kjhjkNOSPAM-446B6C.13100008112002@news.completel.fr>

Show Full Headers
Complete Article Headers
Message-ID: <20021108104338.720$GI@newsreader.com>
Subject: Re: programming yenc decoder
Date: Fri, 08 Nov 2002 15:43:38 +0000
From: curt@kcwc.com (Curt Welch)
References: <kjhjkNOSPAM-446B6C.13100008112002@news.completel.fr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com BkklUczZ1kHYm2AKZTPxan@EEQ120PqMx9Fa25DCF8_x=ZR5r
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 58