Table of Contents

Part 3

Entries

Entry 9: April 1, 2012

What action or concept of significance, as related to the course, did you experience on this date?

I was looking for “easter eggs” in unix. There are a lot of them in the old systems, but they seem to have been removed or just not on the lab46 term. I did find some fun ones

moo in apt-get

lab46:~$ apt-get moo
         (__)
         (oo)
   /------\/
  / |    ||
 *  /\---/\
    ~~   ~~
...."Have you mooed today?"...
lab46:~$

moo in aptitude

# aptitude moo
There are no Easter Eggs in this program.

# aptitude -v moo
There really are no Easter Eggs in this program.

# aptitude -v -v moo
Didn't I already tell you that there are no Easter Eggs in this program?

# aptitude -v -v -v moo
Stop it!

# aptitude -v -v -v -v moo
Okay, okay, if I give you an Easter Egg, will you go away?

# aptitude -v -v -v -v -v moo
All right, you win.

                               /----\
                       -------/      \
                      /               \
                     /                |
   -----------------/                  --------\
   ----------------------------------------------
# aptitude -v -v -v -v -v -v moo
What is it?  It's an elephant being eaten by a snake, of course.

last one

lab46:~$ ddate
Today is Boomtime, the 54th day of Discord in the YOLD 3178

Entry 10: April 7, 2012

I have a new phone… the droid razr… so nice.

Not being rooted makes me feel like a little kid who had his mommy put a lock on the frig.. I Must get access! I would do another experiment on this one but i already noted doing it on my samsung.

Entry 11: April 13, 2012

I am at work and I was talking with the resident IT personality. I was trying to glean the type of servers that we have and see if any are unix based. After finding out that he did not have any idea about the unix server that acts as a printer relay i was able to help him out. He needed to find the IP address and i was able to tell him what and how to do it.. nice

Entry 12: April Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

Remember that 4 is just the minimum number of entries. Feel free to have more.

cprog Keywords

  1. I/O Streams (cin, cout, cerr, stream operators) [C++]
  2. Namespaces [C++]
  3. Type Casting Operators, Const-Volatility Specifiers (const, volatile) [C++]
  4. Classes (Objects, Constructor, Destructor, Access Control, Public, Protected, Private, Friend, “this” pointer) [C++]
  5. Inheritance (single, multiple Inheritance), Polymorphism/Virtual Functions, Abstract Base Class [C++]
  6. Overloading (Functions, Operators) [C++]
  7. Exception Handing (throw, try, catch) [C++]
  8. Templates, STL (Standard Template Library) [C++]
cprog Keyword 17

I/O Streams (cin, cout, cerr, stream operators)

Definition

The concepts of I/O in C++ are streams, insertion, and extraction. The input stream is a source of input. It can be an object from which characters can be obtained (extracted). The output stream is an object to where output can be directed.

Demonstration

Here is and example

#include <iostream>
#include <fstream>
 
int main () 
{
  ofstream myfile;
  myfile.open ("example.txt");
  myfile << "Writing this to a file.\n";
  myfile.close();
  return 0;
}
cprog Keyword 18

Namespaces [C++]

Definition

A namespace is a declaration of different areas of the code. It calls them by a name and is then called out from within the code within the cycle of workflow.

Demonstration

Here is an example of the arrangement that a namespace takes within the code.

#include <iostream>
using namespace std;
 
namespace first
{
  int var = 5;
}
 
namespace second
{
  double var = 3.1416;
}
 
int main () {
  cout << first::var << endl;
  cout << second::var << endl;
  return 0;
}
cprog Keyword 19

Classes

Definition

Classes are groups of data related to a single object type. They are really functions to access information, and the classes possess the ability to inherit from other classes.

Demonstration

Here is an example from wiki. This shows “class” being used to define the called variable “person”. Then person is further allocated to have two containers, a and b.

#include <iostream>
#include <string>
using namespace std;
 
class person
{
public:
  string name;
  int age;
};
 
int main()
{
  person a, b;
  a.name = "Calvin";
  b.name = "Hobbes";
  a.age = 30;
  b.age = 20;
  cout << a.name << ": " << a.age << endl;
  cout << b.name << ": " << b.age << endl;
  return 0;
}
cprog Keyword 20

