Useful Scripts and Programs

Blue Bar separator




The following are links to articles containing all the various scripts and programs that I have scattered around here.


VOS

3rd_party_keep_alive.cm.cmCommand macro that given a socket's PCB address calls 3rd_party_keep_alive.pm every N minutes to keep a connection active
3rd_party_keep_alive.pmsends a TCP segment mimicking a keep-alive segment from the specified connection.
arp_flush.cmFlushes the STCP ARP cache by deleting each entry in the cache one at a time
arp_scan.cmUses a fast ping to generate an ARP request for each host in a class C subnet and then dumps the resulting ARP table. Similar to scan.cm but simpler.
beacon.cBeacon packet to assist in protocol trace synchronization
BPRI_LO_alert.cmSends 25th line message when current STREAMS memory usage exceeds specified threshold
BPRI_LO_check.cmDisplays current and max STREAMS memory usage
cr.plPerl script to add (or remove) carriage return characters to the end of lines prior to (or after) transferring files to (or from) an MS Windows system using SFTP or FTP in binary mode
cycle_output_files.cmRuns a process till the output file gets to a certain size then stops it and runs it again cycling to another output file
dump_process_set.cmExecute a set of analyze_system requests against a set of running processes
dump_streams.cmGather as much information as possible about the current STREAMS usage
find_my_ip_address.cmA script that can be used to determine your public IP address
fnet.cmFilter the output of the STCP netstat command
gather_stcp.cmGather STCP Interface and Ethernet adapter statistics for performance monitoring and troubleshooting
get_connection_meters.cmDump the stcp_meters statistics for a select connection or connections
get_process_sockets.cmA macro to dump the TCB and socket meters for all sockets associated with a process (or processes). This keys off of a process name or number
get_socket_info.cmDump the stcp_meters statistics and/or TCB data for a select connection or connections. This keys off IP address, port number or TCB address
get_switch_interface_stats.cmA macro to dump the interfaces group counters from the MIB-II MIB for a specific port on a switch.
list_all_process_network.cmList all the STCP IP socket connections for all process currently running. See tcp_socket_owner.cm for a faster alternative that might do what you need.
list_process_network.cmList all the STCP IP socket connections for a given process
list_vterm_parameters.cmList the parameters needed for telnet_msd to work for all vterms matching a star name
logd.cC source code for a very simple log server
map_connections.cmA macro to call both map_telnetd_connections and map_secured_connections.
map_telnetd_connections.cmDisplay or write a file containing a list of all users who are connected to the module via telnetd, the device they are connected to and the IP address and port number they are connecting from.
map_secured_connections.cmDisplay or write a file containing a list of all users who are connected to the module via sshd, the device they are connected to and the IP address and port number they are connecting from.
match.plPerl script to match lines from files or command output
monitor_sdlmux_adapter_status.cmPeriodically checks the status of network links and sends 25th line message and puts entry in the syserr_log if it finds that a link is down or an adapter has failed.
netstat-all-interfaces.cmloop through all STCP interfaces doing netstat -interface
netstat_filter.plMonitor netstat output filtering out uninteresting lines
new_resolve.cExample program showing how to call getaddrinfo to resolve host names
osl_server_times.cmCommad macro to display the last_run_time for all the osl_server processes
personal_ssh_setup.cmSet up Stratus STCP SSH to use public key authentication
ping_forever.cmContinuously ping a host without flooding the network
pm.cmRun STCP packet_monitor with the most common/useful options
pm21line.plCombines all of the protocol header lines displayed by packet_monitor into 1 line eliminating non-header lines
pm2text2pcap.plPerl script to process packet_monitor out so that text2pcap can be run over it to create a pcap file
process_packet_monitor_scan.cmProcesses the output of packet_monitor to construct a list of seen IP addresses
resolve.cExample program showing how to call gethostname to resolve host names
scan.cmA scanner to find all hosts on a local subnet (uses ARP)
send_cmds.cC program that allows you to log into a remote system via "telnet" and execute commands in a script. Allows execution within a command macro
smtp.plPerl script using the SMTP Perl module to sent an E-mail or SMS message
socket_count.cmCalculate the current socket usage and how close to the various limits you are
start_more_osl_servers.cmCommand macro to start more osl_server processes
stcp_deadgw.cmDetermine if a STCP gateway has stopped working and switch to another gateway (MS Word file)
stcp_device_lockers.cmList all the processes with an STCP device clone locked - sorted by number of devices locked
stcp_tping.cC program that "pings" a remote host by establishing a TCP connection (MS Word file).
tcpos_deadgw.cmDetermine if a TCP_OS gateway has stopped working and switch to another gateway (MS Word file)
tcp_socket_owner.cmList processes attached to an STCP TCP socket. This is much faster than list_all_process_network.cm but does not list UDP sockets or identify the actual connections. It also requires perl.
timeout_recv.cAn example of how to timeout a blocking recv so that it does not block forever
whos_running.cmlist who bound the program module and who created the file for every running program module

ftServer/Windows

beacon.cBeacon packet to assist in protocol trace synchrontization
dgw.plPerl script to determine if a gateway has stopped working and switch to another gateway (MS Word file)
genpass.exePassword generation program, runs under Windows.
kill_dumpcap.vbsA VBS script to stop a dumpcap (Wireshark) trace when a packet is seen (or not seen) in a tracefile.
list_dumpcap.vbsA VBS script to list the PID of all the dumpcap (Wireshark) processes running.
ListFilesBySize.vbsA VBS script to list all files in a directory tree sorted by size
netstat-statistics.vbsA VBS script to periodically collect network statistics for baselining and trouble shooting Windows systems
ping_trigger.vbsVBS script to ping a host and execute a command if the ping fails
tping-w.plPerl script that uses TCP to "ping" a host.

Platform/OS Independent

addTraceLabels.plA Perl script to send a labeling frame for inclusion into a protocol analyzer trace file
delta.plA Perl script to calculate the delta values between 2 or more sets of numbers contained in a file
delta_time_stamp.plA Perl script to calculate the delta time between timestamps at the start of a line
genpass2.plPerl script to generate "good" passwords based on easy to remember passphrase
genpass_javascript.htmlJavaScript script to generate "good" passwords based on easy to remember passphrase
graph concurrent connectionsGraph concurrent connections in a packet trace file
not really a script but an example of how to do it using tshark and gunplot
split-pcap.plPerl script to separate the TCP flows in a pcap file
tcplisten.plPerl script to listen on a TCP port and send back a specified message when there is a connection
tshark-data-2-text.plA perl script that takes a character string in the format of XX:XX:XX:XX... where each XX is between 00 and FF and converts it to reachable text. Design to be used with tshark-follow-stream.sh.
tshark-follow-stream.shA shell script that calls tshark to output a packet stream, color coding the segments in each direction, requires the tshark-data-2-text.pl perl script
tuc.plPerl script to send a UDP datagram to a speficied IP address and por and wait for a response
udpecho.plPerl script to listen on a UDP port and echo back a response when a datagram is received

Linux

ping-date.shA shell script to ping a host using the date/time as text as the payload

Other

mm.cProxy program to split and combine application layer messages accross and within TCP layer segments. This tests an applications ability to correctly handle TCP's byte stream protocol versus a mesage protocol. The program is written in C for FreeBSD but it should compile on just anout any Unix or Linux platform.


Blue Bar separator
This page was last modified on 16-06-05
mailbox Send comments and suggestions
to noah@noahdavids.org