logo

Noumena Corporation


Whitmore Lake
Michigan

Clif Flynt wrote Tclsh Spot articles for login: magazine from 1999 to 2005.

Here are quick summaries with links to the articles and the source code.

April 1999:
Intro to Tcl/tk
img Tcl/Tk Introduction: A GUI Calculator
The first Tclsh Spot article introduced the basic commands and showed how to create a GUI calculator (with 8 commands and about 30 lines of code.)

Read the article (PDF) (78887 bytes)

Get the code: (790 bytes)

June 1999:
File IO, Strings, Text Widget
Catching unowned IRC Robots
This article described a simple script that will confirm that all the tasks running on a system are owned by legitimate, logged in, users. We used this script to track and kill IRC Robots that crackers left on the college network where Clif Flynt was teaching at the time.

Read the article (PDF) (52265 bytes)

Get the code: (848 bytes)

August 1999:
Using the HTML viewer
An HTML viewer for MIME mail readers
I like to read mail with a plain old text type mail viewer. But metamail doesn't have built in support for HTML mail. This viewer will handle simple HTML messages (but not most advertising mail).

Read the article (PDF) (59072 bytes)

Get the code: (17075 bytes)

October 1999:
Extending the HTML viewer
Extending the HTML viewer
This article shows how to extend the Tcl HTML package to read images, and bounce to hyperlinks.

The example code is an improved htmlviewer that will let you look at images or load links at your discretion.

Read the article (PDF) (60800 bytes)

Get the code: (20612 bytes)

December 1999:
Building HTTP Robots
strings, regular expressions
Introducing the stock robot
This is the first of several articles that show how to build a simple stock quote retrieving robot.

This article creates a simple robot that will return the current price.

Read the article (PDF) (108691 bytes)

Get the code: (340 bytes)

April 2000:
Building HTTP Robots
fancy regular expressions
Extending the stock robot
This article explains some of Tcl's new regular expression options, and extends the robot to get all the available data.

Read the article (PDF) (49121 bytes)

Get the code: (517 bytes)

June 2000:
File I/O, the BLT Graph widget
Analyzing data - Introducing BLT
Now that we can get the stock data, lets start saving the results, and put together something simple to look for trends.

This article shows how to use the Tcl File commands to save the results, and how to use the BLT extension graph widget to display them later.

Read the article (PDF) (73448 bytes)

Get the code: (1111 bytes)

August 2000:
Better graphs, sales volumes, Associative arrays
More things to do with the BLT graph widget
This article expands on the previous graphing program and shows how to use bar charts with graphs, use multiple axes, and display custom labels on the tics.

Along with that, it discusses using the associative array to organize the data.

Read the article (PDF) (602435 bytes)

Get the code: (2184 bytes)

October 2000:
Multiple lines on a chart, menubuttons, more associative array techniques
Comparing multiple data sets with the BLT Graph widget
This article described how to:
  • use BLT with multiple lines of data
  • bind actions to the lines
  • generate postscript images of a graph
  • use a tk menubutton

It expands on the discussion from the previous three articles.

Read the article (PDF) (106466 bytes)

Get the code: (1565 bytes)

December 2000:
Introduction to TCP/IP Client-Server in Tcl
Client/Server system monitor
Introduces the socket command, and shows how to build a client-server pair that will monitor disk space, and report when the space gets low.

Read the article (PDF) (239300 bytes)

Get the code: (951 bytes)

February 2001:
More IP-style Client/Server techniques
Expanded Client/Server system monitor with BLT barchart
This article expanded on the previous article by:
  • Using a single server with multiple ports for different information.
  • Displaying client data with a barchart.
  • Handling exception conditions with catch.
  • Checking for valid clients.

Read the article (PDF) (265718 bytes)

Get the code: (2583 bytes)

April 2001:
Client/Server System Monitor with History
Client/Server System Monitor with history
Shows how to save the last N hours worth of events, and display them in a scrolling canvas.

Read the article (PDF) (234008 bytes)

Get the code: (3170 bytes)

June 2001:
Displaying utmp data with the binary command
Examining binary data
Describes using the binary command to dump the information in the utmp file.

Read the article (PDF) (13417 bytes)

Get the code: (1036 bytes)

July 2001:
Using the binary command to examine telnet configuration messages
Binary data and sockets
Describes using the binary command to display the IAC interaction during the start of a telnet session.
Discusses:
  • binary
  • fconfigure
  • read
  • split
  • regsub

Read the article (PDF) (204442 bytes)

Get the code: (4546 bytes)

Sep 2001:
A Telnet Client
A simple Telnet Client
Implements a simple telnet client that can interact with a server, maintain its internal state, and respond to various commands the server can send. Demonstrates some features of the Tcl namespace.

Read the article (PDF) (199826 bytes)

Get the code: (2670 bytes)

December 2001:
Extraction information from tcpdump
Display text from tcpdump output
Describes extracting the text from the hex output of tcpdump.
Discusses:
tcpdump format join
split format string regexp

Read the article (PDF) (189719 bytes)

Get the code: (1957 bytes)

Feb 2002:
Getting and comparing HTML pages
A simple html interaction tester
An example application that takes reformatted output from tcpdump and turns it into a Tcl script that can be used to replay an interaction.
Discusses
http vwait
clock format read

Read the article (PDF) (173456 bytes)

Get the code: (5685 bytes)

April 2002:
Advanced Tk Techniques 1
Resizeable displays
Describes using pack, place and grid to make resizeable GUI applications.
Discusses:
pack place grid

Read the article (PDF) (237363 bytes)

Get the code: (1213 bytes)