Inheritance

Definition

Inheritance is a a structure of reusing existing classes that have already been declared without modifying them, thus producing hierarchical relationships between them.

Demonstration

In the following example the class “A” is called out as public making it inherit the past declaration.

#include <iostream>
using namespace std;
 
class A {
   int data;
public:
   void f(int arg) { data = arg; }
   int g() { return data; }
};
 
class B : public A { };
 
int main() {
   B obj;
   obj.f(20);
   cout << obj.g() << endl;
}
cprog Keyword 21

Overloading

Definition

Overloading allows functions to have the same name but to have different parameters. So operators can be extend to act as a class within the same code.

Demonstration

Here is an example from wiki. The “time” operators is declared at the code header and given meaning. It is then broken into minutes and seconds.

Time operator+(const Time& lhs, const Time& rhs) 
{
    Time temp = lhs;
    temp.seconds += rhs.seconds;
    if (temp.seconds >= 60) {
        temp.seconds -= 60;
        temp.minutes++;
    }
    temp.minutes += rhs.minutes;
    if (temp.minutes >= 60) {
        temp.minutes -= 60;
        temp.hours++;
    }
    temp.hours += rhs.hours;
    return temp;
}
cprog Keyword 22

Exception Handling

Definition

Exception Handling is the attempt to have foresight into problems that happen while the code is running. Planning ahead for the inability of the program to do what it is designed to do, like being unable to find the source file that is used to pull up a list of data. While righting you code it is a good idea to “throw and exception” and see how the code responds.

Demonstration

Here is an example where we are asking the user for two numbers… what if they add a letter?

	cout << "Please provide two numbers\n";
	cout << "First Number: ";
	cin >> a;
	cout << "Second Number: ";
	cin >> b;

Adding in an If statement when the input is used can handle this exception and have fun telling the user to go back to Kindergarten.

If (a='A')
   cout << "sorry bro...that is a letter.. and number is the ones you use when you count your pennys";
cprog Keyword 23

Templates, STL

Definition

STL is short for Standard Template Library. The templates are a standard list of classes and template code.

Demonstration

STL provides many different types of container types. One is called a vector. It is sets a block allocated for use and can grow as needed (something that would make bignum easier). Here is an example i found. You can see the used of the vector.h file and the allocating of it. “vector<int> v;”.

#include <string.h>
#include <algo.h>
#include <vector.h>
#include <stdlib.h>
#include <iostream.h>
 
main ()
{
  vector<int> v;  // create an empty vector of integers
  int input;
  while (cin >> input)    // while not end of file
    v.push_back (input);  // append to vector
 
  sort(v.begin(), v.end());
 
  int n = v.size();
  for (int i = 0; i < n; i++)
    cout << v[i] << "\n";
}

cprog Objective

cprog Objective

Use a C program to change the IP address of my computer.

Definition

While doing other objectives I came across the suggestion that you should change your IP at given increments to increases your privacy while surfing. The documentation i was reading had more to do with other “outlets” for creative computing; however my love of computers comes from finding the limits of what can or cannot be done.

Method

Explore the world for a walk-through or community documentation. Compile that information and implement.

Measurement

To change your ip the standard ifconfig way

# ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up
# ifconfig eth0

Here is the direct code from lainoox that works very nicely. I would suggest that a script on playing with ifconfig would just be simpler. This is one approach.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <sys/ioctl.h>
#include <linux/sockios.h>
#include <errno.h>
#include <netinet/in.h>
#if defined(__GLIBC__) && __GLIBC__ >=2 && __GLIBC_MINOR__ >= 1
#include <netpacket/packet.h>
#include <net/ethernet.h>
#else
#include <sys/types.h>
#include <netinet/if_ether.h>
#endif
 
