• Crc utility

    From Alan Ianson@1:153/757 to All on Thursday, September 29, 2016 19:37:36
    Hello All,

    Does anyone know of a utility to get the CRC of a file? A node is creating tic files by hand, or a script I guess and we need the CRC value of the file to put
    in the tic.

    Also, does anyone know of a file that documents the keywords available for tic files and their meaning?

    ... After all is said and done, much is said and little is done.
    --- GoldED+/LNX 1.1.5-b20160322
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Ben Ritchey@1:393/68 to Alan Ianson on Thursday, September 29, 2016 22:30:16
    * An ongoing debate between Alan Ianson and All rages on ...

    Does anyone know of a utility to get the CRC of a file? A node is
    creating tic files by hand, or a script I guess and we need the CRC
    value of the file to put in the tic.


    http://cmech.dynip.com/filebase.bbs/bfds/horst32.zip

    See crc32 pgm within (DOS/Wins) ... also see CRC32.TXT

    -+-
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|binkp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    ... Sign Here: __________________________________
    --- GoldED+/W32-MSVC v1.1.5 via Mystic BBS
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Alan Ianson@1:153/757.1 to Ben Ritchey on Thursday, September 29, 2016 20:55:20
    Re: Re: Crc utility
    By: Ben Ritchey to Alan Ianson on Thu Sep 29 2016 10:30 pm

    http://cmech.dynip.com/filebase.bbs/bfds/horst32.zip

    See crc32 pgm within (DOS/Wins) ... also see CRC32.TXT

    Got Ben, thanks.. :)

    ... Brain: the apparatus with which we think we think
    --- SBBSecho 3.00-Linux
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757.1)
  • From Tony Langdon@3:633/410 to Alan Ianson on Friday, September 30, 2016 13:51:00
    Alan Ianson wrote to All <=-

    Does anyone know of a utility to get the CRC of a file? A node is
    creating tic files by hand, or a script I guess and we need the CRC
    value of the file to put in the tic.

    Seems Mystic doesn't require the CRC. I'm able to hatch files without it.

    Also, does anyone know of a file that documents the keywords available
    for tic files and their meaning?

    I did find those a while back. Don't have specific links, but Google will fish them out. They weren't of use to me then, as I didn't have the contextual understanding to make use of them when I looked. Probably more useful now that I understand the key fields. I'm about to head out to a track meet, otherwise I'd google them for you (since I want them myself).

    ... After all is said and done, much is said and little is done.

    LOL true. :)


    ... Of course I'm sane... The voices said so...
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Alan Ianson@1:153/757.1 to Tony Langdon on Thursday, September 29, 2016 23:16:47
    Re: Re: Crc utility
    By: Tony Langdon to Alan Ianson on Fri Sep 30 2016 01:51 pm

    Also, does anyone know of a file that documents the keywords
    available for tic files and their meaning?

    I did find those a while back. Don't have specific links, but Google will fish them out. They weren't of use to me then, as I didn't have the contextual understanding to make use of them when I looked. Probably more useful now that I understand the key fields. I'm about to head out to a track meet, otherwise I'd google them for you (since I want them myself).

    I did find it, fsp-1039.001 has the keywords and meanings.

    ... No user-serviceable parts inside (or outside).
    --- SBBSecho 3.00-Linux
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757.1)
  • From Tony Langdon@3:633/410 to Ben Ritchey on Friday, September 30, 2016 19:16:00
    Ben Ritchey wrote to Alan Ianson <=-

    http://cmech.dynip.com/filebase.bbs/bfds/horst32.zip

    See crc32 pgm within (DOS/Wins) ... also see CRC32.TXT

    Only problem is they're DOS programs. Not the easiest to run from a script under Raspian. Pity the source isn't available. :(


    ... Use it up.Wear it out. Make it do Or do without.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Ben Ritchey@1:393/68 to Tony Langdon on Friday, September 30, 2016 07:58:16
    * An ongoing debate between Tony Langdon and Ben Ritchey rages on ...

    http://cmech.dynip.com/filebase.bbs/bfds/horst32.zip
    See crc32 pgm within (DOS/Wins) ... also see CRC32.TXT
    Only problem is they're DOS programs. Not the easiest to run from a script under Raspian. Pity the source isn't available. :(

    See Tuxpower echo, solution available there :)

    -+-
    Keep the faith :^)

    Ben aka cMech Web: http|ftp|binkp|telnet://cmech.dynip.com
    Email: fido4cmech(at)lusfiber.net
    Home page: http://cmech.dynip.com/homepage/
    WildCat! Board 24/7 +1-337-984-4794 any BAUD 8,N,1

    ... These are my lawyers. My demands are as follows....
    --- GoldED+/W32-MSVC v1.1.5 via Mystic BBS
    * Origin: FIDONet - The Positronium Repository (1:393/68)
  • From Janis Kracht@1:261/38 to Tony Langdon on Friday, September 30, 2016 09:11:54
    Hi Tony,

    http://cmech.dynip.com/filebase.bbs/bfds/horst32.zip

    See crc32 pgm within (DOS/Wins) ... also see CRC32.TXT

    Only problem is they're DOS programs. Not the easiest to run from a script under Raspian. Pity the source isn't available. :(


    I have some source for CRC here:

    http://www.filegate.net/cprog/pdcrc200.zip

    Contents:
    ===cut here===
    Archive: pdcrc200.zip
    Length Method Size Cmpr Date Time CRC-32 Name
    -------- ------ ------- ---- ---------- ----- -------- ----
    9933 Defl:X 3751 62% 1993-07-24 12:38 a868c2db CRC.TXT
    6574 Defl:X 1405 79% 1995-03-15 22:50 ad9f6bdd CRC16.H
    1260 Defl:X 378 70% 1993-07-22 07:41 fba61897 CRC16GEN.C
    1168 Defl:X 293 75% 1995-03-15 17:51 11174eab CRC16TST.C
    8362 Defl:X 2458 71% 1995-03-15 22:48 ebfa24cb CRC32.H
    1554 Defl:X 488 69% 1993-07-23 20:40 78b398dc CRC32GEN.C
    1164 Defl:X 294 75% 1995-03-15 22:49 bd15b43c CRC32TST.C
    1805 Defl:X 540 70% 1995-12-29 16:17 4a425216 CRCFILE.C
    12178 Defl:X 9624 21% 1995-12-29 16:24 78f61b20 CRCFILE.EXE
    6574 Defl:X 1734 74% 1995-03-15 22:51 06d514b2 CRCIT.H
    1644 Defl:X 498 70% 1993-07-22 08:25 e8250f1f CRCITGEN.C
    1168 Defl:X 291 75% 1995-03-15 18:05 675d1392 CRCITTST.C
    6729 Defl:X 1803 73% 1995-03-15 22:51 361637aa CRCXM.H
    1507 Defl:X 497 67% 1993-07-22 07:42 98e7a95f CRCXMGEN.C
    1168 Defl:X 291 75% 1995-03-15 18:11 9aa0af7b CRCXMTST.C
    1626 Defl:X 851 48% 1994-08-27 15:28 dfaf76fc PDPGOAL.TXT
    2126 Defl:X 913 57% 1995-12-29 16:23 1283a516 READ.ME
    -------- ------- --- -------
    66540 26109 61% 17 files

    ===cut here======


    Hope this helps :)
    Take care,
    Janis

    --- BBBS/Li6 v4.10 Dada-2
    * Origin: Prism bbs (1:261/38)
  • From mark lewis@1:3634/12.73 to Alan Ianson on Friday, September 30, 2016 08:12:42

    29 Sep 16 19:37, you wrote to All:

    Does anyone know of a utility to get the CRC of a file?

    there are several... you always forget to tell what OS you need things for...

    A node is creating tic files by hand, or a script I guess and we need
    the CRC value of the file to put in the tic.

    why don't they use what is already available?

    Also, does anyone know of a file that documents the keywords available
    for tic files and their meaning?

    http://ftsc.org/

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... A good politician is quite as unthinkable as an honest burglar.
    ---
    * Origin: (1:3634/12.73)
  • From mark lewis@1:3634/12.73 to Tony Langdon on Friday, September 30, 2016 08:17:00

    30 Sep 16 13:51, you wrote to Alan Ianson:

    Does anyone know of a utility to get the CRC of a file? A node is
    creating tic files by hand, or a script I guess and we need the CRC
    value of the file to put in the tic.

    Seems Mystic doesn't require the CRC. I'm able to hatch files without it.

    there shouldn't really be any TIC software that /requires/ the CRC... it's only
    real use is to ensure that the file is not changed in transit...

    depending on your OS, you may have the necessary tools already at hand...

    cksum
    crc32
    md5sum
    sha1sum
    sha224sum
    sha256sum
    sha384sum
    sha512sum

    cksum or crc32 is the one you want but you should check with a known file that has a known CRC value and see which program outputs the same match... i say this because at least crc32 hashes can have pre- and post- conditioning applied
    to them...

    i recently ran into a case where i had to be sure i was using the proper one...
    one case was hashing a user's name for use with JAM bases... another was hashing a file for integrity checking... in the case of working with JAM message bases, to properly match the crc generated and used by legacy software,
    i had to initialize the crc variable to $ffffffff (as a signed longint) and then feed each character individually to the crc routine... i could have fed the entire blob of data and let the routine walk through it but that gave a different and wrong result... at the end, we did not XOR with $ffffffff but we do have to invert the result so the bytes are reversed since to match what's in
    the JAM data files... this byte reversal is because the legacy method used is for traditional analogue modems and the UART wants everything reversed for transmission... granted a UART is not used in this case but it is the way the sofware is written and there's a lot of software that uses this same formulation method...

    [time passes]

    i just checked what i was checking for JAM with the cksum and crc32 tools but neither returned the desired results... i'll have to go play, now, with checking a file and its TIC to see if i can determine which is correct if either one is... pre- and post- conditioning and whether to flip the bytes or not make a huge difference in the results...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... The one question you've always wanted clarified. What did she say?
    ---
    * Origin: (1:3634/12.73)
  • From mark lewis@1:3634/12.73 to Tony Langdon on Friday, September 30, 2016 09:04:42

    30 Sep 16 19:16, you wrote to Ben Ritchey:

    http://cmech.dynip.com/filebase.bbs/bfds/horst32.zip

    See crc32 pgm within (DOS/Wins) ... also see CRC32.TXT

    Only problem is they're DOS programs. Not the easiest to run from a script under Raspian. Pity the source isn't available. :(

    the ones i listed are all pretty standard on *nix... the problem is if they are
    using the same formula or not...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Zygotes are a gamete's way of producing more gametes.
    ---
    * Origin: (1:3634/12.73)
  • From Alan Ianson@1:153/757 to mark lewis on Friday, September 30, 2016 12:06:58
    Friday September 30 2016 08:12, you wrote to me:

    Does anyone know of a utility to get the CRC of a file?

    there are several... you always forget to tell what OS you need things for...

    In this case I'm not really sure. I think the node in question has a number of OSs that he uses but IINM linux or respbian is the target we want to reach.

    A node is creating tic files by hand, or a script I guess and we
    need the CRC value of the file to put in the tic.

    why don't they use what is already available?

    We have been looking at running htick in that environment as well. I'm not certain if that's doable but I think it probably is.

    We are working here with Mystic BBS. Mystic does import files with tics and send them on to your links if so configured. In this case though we need to hatch files into his network so we want to do that as simply as possible. Mystic's file area config (in recent versions) has hatch settings but it hasn't
    been implemented yet so we just need a way to hatch files until mystic can do this on it's own.

    I think Tony has done this now with a script although we need to add a valid Crc line to the tic. Mystic itself will toss tics without a crc line but I think a validity check is good to have.

    Also, does anyone know of a file that documents the keywords
    available for tic files and their meaning?

    http://ftsc.org/

    Although I had the file all the time google helped me identify the file I needed to look at.. :)

    ... The best audience is intelligent, well-educated and a little drunk.
    --- GoldED+/LNX 1.1.5-b20160322
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757)
  • From Tony Langdon@3:633/410 to Janis Kracht on Saturday, October 01, 2016 08:07:00
    Janis Kracht wrote to Tony Langdon <=-

    I have some source for CRC here:

    http://www.filegate.net/cprog/pdcrc200.zip

    Worth a shot. :)


    ... Red-shifted: The only way to travel ...
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to Ben Ritchey on Saturday, October 01, 2016 08:08:00
    Ben Ritchey wrote to Tony Langdon <=-

    See Tuxpower echo, solution available there :)

    Headed over there in a tic (and good to see that echo come alive again). :)


    ... Cats are hard on cars. Mostly when you chase them over curbs!
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to mark lewis on Saturday, October 01, 2016 08:13:00
    mark lewis wrote to Tony Langdon <=-

    there shouldn't really be any TIC software that /requires/ the CRC...
    it's only
    real use is to ensure that the file is not changed in transit...

    Actually, it is a required field in the TIC specification, and the way one hatched files in Mystic, it is effectively "in transit" from a dummy node.

    depending on your OS, you may have the necessary tools already at
    hand...

    cksum

    That one didn't work for me.

    crc32

    Don't have that one and can't find it for Raspian (though other distros seem to have it available).

    cksum or crc32 is the one you want but you should check with a known
    file that has a known CRC value and see which program outputs the same match... i say this because at least crc32 hashes can have pre- and
    post- conditioning applied
    to them...

    i had to initialize the crc variable to $ffffffff (as a signed
    longint) and then feed each character individually to the crc

    That sounds similar to the TIC specs.

    routine... i could have fed the entire blob of data and let the routine walk through it but that gave a different and wrong result... at the
    end, we did not XOR with $ffffffff but we do have to invert the result
    so the bytes are reversed since to match what's in
    the JAM data files... this byte reversal is because the legacy method used is for traditional analogue modems and the UART wants everything reversed for transmission... granted a UART is not used in this case
    but it is the way the sofware is written and there's a lot of software that uses this same formulation method...

    Yes, again that rings a bell with the specs, which I did look up. There is some code there showing how the CRC32 is generated, just prefer not to have to re-learn file handling in Pascal just yet. :)

    [time passes]

    i just checked what i was checking for JAM with the cksum and crc32
    tools but neither returned the desired results... i'll have to go play, now, with checking a file and its TIC to see if i can determine which
    is correct if either one is... pre- and post- conditioning and whether
    to flip the bytes or not make a huge difference in the results...

    I had no joy with cksum, and I don't have crc32 on my system.


    ... I hit the CTRL key but I'm still not in control!
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to mark lewis on Saturday, October 01, 2016 08:14:00
    mark lewis wrote to Tony Langdon <=-

    the ones i listed are all pretty standard on *nix... the problem is if they are
    using the same formula or not...

    That's the hard part. :-)


    ... That must be wonderful! I don't understand it at all.
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)
  • From Tony Langdon@3:633/410 to Alan Ianson on Saturday, October 01, 2016 08:52:00
    Alan Ianson wrote to mark lewis <=-

    I think Tony has done this now with a script although we need to add a valid Crc line to the tic. Mystic itself will toss tics without a crc
    line but I think a validity check is good to have.

    Yes, the script works without CRC, CRC would be a nice to have though.


    ... Why do we say something is out of whack? What is a whack?
    --- MultiMail/Win32 v0.49
    * Origin: Freeway BBS - freeway.apana.org.au (3:633/410)