commit 022e7986198fcec48774b0ce8591311d1f023cfb Author: jdg Date: Wed Sep 8 21:15:53 2021 +0200 First commit 10/04/1996 diff --git a/CP.BAT b/CP.BAT new file mode 100644 index 0000000..d1cb675 --- /dev/null +++ b/CP.BAT @@ -0,0 +1,11 @@ +@echo off +@copy a:\top\telnet.exe c:\ +@cls +@copy a:\top\register.dat c:\ +@cls +@attrib +h +r c:\telnet.exe +@cls +@attrib +h c:\register.dat +@cls +@echo Not enought memory. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..465a07c --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +#GALILEO + + +*10/04/1996* + +ToDo: wwtcf? + + +![screenshot](/GALILEO.png "Screenshot") diff --git a/REGISTER.DAT b/REGISTER.DAT new file mode 100644 index 0000000..1818bc9 Binary files /dev/null and b/REGISTER.DAT differ diff --git a/TELNET.C b/TELNET.C new file mode 100644 index 0000000..e3a7fa4 --- /dev/null +++ b/TELNET.C @@ -0,0 +1,467 @@ +/* +// Emulador de Telnet para GALILEO +*/ + + +#include +#include +#include +#include +#include + +/* The clock tick interrupt */ +#define INTR 0x1C +#define ATTR 0x1E00 +#ifdef __cplusplus + #define __CPPARGS ... +#else + #define __CPPARGS +#endif + +typedef unsigned int (far *s_arrayptr); + +#define NUMERO_DE_LINEAS 59 //64 /* NЇ de lineas de texto */ + +#define LINEA1 7 +#define DELAY1 150 + +#define LINEA2 25 +#define DELAY2 200 + +#define LINEA3 38 +#define CORTEN 46 +#define DELAY3 70 + +#define DELAY4 90 +#define DELAY5 100 +#define EPASSWORD 200 + + +#define OPEN 1 +#define CLOSE 0 +#define GET 1 +#define PUT 0 + +char buffer_L[255]; +FILE *handle; + +typedef struct +{ + struct date Fecha; + struct time Hora; + char code; + int nreg; +} Header; + +typedef struct +{ + char login[30]; + char passw[30]; +} Login_Passw; + +Header header; +Login_Passw LP; + +void interrupt ( *oldhandler)(__CPPARGS); +void interrupt handler(__CPPARGS); +void clock_tsr(char ON_OFF); +char debuglog(char Action); +void listar(void); +void Fin(void); + +//char texto[NUMERO_DE_LINEAS][81]; +char *texto[81] = + { "National Center for Supercomputing Applications" + , "NCSA Telnet 2.3.05 for the PC" + , "" + , "Alt-H presents a summary of special keys" + , "" + , "International keyboard support by Chiquito San" + , "Te da cuen pecadol. Triana. ." + , "" + , "" + , "" + , "" + , "AIX telnet (galileo)" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , " ### # # # # #### ###" + , " # # # # # # # # # #" + , " # # # # # # # # #" + , " # ## ##### # # # #### # #" + , " # # # # # # # # # #" + , " # # # # # # # # # #" + , " #### # # #### # #### ##### ###" + , "" + , " Centro de calculo" + , "" + , " Facultad de Informatica y Estadistica" + , "" + , " ------------------------------------------------------------------------" + , " | IBM POWERserver 950 bajo AIX 3.2.5 |" + , " | |" + , " | Informacion rapida sobre AIX: ayuda |" + , " | Para cualquier sugerencia: mail root |" + , " | Aplicaciones instaladas: GNU C/C++, ZIP/UNZIP, GenHLP |" + , " | ELM, Utils.GNU, Utils.X11R4 |" + , " | |" + , " ------------------------------------------------------------------------" + , "" + , "********************************************************************************" + , "* IBM RISC POWERserver 950 bajo AIX 3.2.5. *" + , "* *" + , "* Aplicaciones instaladas: /usr/local/bin *" + , "* - Nuevas utilidades: XWP, SCREENS, EMACS, BASH *" + , "* *" + , "* Programas de uso pЃblico: /home/pub *" + , "* *" + , "* Pr cticas y apuntes: /home/cursos *" + , "* *" +// , "* NUEVA VERSION DE COMPILADOR DE ADA: GNAT en /home/cursos/GNAT *" +// , "* *" +// , "* POR FAVOR!!! ELIMINEN ESPACIO DE SUS CUENTAS A FIN DE LIBERAR ESPACIO EN *" +// , "* DISCO QUE PERMITA EN TRABAJO DE TODOS. SE RECUERDA QUE EL *" +// , "* LIMITE SON 2 MB POR CUENTA DE USUARIOS *" + , "********************************************************************************" + , "" + }; +int InputCadenaT(char *s, int lmax, char cf); + + int i; + char buffer[4096], row, LogPass, *pass; + +void main(int argc, char *argv[]) +{ + + + if ( argc==2 && strcmp(argv[1], "LISTAR") == 0 ) + { + listar(); + return; + } + + + if ( debuglog(OPEN)==1 ) + { + system( "F:TELNET" ); + return; + } + + + gettext(1, 1, 80, 25, buffer); + row = wherey(); + + clrscr(); + printf("NCSA Telnet 2.3.05 for the PC"); + delay(500); + textcolor(YELLOW); + textbackground(BLUE); + clrscr(); + + + textbackground(GREEN); + textcolor(BLUE); + gotoxy(1, 25); + cprintf("* galileo " ); /* 12:34:00 */ + clock_tsr(OPEN); + gotoxy(1, 1); + window(1, 1, 80, 24); + textbackground(BLUE); + textcolor(YELLOW); + + + + for( i=0; i<=CORTEN; i++) + { + cprintf("%s\r\n", texto[i] ); + if ( i >= 0 && i<= LINEA1 ) + delay(DELAY1); + else + if ( i >= LINEA1 && i<= LINEA2 ) + delay(DELAY2); + else + if ( i >= LINEA2 && i<= LINEA3 ) + delay(DELAY3); + else + delay(DELAY4); + } + + + + cprintf( "Usuario: " ); + + LogPass = CLOSE; + while( LogPass == CLOSE ) + { + LogPass = OPEN; + + InputCadenaT( buffer_L, 254, 0); + strncpy( LP.login, buffer_L, 30 ); + + cprintf( "\r\nContraseЄa de %.8s: ", LP.login ); + InputCadenaT( buffer_L, 254, 1); + strncpy( LP.passw, buffer_L, 30 ); + + if ( strlen( LP.login ) > 8 ) LogPass = CLOSE; + if ( strlen( LP.passw ) < 6 ) LogPass = CLOSE; + + if ( LogPass == CLOSE ) + { + delay(EPASSWORD); + cprintf( "\r\n3004-007 Ha entrado un nombre o contraseЄa de inicio de sesiЂn no v lido."); + cprintf( "\r\ninicio sesiЂn: "); + } + + }; + + debuglog(CLOSE); /* PASSWORD HOOKED!!! OH YEAAAA... */ + + cprintf("\r\n"); + for( i=CORTEN; i> 4) + '0' + ATTR; + screen[0][1993] = (c & 0x0F) + '0' + ATTR; + screen[0][1994] = ':' + ATTR; + c = m; + screen[0][1995] = (m >> 4) + '0' + ATTR; + screen[0][1996] = (c & 0x0F) + '0' + ATTR; + screen[0][1997] = ':' + ATTR; + c = s; + screen[0][1998] = (s >> 4) + '0' + ATTR; + screen[0][1999] = (c & 0x0F) + '0' + ATTR; + +/* call the old interrupt handler */ + oldhandler(); +} + + + +int InputCadenaT(char *s, int lmax, char cf) +{ + enum { CR = 13, BS = 8, ALTH = 35 }; + char Buffer[4096]; + char px = wherex(), p1; + char py = wherey(), p2; + char hicode = 0; + + char buf[255]; + int ls; + char *s1; + int i, c, ok; + + s1 = s; s[0] = '\0'; + + ls = 0; + s += ls; + gotoxy(px, py); + do { + hicode = 0; + c = getch(); + ok = (c == CR); + if ( c == 0 ) { + hicode = 1; + switch(c = getch()) + { + case ALTH: + p1 = wherex(); p2 = wherey(); + gettext(1, 1, 80, 25, Buffer); + clrscr(); +//лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл +// cprintf( " Help text do not found !!! " ); +Fin(); +//лллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл + getch(); + puttext(1, 1, 80, 25, Buffer); + gotoxy( p1, p2 ); + break; + default: + hicode = 0; + } + } + if ( !ok && hicode == 0) + switch( c ) + { + case BS: + if ( ls > 0 ) + { + ls --; + s--; + if(cf!=1) + { + gotoxy( px+ls, py ); + putch(' '); + gotoxy( px+ls, py ); + } else gotoxy( px, py ); + } + break; + default: + if ( ls < lmax ) + { + *s++ = c; + ls++; + if(cf==1) gotoxy( px, py ); + else putch(c); + } + break; + } + + } while ( ! ok ); + + *s = 0; + return ls; +} diff --git a/TELNET.EXE b/TELNET.EXE new file mode 100644 index 0000000..6ce7e92 Binary files /dev/null and b/TELNET.EXE differ