int set_ip(char *iface_name, char *ip_addr)
{
	if(!iface_name)
		return -1;	
 
	int sockfd;
	struct ifreq ifr;
	struct sockaddr_in sin;
 
	sockfd = socket(AF_INET, SOCK_DGRAM, 0);
	if(sockfd == -1){
		fprintf(stderr, "Could not get socket.\n");
		return -1;
	}
 
	/* get interface name */
	strncpy(ifr.ifr_name, iface_name, IFNAMSIZ);
 
	/* Read interface flags */
	if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) {
		fprintf(stderr, "ifdown: shutdown ");
		perror(ifr.ifr_name);
		return -1;
	}
 
	/*
	* Expected in <net/if.h> according to
	* "UNIX Network Programming".
	*/
	#ifdef ifr_flags
	# define IRFFLAGS       ifr_flags
	#else   /* Present on kFreeBSD */
	# define IRFFLAGS       ifr_flagshigh
	#endif
 
	// If interface is down, bring it up
	if (ifr.IRFFLAGS | ~(IFF_UP)) {
		fprintf(stdout, "Device is currently down..setting up.-- %u\n",ifr.IRFFLAGS);
		ifr.IRFFLAGS |= IFF_UP;
		if (ioctl(sockfd, SIOCSIFFLAGS, &ifr) < 0) {
			fprintf(stderr, "ifup: failed ");
			perror(ifr.ifr_name);
			return -1;
		}
	}
 
	sin.sin_family = AF_INET;
 
	// Convert IP from numbers and dots to binary notation
	inet_aton(ip_addr,&sin.sin_addr.s_addr);	
	memcpy(&ifr.ifr_addr, &sin, sizeof(struct sockaddr));	
 
	// Set interface address
	if (ioctl(sockfd, SIOCSIFADDR, &ifr) < 0) {
		fprintf(stderr, "Cannot set IP address. ");
		perror(ifr.ifr_name);
		return -1;
	}	
	#undef IRFFLAGS		
 
	return 0;
}
 
void usage()
{
	const char *usage = {
		"./set_ip [interface] [ip address]\n"
	};
	fprintf(stderr,"%s",usage);
}
 
int main(int argc, char **argv)
{
	if(argc < 3){
		usage();
		return -1;
	}
 
	set_ip(argv[1],argv[2]);
 
	return 0;
}

Out put of the program

 ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:1b:21:0a:d2:cf  
          inet addr:192.168.5.12  Bcast:192.168.5.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:21ff:fe0a:d2cf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2690 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14732 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:516826 (516.8 KB)  TX bytes:2242645 (2.2 MB)
 
