Thursday, December 31, 2015

Odds and ends.


1. What is their ip?

$ ./getipinfo.sh walmart.com
Getting information for domain: walmart.com [ 161.170.244.20 ]...
NetRange:       161.163.0.0 - 161.177.255.255
OriginAS:       AS32851
OrgName:        Wal-Mart Stores, Inc.
City:           Bentonville
Country:        US
NetRange:       161.170.0.0 - 161.170.255.255
OriginAS:      
OrgName:        Wal-Mart Stores, Inc.
City:           Bentonville
Country:        US

[code]
    #!/bin/bash
    # A sample shell script to print domain ip address hosting information such as
    # Location of server, city, ip address owner, country and network range.
    # This is useful to track spammers or research purpose.
    # -------------------------------------------------------------------------
    # Copyright (c) 2006 nixCraft project <http://cyberciti.biz/fb/>
    # This script is licensed under GNU GPL version 2.0 or above
    # -------------------------------------------------------------------------
    # This script is part of nixCraft shell script collection (NSSC)
    # Visit http://bash.cyberciti.biz/ for more information.
    # -------------------------------------------------------------------------
    # Last updated on Mar/05/2010
    # -------------------------------------------------------------------------
   
    # Get all domains
    _dom=$@
   
    # Die if no domains are given
    [ $# -eq 0 ] && { echo "Usage: $0 domain1.com domain2.com ..."; exit 1; }
    for d in $_dom
    do
    _ip=$(host $d | grep 'has add' | head -1 | awk '{ print $4}')
    [ "$_ip" == "" ] && { echo "Error: $d is not valid domain or dns error."; continue; }
    echo "Getting information for domain: $d [ $_ip ]..."
    whois "$_ip" | egrep -w 'OrgName:|City:|Country:|OriginAS:|NetRange:'
    echo ""
    done
[/code]

-------

2. Emulating kitt led demo with with ascii.

$ ./testshow.sh 1

[code]
#!/bin/bash
clear
tput cup 1  1; echo "11111111"
sleep $1
tput cup 1  1; echo "00000000"
sleep $1
echo "infinite loops [ hit CTRL+C to stop]"
for (( ; ; ))
do
tput cup 1  1; echo "10000000"
sleep $1
tput cup 1  1; echo "11000000"
sleep $1
tput cup 1  1; echo "01100000"
sleep $1
tput cup 1  1; echo "00011000"
sleep $1
tput cup 1  1; echo "00001100"
sleep $1
tput cup 1  1; echo "00000110"
sleep $1
tput cup 1  1; echo "00000011"
sleep $1
tput cup 1  1; echo "00000001"
sleep $1
tput cup 1  1; echo "00000000"
sleep $1
tput cup 1  1; echo "00000001"
sleep $1
tput cup 1  1; echo "00000011"
sleep $1
tput cup 1  1; echo "00000110"
sleep $1
tput cup 1  1; echo "00001100"
sleep $1
tput cup 1  1; echo "00011000"
sleep $1
tput cup 1  1; echo "00110000"
sleep $1
tput cup 1  1; echo "01100000"
sleep $1
tput cup 1  1; echo "11000000"
sleep $1
tput cup 1  1; echo "10000000"
sleep $1
tput cup 1  1; echo "00000000"
sleep $1
done
tput cup 1  1; echo "11111111"
sleep $1
tput cup 1  1; echo "00000000"
sleep $1
[/code]

------

3. Note taker
$ gcc note.c -o note

$ ./note
Thu Dec 31 11:25:36 2015    test

$ ./note this is also a test

$ ./note
Thu Dec 31 11:25:36 2015    test
Thu Dec 31 11:28:18 2015    this is also a test

[code]
#include <stdio.h>
#include <time.h>

#define note_file "NOTES.TXT"

int main(int argc, char**argv)
{
    FILE *note = 0;
    time_t tm;
    int i;
    char *p;

    if (argc < 2) {
        if ((note = fopen(note_file, "r")))
            while ((i = fgetc(note)) != EOF)
                putchar(i);

    } else if ((note = fopen(note_file, "a"))) {
        tm = time(0);
        p = ctime(&tm);

        /* skip the newline */
        while (*p) fputc(*p != '\n'?*p:'\t', note), p++;

        for (i = 1; i < argc; i++)
            fprintf(note, "%s%c", argv[i], 1 + i - argc ? ' ' : '\n');
    }

    if (note) fclose(note);
    return 0;
}

[/code]

4. Dr. Frock
e$ ./frock.sh
WELCOME TO DR. FROCK'S COUCH
ok
OK
WHY DO YOU SAY OK?
eju sm i hrtr.
EJU SM YOU HRTR
WHY DO YOU SAY EJU SM YOU HRTR ?
why am i here
WHY ARE YOU HERE
YOU TELL ME WHY ARE YOU HERE

[code]
 echo "WELCOME TO DR. FROCK'S COUCH"
while [ "1" = "1" ]
do
read line
line=`echo $line | tr "[a-z]" "[A-Z]" |
     sed 's/^/ /; s/$/ /; s/\./ /g
     s/ I / i /g; s/ YOU ARE/ you are/g; s/ AM / am /g; s/ ME / me /g
     s/ YOU / you /g
     s/ MY / my /g; s/ YOUR / your /g; s/ MINE / mine /g; s/ ARE / are /g
     s/ me / YOU /g; s/ my / YOUR /g; s/ your / DR. FROCKS /g;
     s/ i / YOU /g; s/ am / ARE /g;s/ mine / YOURS /g; s/ are / IS /; s/ you / DR. FROCK /
     s/^ //; s/ $//'`
echo "$line"
case "$line" in
   *YOU\ ARE\ *)  echo "`echo $line |
           sed 's/^.*YOU\ ARE/WHY DO YOU THINK YOU ARE/' `?" ;;
   *YOU\ HAVE\ *) echo "`echo $line |
           sed 's/^.*YOU\ HAVE/HOW LONG HAVE YOU HAD/'`?" ;;
   YOU*) echo "WHEN DID YOU FIRST REALIZE THAT $line?" ;;
   *BECAUSE*) echo "IS THAT REALLY THE REASON?";;
   *DO\ DR.\ SPOCK\ THINK*) echo "CAN YOU ANSWER THAT YOURSELF?";;
   GO*|EAT*|TRY*|HELP*|PUT*) echo "WHY DO YOU WANT ME TO $line?";;
   YES*) echo "HOW CAN YOU BE SURE?";;
   NO*) echo "TRY NOT TO BE SO NEGATIVE.";;
 *MOTHER*|*FATHER*|*BROTHER*|*SISTER*) echo "TELL ME MORE ABOUT YOUR FAMILY.";;
   WHY*|WHO*|WHAT*|HOW*) echo "YOU TELL ME `echo $line | sed s/?/./g`";;
   QUIT) exit;;
   *) echo "WHY DO YOU SAY $line?";;
esac
done
[/code]

5. snoopy calendar (prints current by default.)


$ ./snoopycal.sh
           ,-~~-.___.                                         ---------
          / ()=(()   \                                         
         (   (        0                                       ---------
          \._\, ,----'
     ##XXXxxxxxxx
            /  ---'~;
           /    /~|-
         =(   ~~  |
   /~~~~~~~~~~~~~~~~~~~~~\
  /_______________________\
 /_________________________\
/___________________________\
   |____________________|
   |____________________|
   |____________________|
   |                    |

   December 2015     
Su Mo Tu We Th Fr Sa 
       1  2  3  4  5 
 6  7  8  9 10 11 12 
13 14 15 16 17 18 19 
20 21 22 23 24 25 26 
27 28 29 30 31       
                     

[code]

echo "           ,-~~-.___.                                         ---------"
echo "          / ()=(()   \\                                         $1 $2"
echo "         (   (        0                                       ---------"
echo "          \\._\\, ,----'"
echo "     ##XXXxxxxxxx"
echo "            /  ---'~;"
echo "           /    /~|-"
echo "         =(   ~~  |"
echo "   /~~~~~~~~~~~~~~~~~~~~~\\"
echo "  /_______________________\\"
echo " /_________________________\\"
echo "/___________________________\\"
echo "   |____________________|"
echo "   |____________________|"
echo "   |____________________|"
echo "   |                    |"
echo ""
cal $1  $2

[code]








[/code]

Tuesday, December 29, 2015

Hunt for Red October

The basis of this Instructable is based on the dialog from the movie known as "The hunt for the Red October". In the movie, one of the key lines was I think "One ping and one ping only". Pinging was a method by submarines equipped with sonar to detect what is around them. Normally you would use more than one ping. In computing we also have a program called ping that does the same thing to detect what is around on the network. There is a very powerful program called nmap that usually automates such activity. That usually takes some kind of administrative power to implement. We will be using a simple linux batch file (could be easily converted to other platforms) to detect what is around us. This tool is perfect for the home network. It will probably not detect what is known as "Man in the middle devices", but at least you can see the visible systems on your network.
Screenshot-eddie@oesrvr104: ~.png
The code.

ping.sh: (do not forget "chmod +x ping.sh)

[code]
for i in {1..254}
do
ping 192.168.1.$i -c1 -w1 -v | grep "icmp_seq=1"
done
[/code]

If you have a different network, you will have to change "192.168.1" accordingly, here again we are using the good old "grep" command to extract data from the return stream. it is our sonar scope. Let's run it.
$ ./ping.sh
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.852 ms
64 bytes from 192.168.1.31: icmp_seq=1 ttl=64 time=0.260 ms
64 bytes from 192.168.1.99: icmp_seq=1 ttl=255 time=2.75 ms
64 bytes from 192.168.1.109: icmp_seq=1 ttl=64 time=0.261 ms
64 bytes from 192.168.1.115: icmp_seq=1 ttl=64 time=0.064 ms
$ _

Ok, there are five devices on the network. We need to know more. There is what is call DNS or "Domain naming service". We can use the router to tell us what the ipaddresses maybe are known as.

The code.

nslookup.sh: (Do not forget to make it executable with chmod +x nslookup.sh")

[code]
for i in {1..254}
do
nslookup 192.168.1.$i |grep name
done
[/code]

Let's run it.

$ ./nslookup.sh
1.1.168.192.in-addr.arpa name = my_network.
10.1.168.192.in-addr.arpa name = router2.
20.1.168.192.in-addr.arpa name = router3.
31.1.168.192.in-addr.arpa name = oesrvr1.
115.1.168.192.in-addr.arpa name = oesrvr104
$_

Notice the ipadresses are backwards, but we still can identify units on the network from the list. Two devices show up known as router2 and router3. I know that they are not connected to the network at this time. They just have reserved names in the router. The unit at 99 is actually the print server and should have a reserved name in the router, I can take care of that later. 109 is a temp machine I have set up to test some software. Now if there were any unknown numbers, they would need to be investigated immediately. Again you would need to change "192.168.1." to work with your network.

Ever wondered what your computer is looking for. Some of these could be avenues for hackers to get into your machine. Actually this is looking for processes bound to specific ports.

Use the following command  to see wbat particular port your computer is listening for:

Terminal - Look for the process bound to a certain port:
sudo netstat -tulpn | grep :8080

Look for the process bound to a certain port 
Or you could look at all the ports to 1000;
$ cat portscan.sh
for i in {1..1000}
do
echo $i
sudo netstat -tulpn | grep :$i
done
$./portscan.sh > portscan.file

You might see something  like this in the file.
...
...
628
629
630
631
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      2217/cupsd
tcp6       0      0 ::1:631                 :::*                    LISTEN      2217/cupsd
632
633
...
...

Cups is the unix print mechanism, Something you might want to keep and eye on once in a while or less.

--------------
addendum:
$ cat pingall.sh
a=""
for i in {1..254}
do
ping 192.168.1.$i -c1 -w1 -v | grep "icmp_seq=1"
done

$ ./pingall.sh
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.623 ms
64 bytes from 192.168.1.32: icmp_seq=1 ttl=64 time=0.113 ms
64 bytes from 192.168.1.99: icmp_seq=1 ttl=255 time=4.77 ms
64 bytes from 192.168.1.125: icmp_seq=1 ttl=64 time=1.26 ms
64 bytes from 192.168.1.149: icmp_seq=1 ttl=64 time=0.306 ms

Went back to the original system and decided to do just a single ping.

$ ping -c 1 192.168.1.32
PING 192.168.1.32 (192.168.1.32) 56(84) bytes of data.
64 bytes from 192.168.1.32: icmp_req=1 ttl=64 time=0.363 ms
--- 192.168.1.32 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.363/0.363/0.363/0.000 ms

After looking at it about a thousand times, it finally hit me. The difference was reg vs seq. So I changed the batch file and all was well,

$ cat pingall.sh
a=""
for i in {1..254}
do
ping 192.168.1.$i -c1 -w1 -v | grep "icmp_req=1"
done

$ ./pingall.sh
64 bytes from 192.168.1.1: icmp_req=1 ttl=64 time=0.527 ms
64 bytes from 192.168.1.32: icmp_req=1 ttl=64 time=0.293 ms
64 bytes from 192.168.1.99: icmp_req=1 ttl=255 time=5.08 ms
64 bytes from 192.168.1.125: icmp_req=1 ttl=64 time=0.264 ms
64 bytes from 192.168.1.149: icmp_req=1 ttl=64 time=0.068 ms

Whew.... details details details.......

Monday, December 28, 2015

What's in your computer?

  Picture of What's in your wallet (I mean your computer)?
What happens when computer people get together much like old car talk. What's in you machine? You want to say more than I don's know. The newest devices such as the touchpads, some netbooks, and etc. today are pretty much unfortunately throwaways. As for desktop computers,  at least for a while you can upgrade them. It is very useful to know what equipment and and in some cases what software is on the inside. For insurance purposes, you would be well advised to have such a list tucked away in a safe deposit box or where ever. So I went on a little research expedition to find out what might be used to find out what is in my computer.
Macintosh

OS/X: (textedit to view) You can go to the system profiler and output a text list of the hardware. More info at:

http://www.intego.com/services/systemProfiler.html and

http://macosx.com/forums/howto-faqs/26204-howto-list-your-installed-applications.html

Windows 7
Microsoft windows: (notepad to view)

A script for older systems: http://richardspowershellblog.wordpress.com/2007/07/21/hardware-reporting-script-vbscript-and-powershell-versions/

For MSWindows 7, I am told you can use the Devcon utility to print out to a file of the hardware. More information at:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff544746%28v=vs.85%29.aspxhttp://superuser.com/questions/278035/windows-7-device-manager-in-text-mode

Software list:  http://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/savingprinting-installed-programs-list/3f4a5253-d362-4765-a673-a4d552a67e7d

Linux (debian based)
Debian based Linux: (gedit or kedit to view)(Other linux systems would be similar)

Wrote a batch file to get the information and save it to a file. A lot of the lines are commented out that would probably be used only for debugging. Additional files may have to be installed. Uncommenting those lines will create a humongous file.

usage: sudo ./hwinfo2file.sh filename

$ sudo ./hwinfo2file.sh My_desktop_computer_info

=================================

oesrvr104

getting stats and saving as My_desktop_computer_info.txt.

No LSB modules are available.

$ _

Cut and paste what is between the [code][/code] lines into a text file and then

$ chmod +x hwinfo2file.sh

hwinfo2file.sh

[code]
echo "================================="
cat /etc/hostname
echo "getting stats"
file=$1.txt
# file="system.txt"
echo " " > $file
echo "=====================================" >> $file
echo  get computername >> $file
cat /etc/hostname >> $file
echo "=====================================" >> $file
echo  get current ip connections >> $file
sudo ifconfig >> $file
echo "-------------------------------------" >> $file
echo  get linux version >> $file
lsb_release -a >> $file
echo "-------------------------------------" >> $file
echo  get memory specs >> $file
free >> $file
echo "-------------------------------------" >> $file
echo  get file storage statistics >> $file
df -h >> $file
echo "-------------------------------------" >> $file
echo  get mounted file system list >> $file
cat /etc/fstab >> $file
echo "-------------------------------------" >> $file
echo  get pci specs >> $file
sudo lspci >> $file
echo "-------------------------------------" >> $file
echo  get loaded modules >> $file
sudo lsmod >> $file
echo "-------------------------------------" >> $file
echo  get current usb attachments. >> $file
sudo lsusb >> $file
echo "-------------------------------------" >> $file
echo get repos >> $file
cat /etc/apt/sources.list >> $file
# echo "-------------------------------------" >> $file
# echo  get installed software >> $file
# sudo dpkg --get-selections >> $file
# echo "-------------------------------------" >> $file
# echo  get hardware info >> $file
# sudo lshw >> $file
# echo "-------------------------------------" >> $file
# echo  get scsi devices >> $file
# sudo lsscsi >> $file
echo "-------------------------------------" >> $file
echo  display /etc/issue >> $file
cat /etc/issue >> $file
# echo "-------------------------------------" >> $file
# echo  get boot up info >> $file
# dmesg >> $file
echo "-------------------------------------" >> $file
echo  get users >> $file
cat /etc/passwd >> $file
echo "-------------------------------------" >> $file
echo  get current users on system >> $file
who >> $file
# echo "-------------------------------------" >> $file
# echo  get system messages >> $file
# cat /var/log/messages >> $file
# echo "-------------------------------------" >> $file
# echo  get rootkit checker log >> $file
# cat /var/log/rkhunter.log >> $file
# echo "-------------------------------------" >> $file
# echo  get syslog >> $file
# cat /var/log/syslog >> $file
echo "-------------------------------------" >> $file
echo  get scheduled events >> $file
cat /etc/anacrontab >> $file
cat /etc/crontab >> $file
[/code]

Sunday, December 27, 2015

Computing came to the Dallas Cowboys


Whether or not the Dallas Cowboys are America's favorite team any more is not important. What the did do was bring electronic computing to football and spawned the computers in other sports. Now if you watch any major football game you can see electronic tablets at the  benches of many team. not only for statistics, but to replace the photos normally strewn all over the sidelines.



Prior to joining the Cowboys, Tex Schramm had worked as a CBS Sports executive, helping broadcast the Winter Olympics, where he became aware of and intrigued by the use of computers. He decided that computers could help the Cowboys choose players from the draft, including young athletes other clubs might miss.

"I decided ... that I would have to find an objective method of deciding on the worth of a football player ... I thought we had to find a way to judge players without emotion,” Schramm told Sports Illustrated in 1968. “We used computers to figure scores and standings when I was in charge of CBS coverage of the Winter Olympics … and I discussed using computers to evaluate football players with IBM experts then. But I didn't get a chance to put the idea into operation until 1962, when I was with the Cowboys.”

That year, Schramm asked Service Bureau Corp., a subsidiary of International Business Machines Corp. (NYSE:IBM), to develop a method of computerizing the football draft.



More information:

Tex Schramm, formerly general manager of the Los Angeles Rams and now president of the Dallas Cowboys, decided upon computerized consideration of football players while he was associated with CBS. The Rams, during the years Schramm worked for Owner Dan Reeves and luxuriated in what was then by far the most efficient scouting system in pro football, consistently came up with the best draft in the National Football League and just as consistently lost to other teams that grabbed their discards. Deluged with fine young talent in those years, the Rams tended to drop ripening players in favor of bringing in the new ones. "While I was with CBS, I thought the whole thing out very carefully," Schramm said the other day. "I decided that I had undervalued experience and overvalued youth. And I decided, too, that I would have to find an objective method of deciding on the worth of a football player when I went back into pro football.



The only defect in the Ram scouting system was that the people involved all had built-in prejudices of one sort or another. I thought we had to find a way to judge players without emotion. We used computers to figure scores and standings when I was in charge of CBS coverage of the Winter Olympics in 1958, and I discussed using computers to evaluate football players with IBM experts then. But I didn't get a chance to put the idea into operation until 1962, when I was with the Cowboys."

Saturday, December 26, 2015

User listing.




Sometimes you may want to know who has access to a system and even some of the applications that might be installed.  All you have to do is to get a user listing.

lsuser.sh
[code]
 #=================================
# lsuser - list users
#=================================
# Assignments
# --------------------------------
datafile="/etc/passwd"
# end assignments

#=================================

# Data input
#---------------------------------
while read line
do echo $line | cut -d: -f1
done < $datafile
[/code]

$ chmod +x lsuser.sh

$ ./lsuser.sh

root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
...
...

Note if the batch file is is a user accessible area on another server you can

$ ssh oeorgan1 "lsuser.sh"

Now the write command

$ write eddie
test
<ctrl-d>



Message from eddie@oedt01 on pts/1 at 14:19 ...
test
EOF

write sends a message to another user.
Syntax

write user [tty]

Description

The write utility allows you to communicate with other users, by copying lines from your terminal to theirs.

When you run the write command, the user you are writing to gets a message of the format:

Message from yourname@yourhost on yourtty at hh:mm ...

Any further lines you enter will be copied to the specified user's terminal. If the other user wants to reply, they must run write as well.

When you are done, type an end-of-file or interrupt character. The other user will see the message ‘EOF’ indicating that the conversation is over.

You can prevent people (other than the super-user) from writing to you with the mesg command.

If the user you want to write to is logged in on more than one terminal, you can specify which terminal to write to by specifying the terminal name as the second operand to the write command. Alternatively, you can let write select one of the terminals; it will pick the one with the shortest idle time. This is so that if the user is logged in at work and also dialed up from home, the message will go to the right place.

The traditional protocol for writing to someone is that the string ‘-o’, either at the end of a line or on a line by itself, means that it is the other person's turn to talk. The string ‘oo’ means that the person believes the conversation to be over.
Options
user     The user to write to.
tty     The specific terminal to write to, if the user is logged in to more than one session.
Examples

write hope

Write a message to the user hope. After entering this command, you will be placed on a blank line, where everything you type will be sent to the other user (line by line). Typing the interrupt character (CTRL-C, by default) will return you to the command prompt, and end the write session.

write hope tty7

Write a message to the user hope on terminal tty7.

You can even send messages with sendmessage.sh

sendmessage.sh
[code]

#!/bin/bash

SendMessage()
{
    com=`tty`
    set `who am i`
    who | grep -v "$1" >filef.txt

    exec < filef.txt  
    array=""

    while read line
    do
        set $line
        echo $1
        array+=($1)
    done

    rm filef.txt
    exec <$com

    echo "====================>   Select User Number  <===================="
    echo

    select userName in ${array[@]} 
    do
        UserNam=$userName
        if [ -n $UserNam ]; then
            break
        fi
    done

    unset array #Clear the Array

    echo 
    echo

    echo "===================================> Message Body <==================================="

    mesg y
    read -p "put here your Message==> " messagel

    echo $messagel | write $UserNam

    if [ $? -eq 0 ]; then
        echo "It has been sent successfully.............ok"
        #return 0
    else
        echo "Message Failed to send ..............No!!"
        echo "Maybe It is not available for you To send Message To hem "
        return 1
    fi  
}

SendMessage
[/code]

$ chmod +x sendmessage.sh

$./sendmessage.sh

You can use the mesg command to control non-root messages to you

The mesg command allows you control write access to your terminal by other users.
Syntax

mesg [n|y]

Description

The write command allows other users to send a message to your terminal session; the mesg command is used to toggle these messages on or off.
Options
n     Prevents the display of terminal messages from other users. This is like using a "do not disturb" sign.
y     Allows messages to be displayed on your screen.

If no option is given, mesg displays the current access state of your terminal.
Examples

mesg y

Allow other users to send you messages.

mesg n

Disallow other users from being able to send you messages.

mesg

Display the current write status of your terminal.

Let's not forget talk

Chat with other logged-in users.
Syntax

talk person [ttyname]

Description

Talk is a visual communication program which copies lines from your terminal to that of another user, much like an instant messenger service. When first called, talk contacts the talk daemon on the other user's machine, which sends the message below.

Message from TalkDaemon@his_machine...
talk: connection requested by your_name@your_machine.
talk: respond with: talk your_name@your_machine

to that user. At this point, he then replies by typing

talk your_name@your_machine

It doesn't matter from which machine the recipient replies, as long as his login name is the same. Once communication is established, the two parties may type simultaneously; their output will appear in separate windows. Typing control-L (^L) will cause the screen to be reprinted. The erase, kill line, and word erase characters (normally ^H, ^U, and ^W, respectively) will behave normally. To exit, just type the interrupt character (normally ^C); talk then moves the cursor to the bottom of the screen and restores the terminal to its previous state.

talk supports scrollback; use esc-p and esc-n to scroll your window, and ctrl-p and ctrl-n to scroll the other window.

If you do not want to receive talk requests, you may block them using the mesg command. By default, talk requests are normally not blocked. Certain commands, in particular nroff, pine, and pr, may block messages temporarily in order to preserve their own output.
Options
person     If you want to talk to someone on your own machine, then person is just the person's login name. If you want to talk to a user on another host, then person is of the form 'user@host'.
ttyname     If you want to talk to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name, where ttyname is of the form 'ttyXX' or 'pts/X'.
Examples

talk hope

Talk to user hope.

Find out who is on to send messages.

$ w
 14:43:28 up  1:46,  2 users,  load average: 0.09, 0.08, 0.08
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
eddie    pts/1    oedt01           13:35    0.00s  1.38s  0.03s w

or

$ ssh oeorgan1 "w"
 14:44:34 up  1:47,  2 users,  load average: 0.03, 0.07, 0.07
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
eddie    pts/1    oedt01           13:35    1:06   1.36s  1.36s -bash

Have fun.

Friday, December 25, 2015

Homemade electronic parts

Use at your own risk!! Get help before hand from a professional.


A device used to store an electric charge, consisting of one or more pairs of conductors separated by an insulator.





A semiconductor device with two terminals, typically allowing the flow of current in one direction only. A thermionic tube having two electrodes (an anode and a cathode).
 

An inductor, also called a coil or reactor, is a passive two-terminal electrical component which resists changes in electric current passing through it. It consists of a conductor such as a wire, usually wound into a coil. When a current flows through it, energy is stored temporarily in a magnetic field in the coil.


Transformer:

A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. Resistors act to reduce current flow, and, at the same time, act to lower voltage levels within circuits





Thursday, December 24, 2015

Tuxpaint coloring book.

Make your own coloring book on the computer.  There are sites such as http://azcoloring.com/coloring-on-the-computer They will let you download or even printout pictures for coloring.


But you can take a screenshot of just the picture you want, such as Santa.

Then you will want to import it into tuxpaint. (I renamed it first.)

$ cd Pictures/
$ tuxpaint-import santa.png
Using save directory: /home/eddie/.tuxpaint/saved
grep: /usr/local/etc/tuxpaint/tuxpaint.conf: No such file or directory
Using 832 x 696 images (for 1024 x 800 Tux Paint
santa.png -> /home/eddie/.tuxpaint/saved/20151224100844.png
pnmtopng: 173 colors found

Then go into tuxpaint to import the file


Import the file.


Then start coloring to your hearts content.


So far I have just only used the magic/fill commands. Have fun!

Wednesday, December 23, 2015

Free as in speech and some things even free as in beer.


As mentioned in a recent Linux foundation video, there is so much software available for the open source world it boggles the mind. The software is not just for the desktop but servers, embedded systems, routers and whole lot more. Not only that you get the source code in most cases so you can change it yourself to fit your needs. Everyone knows that one size does not fit all. Take for instance the proprietary world where you get nickeled and dimed to death with every software add-on. Excepting until recently even the proprietary operating systems required a tax so to speak. Open source has the competition changing their tune. so they can compete.


Then you can consider open source options. Options you can install with linux without paying an extra penny not to mention the terminal server also,

$ tasksel --list-tasks
i desktop    Debian desktop environment
u web-server    Web server
u print-server    Print server
u database-server    SQL database
u dns-server    DNS Server
u file-server    File server
u mail-server    Mail server
i ssh-server    SSH server
u laptop    Laptop





Many people now are wanting to get away from software taxes by opting to go with open source software instead of the traditional possibly expensive proprietary software. With proprietary, in most cases  you do not get the source code so you can make changes when and if needed. That is like saying you can not work on your own devices such as a lawnmower. Seems like you have to get either a new license or a new version every ten minutes or so, you have to deal with the complex limited licensing of proprietary software.  That can lead to some legal entanglements if you are not careful.  Many people now are wanting to get away from software taxes by opting to go with open source software instead of the traditional possibly expensive proprietary software. When you mention having to keep up with  product keys,  people shriek. Most cases they are not needed for open source software.


One thing I like about open source is you can leverage your older hardware to have a larger ROI (Return on investment) meaning you may not have to purchase new hardware every ten minutes. We are still using equipment from the 1990's for special purposes such as linux training. They run the same linux newer machines do! It is even used as a web server.




If you are a company that has a tight bottom line, ask yourself how much do you pay for proprietary licenses? Then ask yourself if you went open source how much would that save you?  One word of caution, please do not give up your present systems till you see what really will work.


Tuesday, December 22, 2015

Make your palmtop more valuable.



Do  you feel as if your palmtop is a one trick pony now. Can your palmtop do all this? They can! Either through a web browser or a remote desktop viewer.  having a local web server, you can install applications that will run without the internet but do work with the local intranet.There is even software that will emulate a computer desktop.



Most palmtops have terminal server clients.  With the remote desktop viewer you can access another working computer on the network be it Linux, OS/x, or even Mswindows. You start the rdp (remote desktop protocol viewer) software and then enter the hostname address.

Picture of Thin client setup.

Of you will need to set up a login and password on the host for if nothing else minimal security restrictions.

Picture of Logging in

Once your in, you can use the hosts as if that operating system was on your palmtop! Here we have access a remote Linux computer. You can even get a remote Raspberry Pi desktop, so the RPi does not need a monitor.


For more information see:
http://www.instructables.com/id/Using-Thin-Clients-a-quick-way-with-Debian-linux/

One last thing there are specialty software application that will let you access hardware such as the Arduino for all kind of experiments.

Monday, December 21, 2015

Were the Wright brothers first?


Being from Pittsburg, Texas my step grandfather used to talk about this contraption a lot.  In fact he said of Baptist ministers "they were always a lot of hot air." Methodists and Baptists were of different breeds. Never found out whether the family had stock in that firm, but I doubt it or he did not want grandma to know.


File:Northeast Texas Rural Heritage Museum August 2015 32 (Ezekiel Airship).jpg

Text reprint from http://www.roadsideamerica.com/story/11610

A handful of obscure, motorized airplanes claim to have been flown before the Wright brothers did so in 1903. But none has the civic support, or the biblical pedigree, of the one in Pittsburg, Texas, where a life-size replica hangs in an annex of the Depot Museum.

The Rev. Burrell Cannon, a local Baptist minister, read in the Book of Ezekiel of "living creatures" rising from the earth and a "wheel within a wheel." He believed that these Bible passages contained the secret to powered flight.




Cannon formed The Ezekiel Air Ship Mfg Co., sold $20,000 in stock to his neighbors, and supervised the construction of his contraption in a local iron foundry.

It had large, fabric-covered wings and was powered by a small engine that turned four sets of vertical paddles mounted on wheels within wheels. It would fly the same way that a side wheel paddleboat churns its way through water -- except that paddles don't work that way in air, and Ezekiel mentioned nothing about wings or an engine. So how could it be biblical, and how could it possibly fly?

Nevertheless, in the autumn of 1902 -- so the story goes -- one of the workers in the foundry decided to take the airship out for a test run. He got it maybe 15 feet in the air, and covered about 50 yards. But there were no newspaper reports of the flight, no photographs, no eyewitness accounts.

File:Northeast Texas Rural Heritage Museum August 2015 33 (Ezekiel Airship).jpg

Vernon Holcomb, at the Depot Museum, told us that he knew of "five documented second-hand accounts," a standard of proof that would only pass muster with the most desperate pseudo-investigative shows on cable.
And yet, if true, the Rev. Cannon's airship would have beaten the Wright Brothers' craft by over a year.

For some unexplained reason the airship was never flown again. Instead, the reverend, seeking funds, put it on a railroad flatcar to ship it to the 1904 St. Louis World's Fair. It only got as far as Texarkana, and then was destroyed by a storm.

 File:Northeast Texas Rural Heritage Museum August 2015 36 (Ezekiel Airship exhibit).jpg


Thin as the evidence may be for Rev. Cannon's success, it was good enough for Pittsburg. In 1987 the local Optimist's Club built a full-scale replica of what is now called "The Ezekiel Airship," based on one surviving photo -- "So clear that you can see the bolts," according to Vernon -- and displayed it in a local restaurant.

File:Ezekielairship-scientificamerican-1901.jpg

In 2001 Pittsburg residents built a custom annex to the town's Northeast Texas Rural Heritage Depot and Museum, hung the replica from the rafters, and hired a firm from Houston to design an exhibit around it. The result is surprisingly impressive and informative. The Optimists did an excellent job -- their replica looks as if it could hang in the Smithsonian -- although they concede that it is too heavy to fly. According to Vernon, the reverend somehow was able to build the same airship at the weight. How he did so is yet another mystery. No parts survive, nor any patent drawings or plans. "He didn't want anyone to see what he was doing," Vernon explained.



The state of Texas, never shy about boasting, has erected an official historical plaque two blocks south of the museum. It marks the field where the airship supposedly flew, either on biblical smarts or just a lot of Texas hot air.

 For more information see wikipedia: https://en.wikipedia.org/wiki/Ezekiel_Airship

Yet another rabbit ears.

TV free-way antenna seems very special and different. it is the third incarnation of their free over the air tv antenna. I will say that it is compact and relatively easy to use.



As shown, it looks like one long about 17 inch strip. but what they do not show you is that the one long strip spreads out into a "Y" configuration that is much like a good old fashioned rabbit ears. The rabbit ears work extremely well for me,



Just look in the closet for some rabbit ears or buy a set cheap at a garage sale.  You probably will be as well off.



Sunday, December 20, 2015

Great AM radio.





Did you know you could build an intercom with homemade power. AM (amplitude modulated) radio makes it very easy to do.  To do am radios you need and audio source such as a microphone. We could transmit that signal but it might be hard to demodulate and the transmission signals would not be standardized so to speak. So you mix the audio signal with  a transmission signal.


So that signal gets transmitted over the airwaves. So so good. What to we do to turn that signal back into something we can use? If we receive the signal as is the speaker will not play it as the signal cancels it self out.


So we must divide the wave in half or demodulate it so to speak to make it useful. So we will use a rectifier or diode to do just that. The the signal becomes:

Now the signal looks much more like the audio signal we first used to send in the beginning. More has to be done, but that is the gist of the conversion.



Circuits:

Transmitters:


Receivers:

Add a .002 pf capacitor across the antenna ground connection for better signal.

Receiver with tank circuit for tuning.

WWII Vintage radio,
------------------------------

Fm? under construction.





Friday, December 18, 2015

Commmand line pluses.

Open source and the command line is a match made in heaven. The command line allows porting of age old rock solid code to nix. Most command line programs survive in the fact they can do one thing well and be used to pipe data from one form to another all without the fancy gui environment. Text based programs port very well. Of gui front ends can always be added later.


For example an old spreadsheet program originally written many years ago for cpm using mbasic still lives with the ability for free basic to recompile (with changes) the code.The following flatfile database originally developed in the DOS environment  is being expanded to have the abilities for a relational database.


Lastly there is a text editor developed in the TRS-80 days that can still be easily used in the command line environment when compiled with freebasic. Programs like dosbox can make the conversion easier.


 
 

A bit rusty with it but:


Native linux version:

So now you have an editor, database, and a text editor. that should be enough to get you started.