🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Free reliable wordcount utility available (final version)

#46342
From: Thomas J. Boschloo
Date: Sun, 03 Nov 2002 13:39
72 lines
4515 bytes
[X-posted from APAS and SC, I think users of PGP could use this draft
program to scan the swapfile from dos for words]

"Thomas J. Boschloo" wrote:
> 
> Before everyone in sci.crypt gets annoyed, you could use this utility
> that I have been writting and testing since last sunday to generate your
> own wordlists, so that is why I cross-posted. I know I am not a linguist
> but that is why I didn't post to a group about that kind of thing ;-)
> This program might also be useful for generating dictionary words out of
> any file type and of any size (as long as it fits in a long unsigned
> integer). Feel free to use it, I have a feeling that it is very robust
> though I could use some input on the checksum function I used (I know it
> is called a hash in the program but I am a CS person, not a
> cryptographer).

No remarks at all? Is my program that good since neither of you can find
any flaws in it? Anyways there will be a port to ANSI-C because I used
the wrong library for the maximum value of an integer and my Turbo C 2.0
compiler didn't warn me at all about this (I should have used INT_MAX
from limits.h instead of MAXINT from values.h).

Also, here is the hashfunction I used:

> /* calculate a hash of the string in 'buffer' */
> unsigned long calchash(char *buffer, const int bufsize)
> {
>         register int i;
>         unsigned long result;
> 
>         if(bufsize<1) return -1; /* wrong arguments */
>         buffer[bufsize-1]='\0'; /* doesn't matter, it's a hash anyways */
>         result=0; /* initiate hash */
>         i=0; while(buffer[i]!='\0')
>         {
>                 result=(result<<1)+(result>>1)+(unsigned long)buffer[i];
>                 i++;
>         }
>         return result;
> }

I think it mainly collides at small string sizes and I want to add a
negative value of the chars at the beginning of the unsigned long
'result' variable. You guys do know how to code in ANSI-C, don't you? Or
have you all switched to Java or something?

There is also an unchecked buffer in the program somewhere, but it
shouldn't raise any security concerns since this value can't be set by
the user and the compiled program is safe otherwise (at least from the
source I provided).

I would REALLY like some more input before I have to post a THIRD final
version in two weeks of so. I want to get it right the next time, better
yet, the version I used should have been right in the first place when I
signed it.

As to Zax, I think you would be better of using my MS-DOS compilation if
your Windows 2000 system allows it since it will be a lot safer running
from a sandbox with no access to the memory of any other process in any
way. I think you would agree knowing how security savvy you are, You
could also run from a Floppy with NTFS read-only access.. that would be
the safest thing I can think of.

Thanks,
Thomas

References: <http://home.hccnet.nl/t.j.boschloo/wordcnt.zip> (source +
8086 MS-DOS binary)
-- 
There are two types of people with Borderline disorder. The ones I like
and the ones I don't like.   - T.J. Boschloo
<home.hccnet.nl/t.j.boschloo>
Technical Details
Message-ID: <3DC526FC.CBCFE9B6@hccnet.nl.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail
References: <3DC1596C.6D2B55BD@hccnet.nl.invalid>

Show Full Headers
Complete Article Headers
Message-ID: <3DC526FC.CBCFE9B6@hccnet.nl.invalid>
Subject: Re: Free reliable wordcount utility available (final version)
Date: Sun, 03 Nov 2002 14:39:08 +0100
From: "Thomas J. Boschloo" <nospam@hccnet.nl.invalid>
References: <3DC1596C.6D2B55BD@hccnet.nl.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.security.pgp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.online.be!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!news.hccnet.nl!not-for-mail
Newsgroups: alt.privacy.anon-server,sci.crypt,alt.fan.cult-dead-cow,alt.security.pgp
Organization: Hobby Computer Club News Network
Lines: 73
NNTP-Posting-Host: uds174-35.dial.hccnet.nl
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.hccnet.nl 1036330976 23351 62.251.35.174 (3 Nov 2002 13:42:56 GMT)
X-Complaints-To: abuse@hccnet.nl
NNTP-Posting-Date: Sun, 3 Nov 2002 13:42:56 +0000 (UTC)
Cancel-Lock: sha1:1QRp7vcBV1fk+B6o880Wc2jQsxU=
X-Mailer: Mozilla 4.8 [en] (Win98; U)
X-Accept-Language: en,nl,de
X-NFilter: 1.2.1-b1