$ sudo ./set_ip eth1 12.13.14.15
Device is currently down..setting up.-- 4163
$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:1b:21:0a:d2:cf  
          inet addr:12.13.14.15  Bcast:12.255.255.255  Mask:255.0.0.0
          inet6 addr: fe80::21b:21ff:fe0a:d2cf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2690 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14742 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:516826 (516.8 KB)  TX bytes:2247309 (2.2 MB

Here is a shell script route

#!/bin/bash
SUBNET=192.168.135.
ETH=eth0

for i in {1..254}
do
  ip addr add ${SUBNET}${i}/24 dev ${ETH}

  # do whatever you want here

  ip addr del ${SUBNET}${i}/24 dev ${ETH}
done

Sources

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Is there room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

unix Keywords

  1. Source Code, Object Code, Binary Code, Library (done)
  2. Pattern Matching(done)
  3. Regular Expressions(done)
  4. Filtering(done)
  5. Shell Scripting(done)
  6. networking, UNIX Networking Tools(done)
  7. Security(done)
  8. X Window System(done)
unix Keyword 17

Source Code, Object Code, Binary Code, Library

Definition

The source code for a program is the raw, un-processed by the compiler, file. Written in a programming language and used to further develop the software. The object code is produced by the compiler. It is generally a sequence of instruction that is used within the running the code. The Binary code is the machine language that is the final output of the compiler. This is actually was produces the desired results by the source code. The Library is the standard set or characters used in the correct syntax to tell the compiler what is needed to do.

Demonstration

Source Code example

#include<stdio.h>

int main()
{
 printf("yo dude");

return(0);
}
unix Keyword 18

Pattern Matching

Definition

Pattern matching is using the syntax of search programs to find conditions that meet the requested quarry. The most commonly used program for searching is the grep command. Taken from the man pages, Grep is defines as, “Grep searches the named input FILEs (or standard input if no files are named, or the file name - is given) for lines containing a match to the given PATTERN”.

Demonstration

Syntax for grep

grep 'word' filename
grep 'string1 string2'  filename
cat otherfile | grep 'something'
command | grep 'something'
command option1 | grep 'data'
grep --color 'data' fileName

Example taken from another source

grep -v bash /etc/passwd | grep -v nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/var/spool/news:
mailnull:x:47:47::/var/spool/mqueue:/dev/null
xfs:x:43:43:X Font Server:/etc/X11/fs:/bin/false
rpc:x:32:32:Portmapper RPC user:/:/bin/false
nscd:x:28:28:NSCD Daemon:/:/bin/false
named:x:25:25:Named:/var/named:/bin/false
squid:x:23:23::/var/spool/squid:/dev/null
ldap:x:55:55:LDAP User:/var/lib/ldap:/bin/false
apache:x:48:48:Apache:/var/www:/bin/false
unix Keyword 19

Regular Expressions

Definition

The term regular expressions is speaking about a set of characters that make up the words of patterns of a search. These are used when looking for specific strings of text that match the quarry. This is very much like the explained grep command earlier but focuses us into the actual, expression, wording used.

Demonstration

For example

grep -i man heroes.txt

We are searching for any string that meets the expression “man” in the text file “heroes.txt”. The output is the following.

Catwoman
Batman
Spider Man
Wonder Woman
Ant Man
Aquaman
Martian Manhunter
unix Keyword 20

Filtering

Definition

In Unix a filter is a way of using commands and pipes command that can manipulate the output of file. Two of the most powerful and popular Unix filters are the sed and awk commands.

Demonstration

The “sed” command allows us to look search a file and replace characters. For example in the following junk file. I have call cat to present the contents of the file. I then use a pipe to link in the sed command. Sed then looks as what is being outputted by cat and finds anything that is an “e” and replaces it with “E”.

$ cat junk.txt | sed -e "s/e/E/"
corE
worm sEed
jEwel
unix Keyword 21

Shell Scripting

Definition

Shell scripting is a way that you can automate routine tasks. It allows the user more flexibility and control over the operation of the system.

Demonstration

Following example from the SSH manual. You can see by this example, that the more complex shell scripts take on the look and feel of the C programming language. We have presented a list and are going to work through the list.

#!/bin/sh
fruitlist="Apple Pear Tomato Peach Grape"
for fruit in $fruitlist
do
   if [ "$fruit" = "Tomato" ] || [ "$fruit" = "Peach" ]
   then
      echo "I like ${fruit}es"
   else 
      echo "I like ${fruit}s"
   fi
done

Output of the script

I like Apples
I like Pears
I like Tomatoes 
I like Peachs
I like Grapes

Resource: https://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/unixscripting/unixscripting.html

unix Keyword 22

networking, UNIX Networking Tools

Definition

I love networking.. and there are many flexible tools with unix. Networking is the communication between computers. It is bringing those computers together to share resources, make work groups or just set up a game of QuakeIII.

Some common commands

  • finding host/domain name and IP address - hostname
  • test network connection – ping
  • getting network configuration – ifconfig
  • Network connections, routing tables, interface statistics – netstat
  • query DNS lookup name – nslookup
  • communicate with other hostname – telnet
  • outing steps that packets take to get to network host – traceroute
  • view user information – finger
  • checking status of destination host - telnet
Demonstration

Examples from the lab46 side

ab46:~$ hostname
lab46
lab46:~$ ifconfig
-bash: ifconfig: command not found
lab46:~$ nslookup
-bash: nslookup: command not found
lab46:~$ telnet
telnet> lab46:~$
lab46:~$ finger
Login     Name              Tty      Idle  Login Time   Office     Office Phone
jdavis34  Joshua Davis      pts/22     1d  Mar  6 12:57 (cpe-67-252-69-1:S.0)
jdavis34  Joshua Davis      pts/88     5d  Mar 29 16:18 (cpe-67-252-69-1:S.3)
jjohns43  Jeffrey Johnson   pts/24    18d  Jan 23 12:18 (cpe-74-65-82-173:S.0)
jjohns43  Jeffrey Johnson   pts/82    18d  Feb 27 11:03 (cpe-74-65-82-173:S.0)
jpettie   Jacob Pettie      pts/5          Mar  8 18:05 (pool-96-247-148-158:S.0)
jpettie   Jacob Pettie      pts/31    46d  Mar  6 14:35 (pool-96-247-148-158:S.1)
jpettie   Jacob Pettie      pts/35     5d  Mar 20 14:43 (pool-96-247-148-158:S.8)
jpettie   Jacob Pettie      pts/44    38d  Mar  6 16:39 (pool-96-247-148-158:S.3)
jpettie   Jacob Pettie      pts/77    47d  Mar 13 11:22 (pool-96-247-148-158:S.4)
jpettie   Jacob Pettie      pts/75    56d  Mar  6 15:17 (pool-96-247-148-158:S.2)
jpettie   Jacob Pettie      pts/95   1:31  Mar  8 11:00 (pool-96-247-148-158:S.7)
jpettie   Jacob Pettie      pts/91    40d  Mar  8 10:58 (pool-96-247-148-158:S.5)
jpettie   Jacob Pettie      pts/92    40d  Mar  8 10:59 (pool-96-247-148-158:S.6)
mfaucet2  Mason Faucett     pts/65   1:06  Mar 22 13:17 (172:S.0)
skinney1  Shane Kinney      pts/55         May  1 11:54 (65-124-85-125.dia.static.qwest.net)
squirrel  Pressly Dowler    pts/8     12d  Apr 19 22:53 (softscope.lair.lan)
tgalpin2  Tyler Galpin      pts/12     11  Jan 30 21:25 (:pts/72:S.0)
tgalpin2  Tyler Galpin     *pts/72     11  May  2 11:06 (172.16.192.234)
thakes3   Thomas Hakes      pts/41     2d  Apr 27 22:48 (172.16.198.198:S.0)
thakes3   Thomas Hakes      pts/62      2  May  2 10:43 (172.16.198.198:S.2)
thakes3   Thomas Hakes      pts/68     17  May  2 10:44 (172.16.198.198:S.3)
thakes3   Thomas Hakes      pts/2       3  Apr 30 11:36 (172.16.198.198:S.1)
wedge     Matthew Haas     *pts/14      1  May  2 08:49 (telstar.lair.lan)
lab46:~$ finger wedge
Login: wedge                            Name: Matthew Haas
Directory: /home/wedge                  Shell: /bin/bash
On since Wed May  2 08:49 (EDT) on pts/14 from telstar.lair.lan
   1 minute 34 seconds idle
     (messages off)
Mail last read Wed May  2 09:49 2012 (EDT)
Plan:
----------------------------------------------------------------------------
 Lab46 System Administrator

FYI, that is a pointing finger.. not the one that goes up but strait out… lol

unix Keyword 23

Security

Definition

Security on a Unix system comes from a few areas of concentration. Using permissions for users and groups is one way to keep key areas of the system out of the reach of unwanted side effects. Another way is to use smart passwords. Insuring that passwords are change every 3 months, are unique and have both alpha and numeric elements. When it comes to a Unix server patching is the most frequently used method. Finding exploits and deploying methods to fix the seen threat. Other best practices are firewalls, iptables, white/black lists etc.

Demonstration

Use of the lsof commands that shows a list of open files and what or who opened them.

lab46:~$ lsof | less
COMMAND     PID       USER   FD      TYPE  DEVICE SIZE/OFF     NODE NAME
init          1       root  cwd   unknown                           /proc/1/cwd (readlink: Permission denied)
init          1       root  rtd   unknown                           /proc/1/root (readlink: Permission denied)
init          1       root  txt   unknown                           /proc/1/exe (readlink: Permission denied)
init          1       root NOFD                                     /proc/1/fd (opendir: Permission denied)
kthreadd      2       root  cwd   unknown                           /proc/2/cwd (readlink: Permission denied)
kthreadd      2       root  rtd   unknown                           /proc/2/root (readlink: Permission denied)
kthreadd      2       root  txt   unknown                           /proc/2/exe (readlink: Permission denied)
kthreadd      2       root NOFD                                     /proc/2/fd (opendir: Permission denied)
migration     3       root  cwd   unknown                           /proc/3/cwd (readlink: Permission denied)
migration     3       root  rtd   unknown                           /proc/3/root (readlink: Permission denied)
migration     3       root  txt   unknown                           /proc/3/exe (readlink: Permission denied)

Use of the netstat command showing current connected protocols and their state.

lab46:~$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:35801                 *:*                     LISTEN
tcp        0      0 *:nfs                   *:*                     LISTEN
tcp        0      0 *:3939                  *:*                     LISTEN
tcp        0      0 *:3333                  *:*                     LISTEN
tcp        0      0 lab46.offbyone.lan:5000 *:*                     LISTEN
tcp        0      0 lab46.offbyone.lan:5007 *:*                     LISTEN
tcp        0      0 *:59343                 *:*                     LISTEN
tcp        0      0 *:sunrpc                *:*                     LISTEN
tcp        0      0 *:csync2                *:*                     LISTEN
tcp        0      0 lab46.offbyone.lan:4242 *:*                     LISTEN
tcp        0      0 lab46.offbyone.la:60002 irc.offbyone.lan:ircd   ESTABLISHED
tcp        0      0 lab46.offbyone.la:41572 auth1.offbyone.lan:ldap ESTABLISHED
tcp        0      0 lab46.offbyone.la:47089 irc.offbyone.lan:ircd   ESTABLISHED
tcp        0      0 lab46.offbyone.la:47998 irc.offbyone.lan:ircd   ESTABLISHED
tcp        0      0 lab46.offbyone.la:42140 auth1.offbyone.lan:ldap ESTABLISHED
unix Keyword 24

X Window System

Definition

The X Window System, X11, is the basic graphical user interface (GUI). X11 sits between the computer and the user acting like a translator. Taking the input from the user in the form of the mouse and keyboard and translating it to changes within the system.

Demonstration

Example of a GUI

unix Objective

unix Objective

Utilize the ntpq command

Definition

The ntpq command is a utility program that monitors the NTP deamon, ntpd. NTPQ stands for Network Time Protocol Query. It runs and interactive mode by using the command line and can write variables. “Ntpq uses NTP mode 6 packets to communicate with the NTP server, and hence can be used to query any compatible server on the network which permits it”, Man pages.

Method

Research, discover and implement.

Measurement

The ntpq command give and output requesting arguments.

lab46:~$ ntpq
ntpq>

Check to make sure that the deamon is monitor is running. The following pgrep will feed back the process code ot ntpq.

lab46:~$ pgrep ntpd
961

The -p arguments shows the servers and their sink…

lab46:~$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*juicebox.lair.l 116.204.3.124    2 u  385 1024  377    0.742   -0.054   4.615
 caprisun.offbyo .STEP.          16 u    - 1024    0    0.000    0.000   0.000
Analysis

Well… nothing really amazing with ntpq. I did find out a fun new command so mission done.

Resource List

unix Retest

Retest 7

Perform the following steps:

State Experiment

I am going to reinact the double connection by thakes.

http://lab46.corning-cc.edu/opus/spring2012/thakes3/start#experiment_4

Resources

Evaluate their resources and commentary. Answer the following questions:

  • Do you feel the given resources are adequate in providing sufficient background information?
  • This experiment is not heavy in the research need. Knowledge of ssh is all that is needed.
  • Are there additional resources you've found that you can add to the resources list?
  • The man pages and wiki
  • Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading
  • yes
  • If you find a deviation in opinion, state why you think this might exist.
  • none found
Hypothesis

State their experiment's hypothesis. Answer the following questions:

  • Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
  • yes it stated the needed direction and walked through the goal
  • What improvements could you make to their hypothesis, if any?
  • This was a simple state the desired outcome and shoot project. Nothing really to build on.
Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

  • Are the instructions correct in successfully achieving the results?
  • yes i was able to follow without any unknowns.
  • Is there room for improvement in the experiment instructions/description? What suggestions would you make?
  • well… he could have given us his password… lol… no it was good.
  • screen shots are always nice and he presented that.
  • Would you make any alterations to the structure of the experiment to yield better results? What, and why?
  • nope
Data
Analysis

Answer the following:

  • Does the data seem in-line with the published data from the original author?
  • yes
  • Can you explain any deviations?
  • none
  • How about any sources of error?
  • nope
  • Is the stated hypothesis adequate?
  • yup
Conclusions

Answer the following:

  • What conclusions can you make based on performing the experiment?
  • That i have a double connection and could keep in going… maybe a single script used a lot could cause the server some issues… bad thought… nvm
  • Do you feel the experiment was adequate in obtaining a further understanding of a concept?
  • yes
  • Does the original author appear to have gotten some value out of performing the experiment?
  • he had fun and so did I, so yes he learned how to use ssh and find another way to play with the server
  • Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).
  • I like it, good deal.
