Shell Programming
for beginners
_________________________________________________________
Guide to (mostly) Harmless Hacking
Vol. 5 Programmers' Series
No. 1: Shell Programming
_________________________________________________________
Honest to gosh -- programming is easy. If you have never
programmed in your life, today, within minutes, you will become
a programmer. I promise. And even if you are already a programmer,
in this Guide you just might discover some new tricks that are
lots of fun.
Amazingly enough, many people who call themselves hackers
don't know how to program. In fact, many el1te haxor types claim
they don't need to know how to program, since computer programs
that do kewl stuph like break into or crash computers are available
for download at those HacK3r Web sites with
the animated flames and skulls and doom-laden organ music.
But just running other people's programs is not hacking.
Breaking into and crashing other people's computers is not hacking.
Real hacking is exploring and discovering -- and writing your
own programs!
******************************************************** In
this Guide you will learn:
* Why should hackers learn how to program?
* What is shell programming?
* How to create and run scripts
* Shell scripts on the fly
* Slightly stealthy scripts
* Examples of fun hacker scripts
Plus, in the evil genius tips, you will learn how to:
Why Should Hackers Learn How to Program?
Back in 1971, when I was 24, I was as nontechnical as
they come. But my husband at the time, H. Keith Henson, was always
talking about "buffer in," "buffer out" and
assembly language stuff.
Keith was one of the earliest of hackers, and a hacker
in the pure sense, someone who wasn't afraid to try unusual things
to save memory (a scarce resource on even the biggest computers
of the 1970s) or cut CPU cycles. So one June morning, tired of
me looking dazed when he came home babbling excitedly about his
latest feat, he announced, "You're going to learn how to
program." He insisted that I sign up for a course in Fortran
at the
University of Arizona.
The first class assignment was to sit at a punch card
machine and bang out a program for the CDC 6400 that would sort
a list of words alphabetically. It was so fun that I added code
to detect input of characters that weren't in the alphabet, and
to give an error message when it found them.
The instructor praised me in front of the class, saying
I was the only one who had coded an extra feature. I was hooked.
I went on to write programs with enough length and complexity
that debugging and verifying them gave me a feel for the reality
of the Turing Machine Halting Problem theorem.
I discovered you don't have to be a genius to become
a professional programmer. You just have to enjoy it enough to
work hard at it, enjoy it enough to dream about it and fantasize
and play with programming in your mind even when you aren't in
front of a keyboard.
******************************************************
Evil Genius tip: The Turing Machine Halting
Problem theorem says that it is impossible to thoroughly debug
-- or even explore -- an arbitrary computer program. In practical
terms, this means that it super hard to make a computer network
totally secure, and that it will never be possible to write an
antivirus program that can protect against all conceivable viruses.
For a more rigorous treatment of the Turing Machine Halting Problem
theorem -- yet written in language a non-mathematician can understand
-- read the "Giant Black Book of Computer
Viruses" by Dr. Mark Ludwig, American Eagle Publications.
This book will also teach you how to write the most deadly viruses
on the planet -- or programs to fight them! You can order it
from http://www.amazon.com.
Warning-- in order to fully appreciate this book, you have to
know assembly language for 80x86 CPUs. But it is the most electrifying
computer manual I have ever read!!!!
********************************************************
That is the heart of the hacker spirit. If you are driven
to do more and greater things than your job or school asks of
you, you are a real hacker. Kode kiddies who think breaking into
computers and typing f*** every third word while on IRC are not
hackers. They are small-time punks and vandals. But if you aspire
to become a true hacker, you will become a programmer, and reach
for the stars with your code.
More shell programming--->>