• Renegade and IEMSI

    From Ozz Nixon@1:275/362 to All on Sun Feb 17 11:10:48 2019
    A couple nights ago, I was testing my terminal program, went to the Telnet BBS Guide, and worked my way through different BBS packages.

    However, when I got to the Renegade 3 listings, two of them send the wrong EMSI handshake string.

    It is supposed to be (based upon FTSC) **EMSI_REQ#### and I reply back **EMSI_INQ####. Instead these two BBSes sent **EMSI_INQ#### ... is this a BUG, or is the FTSC wrong?

    Ozz

    --
    +++ Are we having fun yet? I am!
    ATZ|ATDT911|1,2~555

    --- FMail-W32 2.0.1.4
    * Origin: ExchangeBBS WHQ (1:275/362.0)
  • From Nick Andre@1:229/426 to Ozz Nixon on Mon Feb 18 00:40:08 2019
    On 17 Feb 19 11:10:48, Ozz Nixon said the following to All:

    A couple nights ago, I was testing my terminal program, went to the Telnet Guide, and worked my way through different BBS packages.

    However, when I got to the Renegade 3 listings, two of them send the wrong
    handshake string.

    It is supposed to be (based upon FTSC) **EMSI_REQ#### and I reply back **EMSI_INQ####. Instead these two BBSes sent **EMSI_INQ#### ... is this a or is the FTSC wrong?

    Good question. This is the code from Renegade Y2KA2 for EMSI.

    procedure IEMSI;
    var
    Tries:byte;
    T1,T2:longint;
    EMSI_IRQ:string[20];
    Done, Success:boolean;
    s,ISI:string;
    c:char;
    i:integer;
    buffer:array[1..2048] of char;
    buffptr:integer;
    u:userrec;
    NextItemPointer:integer;

    function NextItem:string;
    var s:astr;
    begin
    s := '';
    while (NextItemPointer < 2048) and (buffer[NextItemPointer] <> #0) and
    (buffer[NextItemPointer] <> '{') do
    inc(NextItemPointer);

    if (buffer[NextItemPointer] = '{') then
    inc(NextItemPointer);

    while (NextItemPointer < 2048) and (buffer[NextItemPointer] <> #0) and
    (buffer[NextItemPointer] <> '}') do
    begin
    s := s + buffer[NextItemPointer];
    inc(NextItemPointer);
    end;
    if (buffer[NextItemPointer] = '}') then
    inc(NextItemPointer);
    NextItem := s;
    end;

    begin
    fillchar(IEMSIRec, sizeof(IEMSIRec), 0);
    if (Speed = 0) or (not General.useIEMSI) then exit;

    write('Attempting IEMSI negotiation ... ');
    fillchar(buffer, sizeof(buffer), 0);
    T1 := timer;
    T2 := timer;
    Tries := 0;
    Done := FALSE;
    Success := FALSE;
    EMSI_IRQ := '**EMSI_IRQ8E08'^M^L;
    com_flush_rx;
    SerialOut(EMSI_IRQ);
    s := '';

    repeat
    hangup := not com_carrier;
    if (abs(T1 - Timer) > 2) then
    begin
    T1 := Timer;
    inc(Tries);
    if (Tries >= 2) then
    Done := TRUE
    else
    begin
    com_flush_rx;
    SerialOut(EMSI_IRQ);
    end;
    end;
    if (abs(T2 - Timer) >= 8) then
    Done := TRUE;
    c := cinkey;
    if (c > #0) then
    begin
    if (length(s) >= 160) then
    delete(s, 1, 120);
    s := s + c;
    if (pos('**EMSI_ICI', s) > 0) then
    begin
    delete(s, 1, pos('EMSI_ICI',s) - 1);
    move(s[1], buffer[1], length(s));
    buffptr := length(s);
    T1 := Timer;
    repeat
    c := cinkey;
    if not (c in [#0, #13]) then
    begin
    inc(buffptr);
    buffer[buffptr] := c;
    end;
    until (hangup) or (abs(Timer - T1) > 4) or (c = ^M) or (buffptr = 2048);
    s[0] := #8;
    move(buffer[buffptr - 7], s[1], 8);
    dec(buffptr, 8);
    if (s = Hex(UpdateCRC32($FFFFFFFF, buffer[1], buffptr), 8)) then
    begin
    loadurec(u, 1);
    ISI := '{Renegade,'+ver+'}{'+General.BBSName+'}{'+u.citystate+
    '}{'+General.SysOpName+'}{'+Hex(getpackdatetime, 8)+
    '}{Live free or die!}{}{Everything!}';
    ISI := 'EMSI_ISI'+Hex(length(ISI), 4) + ISI;
    ISI := ISI + Hex(UpdateCRC32($FFFFFFFF, ISI[1], length(ISI)), 8);
    ISI := '**' + ISI + ^M;
    com_flush_rx;
    SerialOut(ISI);
    Tries := 0; T1 := Timer; s := '';
    repeat
    if (abs(Timer - T1) >= 3) then
    begin
    T1 := Timer;
    inc(Tries);
    com_flush_rx;
    SerialOut(ISI);
    end;
    c := cinkey;
    if (c > #0) then
    begin
    if (length(s) >= 160) then
    delete(s, 1, 120);
    s := s + c;
    if (pos('**EMSI_ACK', s) > 0) then
    begin
    com_flush_rx;
    com_purge_tx;
    Done := TRUE;
    Success := TRUE;
    end
    else
    if (pos('**EMSI_NAKEEC3', s) > 0) then
    begin
    com_flush_rx;
    SerialOut(ISI);
    inc(Tries);
    end;
    end;
    until (Tries >= 3) or (Done);
    end
    else
    begin
    SerialOut('**EMSI_NAKEEC3');
    T1 := Timer;
    end;
    end;
    end;
    until (Done) or (Hangup);
    if (Success) then
    begin
    writeln('success.');
    sl1('Successful IEMSI negotiation.');
    end
    else
    writeln('failure.');

    NextItemPointer := 1;

    with IEMSIRec do
    begin
    UserName := NextItem;
    Handle := NextItem;
    CityState := NextItem;
    ph := NextItem;
    s := NextItem;
    pw := allcaps(NextItem);
    i := value('$'+NextItem);
    if (i > 0) then
    bdate := pd2date(i);
    end;

    com_flush_rx;

    end;

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From Ozz Nixon@1:275/362 to Nick Andre on Mon Feb 18 18:18:57 2019
    On 2019-02-18 06:40:08 +0000, Nick Andre -> Ozz Nixon said:

    On 17 Feb 19 11:10:48, Ozz Nixon said the following to All:

    A couple nights ago, I was testing my terminal program, went to the
    Telnet
    Guide, and worked my way through different BBS packages.

    However, when I got to the Renegade 3 listings, two of them send the
    wrong
    handshake string.

    It is supposed to be (based upon FTSC) **EMSI_REQ#### and I reply back **EMSI_INQ####. Instead these two BBSes sent **EMSI_INQ#### ... is this
    a B
    or is the FTSC wrong?

    Good question. This is the code from Renegade Y2KA2 for EMSI.


    write('Attempting IEMSI negotiation ... ');
    EMSI_IRQ := '**EMSI_IRQ8E08'^M^L;
    com_flush_rx;
    SerialOut(EMSI_IRQ);
    if (pos('**EMSI_ICI', s) > 0) then
    begin
    delete(s, 1, pos('EMSI_ICI',s) - 1);

    ISI :=
    '{Renegade,'+ver+'}{'+General.BBSName+'}{'+u.citystate+
    '}{'+General.SysOpName+'}{'+Hex(getpackdatetime, 8)+
    '}{Live free or die!}{}{Everything!}';
    ISI := 'EMSI_ISI'+Hex(length(ISI), 4) + ISI;
    ISI := ISI + Hex(UpdateCRC32($FFFFFFFF, ISI[1],
    length(ISI)),
    8);
    ISI := '**' + ISI + ^M;
    com_flush_rx;
    SerialOut(ISI);

    Looks like it is setup correctly, but every EMSI sample I find from the 90's flow like, client to BBS->

    begin
    { Assumes connection has been made at this point }

    Tries := 0;
    Repeat
    Write2Port(EMSI_INQ); <---- just like rg's code - so they both INQ and wait for REQ
    Delay(1000);
    Inc(Tries);
    Until (Get_EMSI_REQ = True) or (Tries = 5);

    If Tries = 5 then
    begin
    Writeln('Host system failed to acknowledge the inquiry sequence.');
    Hangup;
    Halt;
    end;

    { Used For debugging }
    Writeln('Boss has acknowledged receipt of EMSI_INQ');

    Send_EMSI_DAT;

    Tries := 0;
    Repeat
    Inc(Tries);
    Until (Get_EMSI_ACK = True) or (Tries = 5);


    Now looking at the specs from JoHo:
    http://ftsc.org/docs/fsc-0056.001

    PART II - Electronic Mail Standard Idenfitication

    Connecting two EMSI capable systems
    =====================================================================
    This assumes that the two systems are connected and that no data
    has been transmitted by the Caller.

    It should be mentioned that sending/monitoring for the "YooHoo",
    "TSYNC", and other protocol start characters is optional and not
    required for a strict EMSI implementation.

    STEP 1, EMSI INIT

    Calling system Answering system
    +-+-------------------------------+----------------------------------+
    :1: Send <CR> until ANY character : Send EMSI_REQ and possible :
    : : is received. : banner, etc. :
    +-+-------------------------------+----------------------------------+
    :2: Receive banner, etc. Monitor : Monitor line for the EMSI_INQ :
    : : line for the EMSI_REQ : sequence and if received, :
    : : sequence and if received, : attempt to handshake immediately.:
    : : transmit EMSI_INQ and attempt : :
    : : to handshake immediately. : :
    +-+-------------------------------+----------------------------------+
    :3: No EMSI_REQ sequence received,: Monitor line for EMSI_INQ and :
    : : send EMSI_INQ twice followed : possible other protocol start :
    : : by possible other protocol : characters and if received, :
    : : start characters. : attempt to handshake immediately.:
    : : : :
    : : Transmit <CR> : Go to step 3. :
    +-+-------------------------------+----------------------------------+
    :4: If EMSI_REQ sequence received,:
    : : send EMSI_INQ and attempt to :
    : : handshake immediately, :
    : : otherwise repeat step 3. :
    +-+-------------------------------+

    In steps 1 and 2, both the Calling and Answering system terminate all
    sequences with <CR>. In step 3, the Calling system does not terminate
    sequences with <CR> as it is explicitly transmitted after possible
    protocol start characters. In step 4, the Calling system once again
    terminate all sequences with a <CR>.

    and FINALLY:
    =====================================================================
    EMSI Inquiry **EMSI_INQ<crc16><CR>
    ---------------------------------------------------------------------
    EMSI Inquiry is transmitted by the calling system to identify it as
    EMSI capable. If an EMSI_REQ sequence is received in response, it is
    safe to assume the answering system to be EMSI capable.

    --- FMail-W32 2.0.1.4
    * Origin: Modern Pascal, LLC. (1:275/362.0)
  • From Nick Andre@1:229/426 to Ozz Nixon on Tue Feb 19 14:31:40 2019
    On 18 Feb 19 18:18:57, Ozz Nixon said the following to Nick Andre:

    Looks like it is setup correctly, but every EMSI sample I find from the
    90'
    flow like, client to BBS->

    The problem is that even if the EMSI code in Renegade was buggy, the software is essentially abandonware at this point with nobody else really seriously running it (to my knowledge) so really no incentive to fix it.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)
  • From mark lewis@1:3634/12.73 to Ozz Nixon on Tue Feb 19 23:29:16 2019

    On 2019 Feb 18 18:18:56, you wrote to Nick Andre:

    Looks like it is setup correctly, but every EMSI sample I find from the 90's flow like, client to BBS->

    we're not getting EMSI and IEMSI mixed up, are we? EMSI is mailer-to-mailer... IEMSI is user-to-BBS...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... If it smokes and it's not GE, then it must be Alco!
    ---
    * Origin: (1:3634/12.73)
  • From Ozz Nixon@1:275/362 to Nick Andre on Sun Feb 24 01:35:26 2019
    On 2019-02-19 20:31:40 +0000, Nick Andre -> Ozz Nixon said:

    The problem is that even if the EMSI code in Renegade was buggy, the
    software
    is essentially abandonware at this point with nobody else really seriously running it (to my knowledge) so really no incentive to fix it.

    Bummer - it had its place in the world of BBS software packages. I do not have the latest pascal code, or I would make time to fix it. I assume the latest stuff supports JAM and/or Squish?

    --- FMail-W32 2.0.1.4
    * Origin: Modern Pascal, LLC. (1:275/362.0)
  • From Nick Andre@1:229/426 to Ozz Nixon on Sun Feb 24 19:00:29 2019
    On 24 Feb 19 01:35:26, Ozz Nixon said the following to Nick Andre:

    The problem is that even if the EMSI code in Renegade was buggy, the
    software
    is essentially abandonware at this point with nobody else really seriously running it (to my knowledge) so really no incentive to fix it.

    Bummer - it had its place in the world of BBS software packages. I do not the latest pascal code, or I would make time to fix it. I assume the
    latest
    stuff supports JAM and/or Squish?

    Nope. Renegade uses a proprietary format. A binary "blob" file with the actual message content and another containing the headers for each message with a pointer to the blob. Then a third containing the last-read pointers for
    each BBS user... kind of a ripoff of Squish I suppose.

    It works perfectly here but I had to fix a few bugs and limitations.

    Nick

    --- Renegade vY2Ka2
    * Origin: Joey, do you like movies about gladiators? (1:229/426)