Archive for the 'Computers' Category

Open the Sources

Wednesday, January 1st, 1997

Don’t give in to the Dark Side

There is a growing pool of software, originally written for MS-DOS, which now
becomes more and more impossible to run. People maybe liked a certain program
or used it for their hobbies, but now, they have another Operating System, and
they don’t want to use DOS or to reboot just to use this peace of program.

This, of course, happened to me with roleplaying-related programs when
I switched to Linux. I only use DOS for playing computer-games, and I only
boot it when I am sure that I will need it for an hour or more. Surely not
for using some DOS program which probably even runs on the commandline.

So there goes the solution: Recompile it. Simply. If there is a source, I
normally do that, and so I’ve got quite a collection of programs which I
ported from DOS to Linux. And so, I’d like everyone to tell:

Release your Sourcecodes!

It doesn’t hurt you to release a source-code of some program you wrote
five years ago. There is plenty of possibility to recycle old sourcecodes,
even when they’re written in some weird language such as BASIC.

So I take a look now at some possibilities and quirks regarding different
programming languages, their implementations and their portability. Especially
in regard to Unix/Linux.

Where, please?

Todays standard is C. Or some variation of it like Objective-C or C++.
So the point is:

  • Port your Program to C if possible.
  • Make it run on another operating system.

We’re gonna use the GNU C-Compiler, because it’s one of the best, and it’s
available on nearly every platform (Unix, Windows NT, OS/2, DOS, only
to mention the most common ones).

GNU C or GCC comes in three different variations, as C-compiler, C++-compiler
and objective-C-compiler. And then there are some add-ons (or merely pre-
processors) which can translate pascal and fortran to C. So there’s no such
big problem translating fortran or pascal to C. So here we go examining some
compilers and how their code can be translated to GCC.

Note: You cannot normally use conio.h or dos.h for programs not running on
DOS. So this must be circumvented in some way.

What general problems are to expect?

  • Command-line based programs should easily be ported. Problems can arise
    out of different length of data-types.
  • Character based programs using console io might give some troubles. The
    problem most often encountered will be that other operating systems do
    not allow direct manipulation of their console. This appears with conio.h
  • Graphically enhanced programs really aren’t easy to port. Instead of using
    language-specific or self-programmed graphic enhancements, svgalib must be
    used. This can be as difficult as rewriting the whole program from scratch.

What problems are to expect using specific languages?

C

  • DJGPP – The GNU-C for DOS, no changes necessary.
  • Symantec C – dos.h and conio.h, as well as makefiles
  • Turbo C – dos.h and conio.h, as well as makefiles
  • Borland C – dos.h and conio.h, as well as makefiles
  • Microsoft C – dos.h and conio.h, as well as makefiles
  • Quick C – dos.h and conio.h, as well as makefiles

Pascal

  • Turbo Pascal – dos.h and conio.h

Basic

  • GW or MS-Basic – line-numbering
  • Turbo Basic
  • Quick Basic

C Problems

dos.h

This one defines variable types and FAT-filesystem-specific things. Problems
can arise out of different lengths of data types (16 vs 32 bits).

conio.h

conio.h (console i/o) does not exist on Unix. There is a port of conio.h,
but this shouldn’t be used. Instead, ncurses.h or curses.h should be used.

Peter Keel,

1997-01

Footnotes on Security

Friday, November 1st, 1996

happily, big brother is watching you, and he wears the mask of a clown

Security has its price, and
the price is user-friendlyness. To type a password each time you turn on
your machine is not very pleasant, but the benefit is big. So you have to
decide how much security you want. The following are some guidelines, most
of them are crucial.

  • Don’t use Microsoft Explorer. ActiveX-technology permits anyone to
    get any file on your computer and maybe even to turn the computer off.
  • Don’t use DOS nor Windows nor Windows95. These Operating Systems
    have completely zero security, and Microsoft is just so fucking
    stupid; they have no idea about security. Besides that, 99% of
    all virii grow and spread on these systems. Unix knows no virii.
  • Don’t use any Microsoft program which features a macro-language,
    such as Excel and Word. Unless you want virii.
  • Use a secure operating system such as Unix or VMS. Maybe Windows NT,
    But take care on your applications in case of Windows NT…
  • Netscape or any other browser does not need to transmit information
    from you to any other site.. link the cookies to /dev/null or remove
    the write-permission.
  • Use no words as password. Not even words from other languages. No
    permutations of your own name too. Use different password for
    different machines. If you want to make it perfect, use PGP to
    generate passwords.
  • If you don’t need it, turn it off. If you’re standalone, you presumably
    don’t need to run a finger or a telnet or an ftp server. Turn it off.
  • Watch you traffic. Which program transfers unwanted information from
    your machine to elsewhere? Take special care using software to which
    you haven’t the sourcecode – e.g. that Microsoft stuff.
  • Apropos sourcecode: Real security needs the sourcecode. If you don’t
    have the sourcecode to a crucial tool – an encryption routine, for
    instance – nobody can know if it is secure. If it is secure, knowing
    the sourcecode won’t help to decrypt it (take PGP as an example).
    Don’t trust an algorithm which is not released publicly. Never.
  • Encrypt confidential Mail. Use PGP. That may not be 100% secure,
    but you’ll need much much time. It’s presumably the most secure
    thing we’ve got.
  • If it’s really secret, you might use steganographic techniques as
    well. Hide your encrypted messages in unsuspicios-looking ones.
  • Make copies, backups, whatever. Most information most people got,
    is not as critical that other people do not have to have it, but
    you do not want to loose it. Au contraire the army, for
    instance: They don’t care if they loose information, as long as
    no one else gets it. So make backups – best encrypted.
  • For data-encryption, you can use low (crypt) middle (des) or high
    (pgp) security. These should all be available on a reasonable
    operating system by default.
  • After all, man is the biggest break in security.. people talk too
    much, give away their passwords too easily, write their passwords
    down, use stupid passwords, use no passwords, use operating systems
    with no passwords, and so on and so on and so on.

Okay. Now another thing… What are the threats?

  • Brother state might read your data (not very likely)
  • Big Brother Bill might use your data for marketing (likely)
  • A hacker might (ab)use your machine (unlikely)
  • You might get a Virus (likely your problem, get another OS)
  • You might loose data (very likely)
  • Your system might crash (likely(DOS/Windows95) to unlikely(linux))
  • A person you know might mess with you data (very likely)

So you see whats the most crucial point? Make backups. Second is, use
A system which permits the use of a password (NOT Windows95, this is
ridiculous). Third, do not let anyone snoop information from your machine.
The rest is hackers of any colour, including the state and corporations.
And that’s a pretty little threat, according to the probability to happen.

Ehm.. So have a nice night.

An make backups!

Peter Keel,

1996-11