Retest 8

Perform the following steps:

State Experiment

I am going to do asowers xfc4 panel experiment.

http://lab46.corning-cc.edu/opus/spring2012/asowers/start#experiment_1

Resources

Evaluate their resources and commentary. Answer the following questions:

  • Do you feel the given resources are adequate in providing sufficient background information?
  • I was lost… there are terms that he knows that are not listed or given any explanation for.
  • Are there additional resources you've found that you can add to the resources list?
  • Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?
  • for the user it met what he needed
  • If you find a deviation in opinion, state why you think this might exist.
  • I just need more to be able to implement and at this point do not know what it is.
Hypothesis

State their experiment's hypothesis. Answer the following questions:

  • Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
  • I understand what he is after and that he reached the goal.
  • What improvements could you make to their hypothesis, if any?
  • Explain more about what he is going to do and what tool he is going to use to do it with.
Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

  • Are the instructions correct in successfully achieving the results?
  • no, i am unable to complete the expirment
  • Is there room for improvement in the experiment instructions/description? What suggestions would you make?
  • Need more thought about tool needed and how it is to be done.
  • Would you make any alterations to the structure of the experiment to yield better results? What, and why?
  • His set up was fine
Data
Analysis

First I needed to attain my IP then I attempted to bring me up

lab46:~$ ssh -X skinney1@192.168.1.112
ssh: connect to host 192.168.1.112 port 22: Connection timed out

