Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to Renegade Software Discussion Are...  <--  <--- Return to Home Page
   Networked Database  Renegade Software Discussion Are...   [11 / 16] RSS
 From   To   Subject   Date/Time 
Message   Nick Andre    Ozz Nixon   Re: Renegade and IEMSI   February 18, 2019
 12:40 AM *  

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

ON> A couple nights ago, I was testing my terminal program, went to the Telnet 
ON> Guide, and worked my way through different BBS packages.
ON> 
ON> However, when I got to the Renegade 3 listings, two of them send the wrong 
ON>  handshake string.
ON> 
ON> It is supposed to be (based upon FTSC) **EMSI_REQ#### and I reply back
ON> **EMSI_INQ####. Instead these two BBSes sent **EMSI_INQ#### ... is this a B
ON> 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)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to Renegade Software Discussion Are...  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.1021 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.0.140505

Warning: Unknown: open(c:\Sessions\sess_cs8uq7d10rjaa998sn8rnamkk6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0 PHP Warning: session_start(): open(c:\Sessions\sess_cs8uq7d10rjaa998sn8rnamkk6, O_RDWR) failed: No such file or directory (2) in D:\wc5\http\public\VADV\include\common.inc.php on line 45 PHP Warning: Unknown: open(c:\Sessions\sess_cs8uq7d10rjaa998sn8rnamkk6, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0