home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/padua
/
padua.7z
/
padua
/
ftp.vapor.com
/
microdot-1
/
md1_src_02.lzx
/
makekeymsg.c
< prev
next >
Wrap
C/C++ Source or Header
|
2014-05-19
|
1KB
|
55 lines
#include <stdio.h>
#include <string.h>
#include <time.h>
int main(int argc, char **argv)
{
int kl;
FILE *f;
char x[8];
int clk[8];
time_t keyval;
int c, ch;
_TZ = "GMT0";
__tzset();
if( argc != 3 )
return( 10 );
f = fopen( argv[ 1 ], "r" );
if( !f )
return( 5 );
fseek( f, 0, 2 );
kl = ftell( f );
fseek( f, 0, 0 );
time( &keyval );
timer( clk );
printf( "ABS:\tE.Lundquist@AWORLD.aworld.de (Erhard Lundquist)\r\n" );
utunpk( keyval, x );
printf( "EDA:\t%04ld%02ld%02ld%02ld%02ld%02ldW+1\r\n",
x[0] + 1970,
x[1], x[2], x[3], x[4], x[5]
);
printf( "ROT:\t\r\n" );
printf( "MID:\tMicDK%lx_%lx@AWORLD.aworld.de\r\n", clk[ 0 ], clk[ 1 ] );
keyval ^= 0x7320feff;
printf( "BET:\tXMD:Key%lx\r\n", keyval );
printf( "X-MICRODOTKEY:\tXMD:Key%lx\r\n", keyval );
printf( "EMP:\t%s\r\n", argv[ 2á]á);
printf( "LEN:\t%ld\r\n", kl );
printf( "ZUSAMMENFASSUNG:\tMicroDOT-Key -- muss sich selbststaendig installieren!\r\n" );
printf( "ZNETZ-ABS: E.LUNDQUIST@AWORLD.ZER\r\n" );
printf( "TYP:\tBIN\r\n\r\n" );
for( c = 0; c < kl; c++ )
{
ch = getc( f );
putchar( ch );
}
fclose( f );
return( 0 );
}