attempt to bring panel

lab46:~$ sudo xfce4-panel
[sudo] password for skinney1:
skinney1 is not in the sudoers file.  This incident will be reported.
  • Does the data seem in-line with the published data from the original author?
  • unable to complete
  • Can you explain any deviations?
  • I attempted by using my IPv4 Add and my Default gateway on port 22 with not use.
  • How about any sources of error?
  • just need more information
  • Is the stated hypothesis adequate?
  • yes
Conclusions

Answer the following:

  • What conclusions can you make based on performing the experiment?
  • Maybe i need to be at the comp lab or a strait unix machine
  • Do you feel the experiment was adequate in obtaining a further understanding of a concept?
  • For the author, yes.
  • Does the original author appear to have gotten some value out of performing the experiment?
  • yes
  • Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).
  • already noted
Retest 9

Perform the following steps:

State Experiment

I am going to retest Brain Robbins play on the break command.

http://lab46.corning-cc.edu/opus/spring2012/brobbin4/start#experiment_1

Resources

Evaluate their resources and commentary. Answer the following questions:

  • Do you feel the given resources are adequate in providing sufficient background information?
  • Brain did a really good job explaining the concepts and walking the idea from conceptual to completion.
  • Are there additional resources you've found that you can add to the resources list?
  • Nope
  • Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?
  • Yes
  • If you find a deviation in opinion, state why you think this might exist.
  • None