May 2002:
Advanced Tk Techniques 2: Automatic Scrollbars
Scrollable Displays
Describes how to build applications with scrollbars that appear and vanish as required, and how to simulate a scrollable frame.
Discusses
frame canvas
grid scrollbar

Read the article (PDF) (97351 bytes)

Get the code: (2644 bytes)

June 2002:
Advanced Tk Techniques 3: popup Help
Popup Help messages
Adding popup help messages to buttons, labels, etc.
Discusses:
bind after toplevel
winfo wm message

Read the article (PDF) (74746 bytes)

Get the code: (1404 bytes)

Oct 2002:
Firewall Validation 1: Building extensions with SWIG
Firewall Validation 1: Building extensions with SWIG
Describes how to convert an existing library into a Tcl extension using swig. Builds an extension using the dnet library for sending and receiving ethernet packets.
Discusses
SWIG extensions

Read the article (PDF) (76266 bytes)

Get the code: (93131 bytes)

Feb 2003:
Firewall Validation 2: Testing the packet generator with AX4000
Firewall Validation 2: Testing the packet generator with AX4000
Describes using the Spirent Ax4000 to measure line usage and confirm that the dnet extension can saturate a 100-B-T line.
Discusses:
ax interface analyzer
enet

Read the article (PDF) (93194 bytes)

Get the code: (93131 bytes)

Apr 2003:
Firewall Validation 3: Generating packets and validating the code
Firewall Validation 3: Object Style programming in Tcl
Describes object style programming using the namespace command in the context of building broadband packets, and then describes validating the new procedures.
Discusses
namespace variable tcltest

Read the article

Read the article (PDF) (152409 bytes)

Get the code: (22108 bytes)

Jun 2003:
Firewall Validation 4: Capturing and Analyzing Packets with an AxTcl
Firewall Validation 4: Capturing and Analyzing Packets with an AxTcl
How to use AxTcl on the Spirent AX-4000 to capture packets and display statistics and packet contents.
Discusses:
ax interface analyzer
enet

Read the article

Read the article (PDF) (194679 bytes)

Get the code: (872 bytes)

Aug 2003:
Firewall Validation 5: Monitoring log files with Expect
Firewall Validation 5: Monitoring log files with Expect
Tcl's Expect extension is ideal for automated scanning log files. This article describes watching the log files to confirm that expected events occur.
Discusses
spawn expect exp_send proc

Read the article (PDF) (12919 bytes)

Get the code: (824 bytes)

Oct 2003:
Firewall Validation 6: Client/Server sockets
Firewall Validation 6: Client/Server sockets
Tcl's Socket interface is clean and simple. This makes it an ideal choice for developing client/server applications.
Discusses:
socket (client) socket (server) flush
fconfigure fileevent vwait

Read the article (PDF) (247792 bytes)

Get the code: (1601 bytes)

Feb 2004:
Firewall Validation 7: Secure Sockets, TLS and creating a simple Certificate Authority
Firewall Validation 7: Secure Sockets, TLS and creating a simple Certificate Authority
For secure applications, you need secure communications. The TLS extension allows Tcl sockets to use SSL for communications. This article describes setting up private certificates for secure private communications.
Discusses
tls::socket tls::handshake
interp create interpName alias

Read the article (PDF) (61017 bytes)

Get the code: (13364 bytes)

Apr 2004:
Firewall Validation 8: Mobile Agents in Tcl
Firewall Validation 8: Mobile Agents in Tcl
A client application can send a Tcl script an Agent server for remote evaluation. This article describes creating an Agent based client/server pair, using SSL to ensure that only scripts from trusted agents are evaluated, and evaluating scripts in a Safe sandbox.
Discusses:
safe::interpCreate safe::interpAddToAccessPath
safe::interpDelete info complete

Read the article (PDF) (80756 bytes)

Get the code: (13809 bytes)

Jun 2004:
Fortran/Tcl 1: Using Tcl with FORTRAN
Digression: Fortran/Tcl 1: Using Tcl with FORTRAN
Adding a Tcl intepreter to a FORTRAN program is an easy way to extend your FORTRAN programs to support graphics, networks, configuration files, etc. This article describes how to link the Tcl interpreter to a FORTRAN application and use a Tk GUI for input and output.
Discusses
ftcl_start labelframe entry
button label vwait

Read the article (PDF) (76763 bytes)

Get the code: (20656 bytes)

Aug 2004:
Fortran/Tcl 2: Making a better GUI for FORTRAN Applications
Digression: Fortran/Tcl 2: Making a better GUI for FORTRAN Applications
Demonstrates the flexibility of writing a GUI as script appended to a compiled application. A GUI script is easy to modify and extend without affecting the core application. You can even change a challenge/response application to a real-time application.
Discusses:
labelframe image scale

Read the article (PDF) (49307 bytes)

Get the code: (29652 bytes)

Oct 2004:
Fortran/Tcl 4: Generating a graphic display with the canvas widget
FORTRAN/Tcl: Data Visualization with a Tk Canvas
FORTRAN applications can generate lots of numbers. The Tk canvas provides a good tool for visualizing that information.
Discusses
canvas scrollbar canvas bind
canvas xview/yview create line create polygon

Read the article (PDF) (55501 bytes)

Get the code: (29605 bytes)

Feb 2005:
Fortran/Tcl 3: Wrapping a FORTRAN/Tcl with TOBE
Wrapping applications with TOBE
In order to distribute a FORTRAN/Tcl application, either the client needs to have Tcl installed, or you need to wrap the application into a single executable. D. Richard Hipp's TOBE wrapping solution is best for this application.
Discusses
Wrapping Applications Editing the TOBE Makefile Tcl_Init
Tcl_EvalFile Tcl_FindExecutable Zip

Read the article (PDF) (110186 bytes)

Get the code: (87293 bytes)