• Crypt option

    From Richard Menedetter@2:310/31 to All on Fri Dec 16 20:42:34 2016
    Hi All!

    I have compiled binkd myself.
    Strangely it does not send the CRYPT option ...
    did I miss a configure flag that I need to set??

    For others it looks like this:
    OPT EXTCMD CRYPT GZ BZ2

    My binkd does not send the crypt option.

    CU, Ricsi

    --- GoldED+/LNX
    * Origin: Sometimes you get beer, sometimes beer gets you (2:310/31)
  • From mark lewis@1:3634/12.73 to Richard Menedetter on Fri Dec 16 17:50:52 2016

    16 Dec 16 20:42, you wrote to All:

    I have compiled binkd myself.
    Strangely it does not send the CRYPT option ...
    did I miss a configure flag that I need to set??

    what flags did you use to compile with?

    i use the following script which logs everything to the screen and a file via tee... the log file has the same name as the script with ".log" appended... the
    script will rotate the logs so you'll have a max of 9 old ones plus the new one... edit the "MYBINKDDIR=" line to set your directory where your binkd sources are located... the script pulls the sources from the master branch on github, prunes out old branches and then uploads to your fork in your account on github... you can cut those lines out if you desire... once the pull is finished, it copies the necessary files, runs configure, make and then make install... it runs make install twice... the first time so you can make sure everything is right and the second time to install it with sudo... i keep my sources in ~/fido-dev/binkd and install to my home directory in ~/fido/sbin...

    watch the wordwrap... there's 103 lines in the script counting the empty line at the end... as the script stands, lines 73, 74, 81 and 82 will likely be wrapped and you'll need to unwrap them...

    ==== Begin "build-binkd" ====
    #!/bin/bash
    #
    # script to update and build binkd
    #

    # first set the variables
    LOGFILE=$0.log
    CWD=$PWD
    MYBINKDDIR=~/fido-dev/binkd

    function rotate () {
    # minimum file size to rotate in MBi:
    local MB="$1"
    # filename to rotate (full path)
    local F="$2"
    local msize="$((1024*1024*${MB}))"
    test -e "$F" || return 2

    local D="$(dirname "$F")"
    local E=${F##*.}
    local B="$(basename "$F" ."$E")"

    local s=

    printf "rotate msize=$msize file=$F -> $D | $B | $E\n"
    if [ "$(stat --printf %s "$F")" -ge $msize ] ; then
    for i in 8 7 6 5 4 3 2 1 0; do
    s="$D/$B-$i.$E"
    test -e "$s" && mv $s "$D/$B-$((i+1)).$E"
    # this empty command is need to avoid exit iteration if test fails:
    :;
    done &&
    mv $F $D/$B-0.$E
    else
    printf "rotate skip: $F < $msize, skip\n"
    fi
    return $?
    }

    # rotate this script's log file
    rotate 0 $LOGFILE


    # Redirect stdout ( > ) into a named pipe ( >() ) running "tee"
    exec > >(tee $LOGFILE)

    # Without this, only stdout would be captured - i.e. your
    # log file would not contain any error messages.
    exec 2>&1


    printf "***** starting in $CWD *****\n"
    printf "***** $(date +%Y%m%d_%H%M%S%Z) *****\n"
    SDATE1=$(date +"%s")
    printf "\n"

    printf "cd $MYBINKDDIR\n"
    cd $MYBINKDDIR

    SDATE2=$(date +"%s")
    printf "git pull upstream master\n"
    git pull upstream master
    printf "\n"

    printf "git remote prune upstream\n"
    git remote prune upstream
    printf "\n"

    printf "git push origin\n"
    git push origin
    printf "\n"

    printf "cp mkfls/unix/{configure*,install-sh,Makefile.*,mkinstalldirs} ./\n"
    cp mkfls/unix/{configure*,install-sh,Makefile.*,mkinstalldirs} ./
    printf "\n"

    printf "chmod +x mkinstalldirs\n"
    chmod +x mkinstalldirs
    printf "\n"

    printf "./configure --prefix=/home/wkitty42/fido --with-zlib --with-bzip2 --with-https --with-ntlm --with-bwlim\n"
    ./configure --prefix=/home/wkitty42/fido --with-zlib --with-bzip2 --with-https --with-ntlm --with-bwlim
    printf "\n"

    printf "make\n"
    make
    printf "\n"

    printf "make -n install\n"
    make -n install
    printf "\n"

    printf "sudo make install\n"
    sudo make install
    printf "\n"

    EDATE2=$(date +"%s")
    DIFF=$(($EDATE2-$SDATE2))
    cd $CWD
    printf "***** elapsed time: $(($DIFF / 60))m $(($DIFF % 60))s *****\n"
    printf "\n"

    ==== End "build-binkd" ====

    )\/(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 French form of government is democratic but noisy.
    ---
    * Origin: (1:3634/12.73)
  • From Torsten Bamberg@2:240/5832 to Richard Menedetter on Sat Dec 17 00:47:48 2016
    Hello Richard!

    16.12.2016 20:42, Richard Menedetter schrieb an All:

    I have compiled binkd myself.
    Strangely it does not send the CRYPT option ...
    did I miss a configure flag that I need to set??
    Well, possibly you didn't link all files into binkp.
    The crypt option is hardcoded. Just take a look at crypt.c.

    The options inside the makefile are to use the compression.
    To use the compression makefile flags you need to have zlib and/or bzip lib installed and compiled correctly.

    For others it looks like this:
    OPT EXTCMD CRYPT GZ BZ2
    My binkd does not send the crypt option.
    The sessions are password encrypted (md5):

    =##= Anfang "BINKD.LOG" =##=
    + 17 Dec 00:01:41 [63412] outgoing session with fido.ricsi.priv.at:24554 [62.178.175.238]
    - 17 Dec 00:01:41 [63412] OPT CRAM-MD5-b3f89cb7651abe51a4fedbe7c10aacee
    + 17 Dec 00:01:41 [63412] Remote requests MD mode
    - 17 Dec 00:01:41 [63412] SYS fido.ricsi.priv.at
    - 17 Dec 00:01:41 [63412] ZYZ Richard Menedetter
    - 17 Dec 00:01:41 [63412] LOC Vienna,Austria
    - 17 Dec 00:01:41 [63412] NDL 115200,TCP,BINKP,XW,CM,MO,IBN,INA:fido.ricsi.priv.at
    - 17 Dec 00:01:41 [63412] TIME Sat, 17 Dec 2016 00:01:42 +0100
    - 17 Dec 00:01:41 [63412] VER binkd/1.1a-75/Linux binkp/1.1
    + 17 Dec 00:01:41 [63412] addr: 2:310/31@fidonet
    + 17 Dec 00:01:41 [63412] addr: 21:1/104@fsxnet (n/a or busy)
    + 17 Dec 00:01:41 [63412] addr: 39:171/0@amiganet
    + 17 Dec 00:01:41 [63412] addr: 39:171/31@amiganet
    + 17 Dec 00:01:41 [63412] addr: 80:774/18@retronet (n/a or busy)
    + 17 Dec 00:01:41 [63412] addr: 110:312/0@linuxnet
    + 17 Dec 00:01:41 [63412] addr: 110:312/5@linuxnet
    + 17 Dec 00:01:41 [63412] addr: 314:314/100@pinet (n/a or busy)
    + 17 Dec 00:01:41 [63412] addr: 432:1/105@vkradio (n/a or busy)
    - 17 Dec 00:01:41 [63412] TRF 0 0
    + 17 Dec 00:01:41 [63412] Remote has 0b of mail and 0b of files for us
    - 17 Dec 00:01:41 [63412] OPT EXTCMD CRYPT GZ BZ2
    + 17 Dec 00:01:41 [63412] Remote supports EXTCMD mode
    + 17 Dec 00:01:41 [63412] Remote requests CRYPT mode
    + 17 Dec 00:01:41 [63412] Remote supports GZ mode
    + 17 Dec 00:01:41 [63412] Remote supports BZ2 mode
    + 17 Dec 00:01:41 [63412] pwd protected session (MD5)
    - 17 Dec 00:01:41 [63412] session in CRYPT mode
    + 17 Dec 00:01:41 [63412] sending F:\DBFile\FIDO\RC24\R24NODEL\NODELIST.Z58 as NODELIST.Z58 (69668)
    + 17 Dec 00:01:42 [63412] sending E:\dbahn\mailer\hold\TK925632.TIC as TK925632.TIC (499)
    + 17 Dec 00:01:43 [63412] sent: F:\DBFile\FIDO\RC24\R24NODEL\NODELIST.Z58 (69668, 34834.00 CPS, 2:310/31@fidonet)
    + 17 Dec 00:01:43 [63412] sent: E:\dbahn\mailer\hold\TK925632.TIC (499, 499.00 CPS, 2:310/31@fidonet)
    17 Dec 00:01:43 [63412] session closed, quitting...
    =##= Ende "BINKD.LOG" =##=

    Looks fine with 'crypt'. :-)

    BTW: binkd is actually at version binkd1.1a-95.
    binkd1.1a-75 is outdated. ;-)

    If you want me to test your version, just switch binkd (you compiled by your own) to a different port. Maybe port 25554, and I'll start connecting to your test binkd as well.

    CU, Ricsi
    Bye/2 Torsten

    ... MAILBOX02: Up 56d 18h 11m (BTUp2V1.5)
    --- GoldED/2 1.1.5
    * Origin: DatenBahn BBS Hamburg (2:240/5832)
  • From Richard Menedetter@2:310/31 to Mark Lewis on Sat Dec 17 12:52:58 2016
    Hi Mark!

    16 Dec 2016 17:50, from mark lewis -> Richard Menedetter:

    I have compiled binkd myself.
    Strangely it does not send the CRYPT option ...
    did I miss a configure flag that I need to set??
    what flags did you use to compile with?

    I think --with-zlib --with-bzip2
    But strangely it can make crypt sessions, if the other side requests crypt.
    - 01 Dec 01:00:04 [13485] OPT EXTCMD CRYPT GZ BZ2
    + 01 Dec 01:00:04 [13485] Remote supports EXTCMD mode
    + 01 Dec 01:00:04 [13485] Remote requests CRYPT mode
    + 01 Dec 01:00:04 [13485] Remote supports GZ mode
    + 01 Dec 01:00:04 [13485] Remote supports BZ2 mode
    + 01 Dec 01:00:04 [13485] pwd protected session (MD5)
    - 01 Dec 01:00:04 [13485] session in CRYPT mode

    But it will not send OPT CRYPT itself ... I do not understand why.

    i use the following script

    Many thanx for the Script!
    Usually I compile it only seldom and then manual.
    Using your script is a great idea!

    CU, Ricsi

    --- GoldED+/LNX
    * Origin: Of course I'm running Windows %$/") NO CARRIER (2:310/31)
  • From Richard Menedetter@2:310/31 to Torsten Bamberg on Sat Dec 17 13:01:12 2016
    Hi Torsten!

    17 Dec 2016 00:47, from Torsten Bamberg -> Richard Menedetter:

    I have compiled binkd myself.
    Strangely it does not send the CRYPT option ...
    did I miss a configure flag that I need to set??
    Well, possibly you didn't link all files into binkp.
    The crypt option is hardcoded. Just take a look at crypt.c.

    Hmm ...
    It links with -lcrypt ... and I thought it is not sending the CRYPT option, but
    the LOG from your side shows that I am sending it to you.

    I am not sending it to OpenXP when I poll my sysop point:
    To: NETCALL (All)
    From: Richard Menedetter @ 2:310/31.1 (fido.ricsi.priv.at, Vienna A) Subject: Netcall to 2:310/31
    Date: Sa 17.12.16, 04:08
    Size: 509 Bytes -----------------------------------------------------------------------------------------------
    = 04:08:13 CONNECT
    04:08:13 OPT CRAM-MD5-a24e327d4abfb5f5982c181d162c3bee
    04:08:13 SYS fido.ricsi.priv.at
    04:08:13 ZYZ Richard Menedetter
    04:08:13 LOC Vienna,Austria
    04:08:13 NDL 115200,TCP,BINKP,XW,CM,MO,IBN,INA:fido.ricsi.priv.at
    04:08:13 TIME Sat, 17 Dec 2016 04:08:26 +0100
    04:08:13 VER binkd/1.1a-75/Linux binkp/1.1
    04:08:13 TRF 0 0
    04:08:13 OPT EXTCMD GZ BZ2
    04:08:13 secure
    = 04:08:13 hangup
    - 04:08:13 exiting

    No clue why.

    The options inside the makefile are to use the compression.
    To use the compression makefile flags you need to have zlib and/or
    bzip lib installed and compiled correctly.

    I have BZ2, ZLIB and Perl active.

    BTW: binkd is actually at version binkd1.1a-95.
    binkd1.1a-75 is outdated. ;-)

    I know ... I will migrate the fido system to this virtual server:

    root@vserv:~# binkd -vv
    Binkd 1.1a-94 (Dec 8 2016 11:29:32/Linux)
    Compilation flags: gcc, zlib, bzlib2, perl.
    Facilities: fts5004 ipv6

    Just did not have time/motivation to do so.

    If you want me to test your version, just switch binkd (you compiled
    by your own) to a different port. Maybe port 25554, and I'll start connecting to your test binkd as well.

    Strangely it seems that I already send the option to you.
    So I am sure the "other" binkd on the new vserver is OK as well.
    So all is fine.
    I just do not get why I am not sending the crypt option to sessions with my sysop point.

    Anyways thanx for the answers.
    I will check once more after I migrated, but I assume all is fine ...

    CU, Ricsi

    --- GoldED+/LNX
    * Origin: Hardware Independent: Won't work on ANY hardware! (2:310/31)
  • From mark lewis@1:3634/12.73 to Richard Menedetter on Sat Dec 17 18:18:14 2016

    17 Dec 16 12:52, you wrote to me:

    But it will not send OPT CRYPT itself ... I do not understand why.

    it is all majik to me ;)

    i use the following script

    Many thanx for the Script!
    Usually I compile it only seldom and then manual.
    Using your script is a great idea!

    we developed it a couple of updates back because trying to remember all the steps with several months between was just too much... better to write them down in a script and then just run it and be done with it :lol:

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... I understand the answers, the questions throw me.
    ---
    * Origin: (1:3634/12.73)