Hypothesis

State their experiment's hypothesis. Answer the following questions:

  • Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
  • yes, nothing wrong with what is listed.
  • What improvements could you make to their hypothesis, if any?
Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

  • Are the instructions correct in successfully achieving the results?
  • Yes, completed without issues
  • Is there room for improvement in the experiment instructions/description? What suggestions would you make?
  • None
  • Would you make any alterations to the structure of the experiment to yield better results? What, and why?
  • none
Data

Publish the data you have gained from your performing of the experiment here.

No additional research was needed.

Analysis

Answer the following:

  • Does the data seem in-line with the published data from the original author?
  • yes
  • Can you explain any deviations?
  • none
  • How about any sources of error?
  • none
  • Is the stated hypothesis adequate?
  • yes
Conclusions

Answer the following:

  • What conclusions can you make based on performing the experiment?
  • Using the break command does a better job then exit when you need a break command.
  • Do you feel the experiment was adequate in obtaining a further understanding of a concept?
  • yes
  • Does the original author appear to have gotten some value out of performing the experiment?
  • yes
  • Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).
  • none, good job dude.

Experiments

Experiment 7

Question

What on earth is telnet for?

Resources

Hypothesis

Can telnet be used like ssh?

Experiment

“GIFY”, play and try.

Data

Telnet is is a network protocol much like ssh. TI is used to provide a connection between a user and server with TCP (Transmission Control Protocol). The basic syntax is telnet host.com. There are a list of arguments that can be used just like with any other utility.

