User Tools

Site Tools


user:dmurph14:start

ATTENTION: MY JOURNAL IS LOCATED HERE. PLEASE VISIT IT. THANKS. http://lab46.corning-cc.edu/journal/spring2010/dmurph14/start

CHATBOT BUILDING QUEST

How I made Claptrap…

1) Download Eggdrop. http://www.eggheads.org/

2) Follow the directions on the egghelp.org website to the T.

3) Go through the config file and remove the two 'kill' lines. Be sure to input the right information so the bot goes to the correct channel.

4) Add in the bot's ability to speak with megaHal.

5) Compile your bot!

6) Take ownership of your bot in the chat, and enjoy.

Claptrap learns from people and is quite fun to talk to. :3


NETCAT QUEST

1. man nc


2. What is netcat? You can use it by typing 'nc' on the command line. Netcat is a simple unix utility which reads and writes data across network conections, using TCP or UDP protocol. It is designed to be a reliable “back-end” tool that can be used directly or easily driven by other programs and scripts. At the same time, it is a feature-rich network debugging and exploration tool, since it can create almost any kind of connection you would need and has several interesting built-in capabilities.

In the simplest usage, “nc host port” creates a TCP connection to the given port on the given target host. Your standard input is then sent to the host, and anything that comes back across the connection is sent to your standard output. This continues indefinitely, until the network side of the connection shuts down. Note that this behavior is different from most other applications which shut everything down and exit after an end-of-file on the standard input.

Netcat can also function as a server, by listening for inbound connections on arbitrary ports and then doing the same reading and writing. With minor limitations, netcat doesn't really care if it runs in “client” or “server” mode – it still shovels data back and forth until there isn't any more left. In either mode, shutdown can be forced after a configurable time of inactivity on the network side.

And it can do this via UDP too, so netcat is possibly the “udp telnet-like” application you always wanted for testing your UDP-mode servers. UDP, as the “U” implies, gives less reliable data transmission than TCP connections and some systems may have trouble sending large amounts of data that way, but it's still a useful capability to have.

Interesting options that can be utilized:

-c string - specify shell commands to exec after connect (use with caution). The string is passed to /bin/sh -c for execution. See the -e option if you don't have a working /bin/sh (Note that POSIX-conformant system must have one).

-e filename - specify filename to exec after connect (use with caution). See the -c option for enhanced functionality.

-g gateway - source-routing hop point[s], up to 8

-G num - source-routing pointer: 4, 8, 12, …

-h - display help

-i secs - delay interval for lines sent, ports scanned

-l - listen mode, for inbound connects

-n - numeric-only IP addresses, no DNS

-o file - hex dump of traffic

-p port - local port number (port numbers can be individual or ranges: lo-hi [inclusive])

-q seconds - after EOF on stdin, wait the specified number of seconds and then quit.

-b - allow UDP broadcasts

-r - randomize local and remote ports

-s addr - local source address

-t - enable telnet negotiation

-u - UDP mode

-v - verbose [use twice to be more verbose]

-w secs - timeout for connects and final net reads

-z - zero-I/O mode [used for scanning]

-x type - set TOS flag (type may be one of “Minimize-Delay”, “Maximize-Throughput”, “Maximize-Reliability”, or “Minimize-Cost”.)

SEE http://www.jfranken.de/homepages/johannes/vortraege/netcat.en.html and http://www.debian-administration.org/articles/58


3. To send stuff back and forth, one person must set themselves up as a server.

nc -l -p 4444 where 4444 is the port you will connect to, it must be above 1024.

You now have a server. Now, someone else can attach to that server. You must give the domain name so it knows who to connect to.

nc (domain name, ex: lab46.offbyone.lan) 4444

Now you can talk to eachother, just like AIM or other chat clients. Cool beans.



SHELL SCRIPTING QUEST


PATTERN MATCHING QUEST


BASIC SYSTEM ADMINISTRATION QUEST

Basically, we get our own system (vm33.student.lab) that can be reached via SSH. In this quest we are to mess with it, using our almighty Unix prowess.

To get there, type: lab46:~$ ssh (USERNAME)@vm33.student.lab

1. First thing is first, I must create a name for myself. I used the following command…

useradd -m (USERNAME)

(-m creates my home directory, which is important!)

It will prompt you to enter your password, so do that.

2. Then, I had to put myself in the admin and unix groups so I could do something. This was done using the following command…

usermod -G adm,unix (USERNAME)

(-G adds me to the group(s) which is a necessity.)

3.


user/dmurph14/start.txt · Last modified: 2010/04/26 14:49 by dmurph14