telnet [-468ELadr] [-S tos] [-b address] [-e escapechar] [-l user] [-n tracefile] [host [port]]

Use telnet to connect to a server

telnet towel.blinkenlights.nl

Once connected starwar ascii plays



                                           /~\
                                          ( oo|    They've shut down
                                          _\=/_    the main reactor.
                          ___         #  /  _  \
                         / ()\        \\//|/.\|\\
                       _|_____|_       \/  \_/  ||
                      | | === | |         |\ /| ||
                      |_|  O  |_|         \_ _/   #
                       ||  O  ||          | | |
                       ||__*__||          | | |
                      |~ \___/ ~|         []|[]
                      /=\ /=\ /=\         | | |
      ________________[_]_[_]_[_]________/_]_[_\_________________________

Analysis

Based on the data collected:

Conclusions

Telnet is just one more approach that has been taken to network computer together. It is used typically in a windows and unix server world.

Experiment 8

Implement TOR

Question

Can TOR be implemented on a droid unix machine.

Resources

Hypothesis

I am not the first, there must be away!?

Experiment

Success is gained from a working install of TOR on a droid unix machine.

Data

Thankfully, i found out after starting this project that Orbot worked on a nice app for TOR. TOR stands for The Onion Router and is designed to enable online anonymity. Much like a multilevel proxy. The project was started in 2002 by Roger Dingledine, nick Mathewson and Paul Syverson. In 2011 the project was awarded the Free Software Foundation's 2010 aware for projects of social benefit. Tor basically works to conceal the user from surveillance and traffic analysis. It encrypts and then randomly bounces the communications through a bunch of relays run by volunteers all over the place.

Install

Simple download the .apk file

https://play.google.com/store/apps/details?id=org.torproject.android&hl=en

Once installed you need to set up some fine points. TOR wants you to have root access to the device, but has a version for the unrooted. It will ask you simple questions about what you want to do with it, have everything use it etc.

I established everything and surprise… everything works fine.

Orbweb is also a nice install allow a full browsing experience that even tells you your fake IP, mine was 31.172.30.4.

Analysis

Conclusions

Thanks to projects and a supportive community of developers the general public has access to wonderful tools like TOR. The ease of install and of use made this project and easy score.

Retest 3

State Experiment

Jdavis, float experiment

http://lab46.corning-cc.edu/opus/spring2012/jdavis34/start#experiment_if_or_not_if

Resources

Evaluate their resources and commentary. Answer the following questions:

Hypothesis

State their experiment's hypothesis. Answer the following questions:

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

Data

Analysis

Answer the following:

#include <stdio.h>
#include <float.h>
 
 
int main()
{
 
        float x;
        int y;
        int done;
 
        printf("Listen... we only add two numbers so keep it simple\n");
        printf("input 1st num\n ");
        scanf("%f", &x);
        printf("input 2nd num\n ");
        scanf("%d", &y);
 
        done = x + y;
        printf("%f\n", done);
 
return 0;
}

Value is dumb

input 1st num
 2
input 2nd num
 2
0.000000

Conclusions

Answer the following: